Warning, /include/Geant4/tools/wroot/element is written in an unsupported language. File is not indexed.
0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003
0004 #ifndef tools_wroot_element
0005 #define tools_wroot_element
0006
0007 #include "buffer"
0008 #include "named"
0009 #include "../snpf"
0010
0011 namespace tools {
0012 namespace wroot {
0013
0014 namespace streamer__info {
0015
0016 enum Type { // sizeof :
0017 BASE = 0, // x
0018 ARRAY = 20, // ?
0019 POINTER = 40, // 4
0020 POINTER_INT = 43, // 4
0021 POINTER_FLOAT = 45, // 4
0022 POINTER_DOUBLE = 48, // 4
0023 COUNTER = 6, // 4
0024 CHAR = 1, // 1
0025 SHORT = 2, // 2
0026 INT = 3, // 4
0027 FLOAT = 5, // 4
0028 DOUBLE = 8, // 8
0029 UNSIGNED_CHAR = 11, // 1
0030 UNSIGNED_SHORT = 12, // 2
0031 UNSIGNED_INT = 13, // 4
0032 BOOL = 18, // 1 ?
0033 OBJECT = 61, // ?
0034 OBJECT_ANY = 62, // ?
0035 OBJECT_ARROW = 63, // ?
0036 OBJECT_POINTER = 64, // ?
0037 _TSTRING = 65, // 8 //NOTE : TSTRING clashes with a cpp macro in cfitsio.
0038 TOBJECT = 66, // 12
0039 TNAMED = 67 // 28
0040 };
0041
0042 const int size_FLOAT = 4;
0043 const int size_DOUBLE = 8;
0044 const int size_INT = 4;
0045 const int size_UINT = 4;
0046 const int size_SHORT = 2;
0047 const int size_BOOL = 4; //(Bool_t = 1 + 3 for alignement)
0048 //uuu ? const int size_BOOL = 1;
0049
0050 const int size_TString = 8;
0051 }
0052
0053
0054 class streamer_element : public virtual ibo {
0055 static const std::string& s_class() {
0056 static const std::string s_v("tools::wroot::streamer_element");
0057 return s_v;
0058 }
0059 public: //ibo
0060 virtual const std::string& store_cls() const {
0061 static const std::string s_v("TStreamerElement");
0062 return s_v;
0063 }
0064 virtual bool stream(buffer& aBuffer) const {
0065 unsigned int c;
0066 if(!aBuffer.write_version(2,c)) return false;
0067 if(!Named_stream(aBuffer,fName,fTitle)) return false;
0068 if(!aBuffer.write(fType)) return false;
0069 if(!aBuffer.write(fSize)) return false;
0070 if(!aBuffer.write(fArrayLength)) return false;
0071 if(!aBuffer.write(fArrayDim)) return false;
0072 if(!aBuffer.write_fast_array<int>(fMaxIndex,5)) return false;
0073 if(!aBuffer.write(fTypeName)) return false;
0074 if(!aBuffer.set_byte_count(c)) return false;
0075 return true;
0076 }
0077 public:
0078 virtual streamer_element* copy() const = 0;
0079 public:
0080 virtual void out(std::ostream& aOut) const {
0081 std::string _fname;
0082 fullName(_fname);
0083 char _s[256];
0084 snpf(_s,sizeof(_s)," %-14s%-15s offset=%3d type=%2d %-20s",fTypeName.c_str(),_fname.c_str(),fOffset,fType,fTitle.c_str());
0085 aOut << _s << std::endl;
0086 }
0087 public:
0088 streamer_element(const std::string& aName,const std::string& aTitle,
0089 int aOffset,int aType,const std::string& aTypeName)
0090 :fName(aName),fTitle(aTitle),fType(aType)
0091 ,fSize(0),fArrayLength(0),fArrayDim(0),fOffset(aOffset)
0092 ,fTypeName(aTypeName){
0093 for(int i=0;i<5;i++) fMaxIndex[i] = 0;
0094 }
0095 virtual ~streamer_element(){
0096 }
0097 protected:
0098 streamer_element(const streamer_element& a_from)
0099 :ibo(a_from)
0100 ,fName(a_from.fName),fTitle(a_from.fTitle)
0101 ,fType(a_from.fType),fSize(a_from.fSize)
0102 ,fArrayLength(a_from.fArrayLength)
0103 ,fArrayDim(a_from.fArrayDim),fOffset(a_from.fOffset)
0104 ,fTypeName(a_from.fTypeName){
0105 for(int i=0;i<5;i++) fMaxIndex[i] = a_from.fMaxIndex[i];
0106 }
0107 streamer_element& operator=(const streamer_element& a_from){
0108 fName = a_from.fName;
0109 fTitle = a_from.fTitle;
0110 fType = a_from.fType;
0111 fSize = a_from.fSize;
0112 fArrayLength = a_from.fArrayLength;
0113 fArrayDim = a_from.fArrayDim;
0114 fOffset = a_from.fOffset;
0115 fTypeName = a_from.fTypeName;
0116 for(int i=0;i<5;i++) fMaxIndex[i] = a_from.fMaxIndex[i];
0117 return *this;
0118 }
0119 public:
0120 virtual void setArrayDimension(int aDimension){
0121 fArrayDim = aDimension;
0122 if(aDimension) fType += streamer__info::ARRAY;
0123 //fNewType = fType;
0124 }
0125 virtual void setMaxIndex(int aDimension,int aMaximum){
0126 //set maximum index for array with dimension dim
0127 if (aDimension < 0 || aDimension > 4) return;
0128 fMaxIndex[aDimension] = aMaximum;
0129 if (fArrayLength == 0) fArrayLength = aMaximum;
0130 else fArrayLength *= aMaximum;
0131 }
0132
0133 virtual void fullName(std::string& a_s) const {
0134 a_s = fName;
0135 for (int i=0;i<fArrayDim;i++) {
0136 char cdim[32];
0137 snpf(cdim,sizeof(cdim),"[%d]",fMaxIndex[i]);
0138 a_s += cdim;
0139 }
0140 }
0141 protected: //Named
0142 std::string fName;
0143 std::string fTitle;
0144 protected:
0145 int fType; //element type
0146 int fSize; //sizeof element
0147 int fArrayLength; //cumulative size of all array dims
0148 int fArrayDim; //number of array dimensions
0149 int fMaxIndex[5]; //Maximum array index for array dimension "dim"
0150 int fOffset; //!element offset in class
0151 //FIXME Int_t fNewType; //!new element type when reading
0152 std::string fTypeName; //Data type name of data member
0153 };
0154
0155 class streamer_base : public streamer_element {
0156 public: //ibo
0157 virtual const std::string& store_cls() const {
0158 static const std::string s_v("TStreamerBase");
0159 return s_v;
0160 }
0161 virtual bool stream(buffer& aBuffer) const {
0162 unsigned int c;
0163 if(!aBuffer.write_version(3,c)) return false;
0164 if(!streamer_element::stream(aBuffer)) return false;
0165 if(!aBuffer.write(fBaseVersion)) return false;
0166 if(!aBuffer.set_byte_count(c)) return false;
0167 return true;
0168 }
0169 public: //streamer_element
0170 virtual streamer_element* copy() const {return new streamer_base(*this);}
0171 public:
0172 streamer_base(const std::string& aName,const std::string& aTitle,int aOffset,int aBaseVersion)
0173 :streamer_element(aName,aTitle,aOffset,streamer__info::BASE,"BASE")
0174 ,fBaseVersion(aBaseVersion)
0175 {
0176 if (aName=="TObject") fType = streamer__info::TOBJECT;
0177 if (aName=="TNamed") fType = streamer__info::TNAMED;
0178 }
0179 virtual ~streamer_base(){}
0180 public:
0181 streamer_base(const streamer_base& a_from)
0182 :ibo(a_from)
0183 ,streamer_element(a_from)
0184 ,fBaseVersion(a_from.fBaseVersion)
0185 {}
0186 streamer_base& operator=(const streamer_base& a_from){
0187 streamer_element::operator=(a_from);
0188 fBaseVersion = a_from.fBaseVersion;
0189 return *this;
0190 }
0191 protected:
0192 int fBaseVersion; //version number of the base class
0193 };
0194
0195 class streamer_basic_type : public streamer_element {
0196 public: //ibo
0197 virtual const std::string& store_cls() const {
0198 static const std::string s_v("TStreamerBasicType");
0199 return s_v;
0200 }
0201 virtual bool stream(buffer& aBuffer) const {
0202 unsigned int c;
0203 if(!aBuffer.write_version(2,c)) return false;
0204 if(!streamer_element::stream(aBuffer)) return false;
0205 if(!aBuffer.set_byte_count(c)) return false;
0206 return true;
0207 }
0208 public: //streamer_element
0209 virtual streamer_element* copy() const {return new streamer_basic_type(*this);}
0210 public:
0211 streamer_basic_type(const std::string& aName,const std::string& aTitle,
0212 int aOffset,int aType,const std::string& aTypeName)
0213 :streamer_element(aName,aTitle,aOffset,aType,aTypeName)
0214 {}
0215 virtual ~streamer_basic_type(){}
0216 public:
0217 streamer_basic_type(const streamer_basic_type& a_from)
0218 :ibo(a_from),streamer_element(a_from)
0219 {}
0220 streamer_basic_type& operator=(const streamer_basic_type& a_from){
0221 streamer_element::operator=(a_from);
0222 return *this;
0223 }
0224 };
0225
0226 class streamer_short : public streamer_basic_type {
0227 public: //streamer_element
0228 virtual streamer_element* copy() const {return new streamer_short(*this);}
0229 public:
0230 streamer_short(const std::string& aName,const std::string& aTitle,int aOffset)
0231 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::SHORT,"Short_t")
0232 {}
0233 streamer_short(int& aOffset,const std::string& aName,const std::string& aTitle)
0234 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::SHORT,"Short_t")
0235 {
0236 aOffset += streamer__info::size_SHORT;
0237 }
0238 virtual ~streamer_short(){}
0239 public:
0240 streamer_short(const streamer_short& a_from):ibo(a_from),streamer_basic_type(a_from){}
0241 streamer_short& operator=(const streamer_short& a_from){streamer_basic_type::operator=(a_from);return *this;}
0242 };
0243
0244 class streamer_int : public streamer_basic_type {
0245 public: //streamer_element
0246 virtual streamer_element* copy() const {return new streamer_int(*this);}
0247 public:
0248 streamer_int(const std::string& aName,const std::string& aTitle,int aOffset)
0249 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::INT,"Int_t")
0250 {}
0251 streamer_int(int& aOffset,const std::string& aName,const std::string& aTitle)
0252 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::INT,"Int_t")
0253 {
0254 aOffset += streamer__info::size_INT;
0255 }
0256 virtual ~streamer_int(){}
0257 public:
0258 streamer_int(const streamer_int& a_from):ibo(a_from),streamer_basic_type(a_from){}
0259 streamer_int& operator=(const streamer_int& a_from){streamer_basic_type::operator=(a_from);return *this;}
0260 };
0261
0262 class streamer_uint : public streamer_basic_type {
0263 public: //streamer_element
0264 virtual streamer_element* copy() const {return new streamer_uint(*this);}
0265 public:
0266 streamer_uint(const std::string& aName,const std::string& aTitle,int aOffset)
0267 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_INT,"UInt_t")
0268 {}
0269 streamer_uint(int& aOffset,const std::string& aName,const std::string& aTitle)
0270 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_INT,"UInt_t")
0271 {
0272 aOffset += streamer__info::size_UINT;
0273 }
0274 virtual ~streamer_uint(){}
0275 public:
0276 streamer_uint(const streamer_uint& a_from):ibo(a_from),streamer_basic_type(a_from){}
0277 streamer_uint& operator=(const streamer_uint& a_from){streamer_basic_type::operator=(a_from);return *this;}
0278 };
0279
0280 class streamer_float : public streamer_basic_type {
0281 public: //streamer_element
0282 virtual streamer_element* copy() const {return new streamer_float(*this);}
0283 public:
0284 streamer_float(const std::string& aName,const std::string& aTitle,int aOffset)
0285 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::FLOAT,"Float_t")
0286 {}
0287 streamer_float(int& aOffset,const std::string& aName,const std::string& aTitle)
0288 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::FLOAT,"Float_t")
0289 {
0290 aOffset += streamer__info::size_FLOAT;
0291 }
0292 virtual ~streamer_float(){}
0293 public:
0294 streamer_float(const streamer_float& a_from):ibo(a_from),streamer_basic_type(a_from){}
0295 streamer_float& operator=(const streamer_float& a_from){streamer_basic_type::operator=(a_from);return *this;}
0296 };
0297
0298 class streamer_double : public streamer_basic_type {
0299 public: //streamer_element
0300 virtual streamer_element* copy() const {return new streamer_double(*this);}
0301 public:
0302 streamer_double(const std::string& aName,const std::string& aTitle,int aOffset)
0303 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Double_t")
0304 {}
0305 streamer_double(int& aOffset,const std::string& aName,const std::string& aTitle)
0306 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Double_t")
0307 {
0308 aOffset += streamer__info::size_DOUBLE;
0309 }
0310 virtual ~streamer_double(){}
0311 public:
0312 streamer_double(const streamer_double& a_from):ibo(a_from),streamer_basic_type(a_from){}
0313 streamer_double& operator=(const streamer_double& a_from){streamer_basic_type::operator=(a_from);return *this;}
0314 };
0315
0316 class streamer_stat_t : public streamer_basic_type {
0317 public: //streamer_element
0318 virtual streamer_element* copy() const {return new streamer_stat_t(*this);}
0319 public:
0320 streamer_stat_t(const std::string& aName,const std::string& aTitle,int aOffset)
0321 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Stat_t")
0322 {}
0323 streamer_stat_t(int& aOffset,const std::string& aName,const std::string& aTitle)
0324 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Stat_t")
0325 {
0326 aOffset += streamer__info::size_DOUBLE;
0327 }
0328 virtual ~streamer_stat_t(){}
0329 public:
0330 streamer_stat_t(const streamer_stat_t& a_from):ibo(a_from),streamer_basic_type(a_from){}
0331 streamer_stat_t& operator=(const streamer_stat_t& a_from){streamer_basic_type::operator=(a_from);return *this;}
0332 };
0333
0334 class streamer_bool : public streamer_basic_type {
0335 public: //streamer_element
0336 virtual streamer_element* copy() const {return new streamer_bool(*this);}
0337 public:
0338 streamer_bool(const std::string& aName,const std::string& aTitle,int aOffset)
0339 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_CHAR,"Bool_t")
0340 {}
0341 streamer_bool(int& aOffset,const std::string& aName,const std::string& aTitle)
0342 :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_CHAR,"Bool_t")
0343 {
0344 aOffset += streamer__info::size_BOOL;
0345 }
0346 virtual ~streamer_bool(){}
0347 public:
0348 streamer_bool(const streamer_bool& a_from):ibo(a_from),streamer_basic_type(a_from){}
0349 streamer_bool& operator=(const streamer_bool& a_from){streamer_basic_type::operator=(a_from);return *this;}
0350 };
0351
0352 class streamer_basic_pointer : public streamer_element {
0353 public: //ibo
0354 virtual const std::string& store_cls() const {
0355 static const std::string s_v("TStreamerBasicPointer");
0356 return s_v;
0357 }
0358 virtual bool stream(buffer& aBuffer) const {
0359 unsigned int c;
0360 if(!aBuffer.write_version(2,c)) return false;
0361 if(!streamer_element::stream(aBuffer)) return false;
0362 if(!aBuffer.write(fCountVersion)) return false;
0363 if(!aBuffer.write(fCountName)) return false;
0364 if(!aBuffer.write(fCountClass)) return false;
0365 if(!aBuffer.set_byte_count(c)) return false;
0366 return true;
0367 }
0368 public: //streamer_element
0369 virtual streamer_element* copy() const {return new streamer_basic_pointer(*this);}
0370 public:
0371 streamer_basic_pointer(const std::string& aName,const std::string& aTitle,
0372 int aOffset,int aType,
0373 const std::string& aCountName,
0374 const std::string& aCountClass,
0375 int aCountVersion,
0376 const std::string& aTypeName)
0377 :streamer_element(aName,aTitle,aOffset,aType+streamer__info::POINTER,aTypeName)
0378 ,fCountVersion(aCountVersion)
0379 ,fCountName(aCountName)
0380 ,fCountClass(aCountClass)
0381 {}
0382 virtual ~streamer_basic_pointer(){}
0383 public:
0384 streamer_basic_pointer(const streamer_basic_pointer& a_from)
0385 :ibo(a_from),streamer_element(a_from)
0386 ,fCountVersion(a_from.fCountVersion)
0387 ,fCountName(a_from.fCountName)
0388 ,fCountClass(a_from.fCountClass)
0389 {}
0390 streamer_basic_pointer& operator=(const streamer_basic_pointer& a_from){
0391 streamer_element::operator=(a_from);
0392 fCountVersion = a_from.fCountVersion;
0393 fCountName = a_from.fCountName;
0394 fCountClass = a_from.fCountClass;
0395 return *this;
0396 }
0397 protected:
0398 int fCountVersion; //version number of the class with the counter
0399 std::string fCountName; //name of data member holding the array count
0400 std::string fCountClass; //name of the class with the counter
0401 };
0402
0403 class streamer_string : public streamer_element {
0404 public: //ibo
0405 virtual const std::string& store_cls() const {
0406 static const std::string s_v("TStreamerString");
0407 return s_v;
0408 }
0409 virtual bool stream(buffer& aBuffer) const {
0410 unsigned int c;
0411 if(!aBuffer.write_version(2,c)) return false;
0412 if(!streamer_element::stream(aBuffer)) return false;
0413 if(!aBuffer.set_byte_count(c)) return false;
0414 return true;
0415 }
0416 public: //streamer_element
0417 virtual streamer_element* copy() const {return new streamer_string(*this);}
0418 public:
0419 streamer_string(const std::string& aName,const std::string& aTitle,int aOffset)
0420 :streamer_element(aName,aTitle,aOffset,streamer__info::_TSTRING,"TString")
0421 {}
0422 streamer_string(int& aOffset,const std::string& aName,const std::string& aTitle)
0423 :streamer_element(aName,aTitle,aOffset,streamer__info::_TSTRING,"TString")
0424 {
0425 aOffset += streamer__info::size_TString;
0426 }
0427 virtual ~streamer_string(){}
0428 public:
0429 streamer_string(const streamer_string& a_from):ibo(a_from),streamer_element(a_from){}
0430 streamer_string& operator=(const streamer_string& a_from){streamer_element::operator=(a_from);return *this;}
0431 };
0432
0433
0434 class streamer_object : public streamer_element {
0435 public: //ibo
0436 virtual const std::string& store_cls() const {
0437 static const std::string s_v("TStreamerObject");
0438 return s_v;
0439 }
0440 virtual bool stream(buffer& aBuffer) const {
0441 unsigned int c;
0442 if(!aBuffer.write_version(2,c)) return false;
0443 if(!streamer_element::stream(aBuffer)) return false;
0444 if(!aBuffer.set_byte_count(c)) return false;
0445 return true;
0446 }
0447 public: //streamer_element
0448 virtual streamer_element* copy() const {return new streamer_object(*this);}
0449 public:
0450 streamer_object(const std::string& aName,const std::string& aTitle,int aOffset,const std::string& aTypeName)
0451 :streamer_element(aName,aTitle,aOffset,0,aTypeName){
0452 fType = streamer__info::OBJECT;
0453 if (aName=="TObject") fType = streamer__info::TOBJECT;
0454 if (aName=="TNamed") fType = streamer__info::TNAMED;
0455 }
0456 virtual ~streamer_object(){}
0457 public:
0458 streamer_object(const streamer_object& a_from):ibo(a_from),streamer_element(a_from){}
0459 streamer_object& operator=(const streamer_object& a_from){
0460 streamer_element::operator=(a_from);
0461 return *this;
0462 }
0463 };
0464
0465 class streamer_object_pointer : public streamer_element {
0466 public: //ibo
0467 virtual const std::string& store_cls() const {
0468 static const std::string s_v("TStreamerObjectPointer");
0469 return s_v;
0470 }
0471 virtual bool stream(buffer& aBuffer) const {
0472 unsigned int c;
0473 if(!aBuffer.write_version(2,c)) return false;
0474 if(!streamer_element::stream(aBuffer)) return false;
0475 if(!aBuffer.set_byte_count(c)) return false;
0476 return true;
0477 }
0478 public: //streamer_element
0479 virtual streamer_element* copy() const {return new streamer_object_pointer(*this);}
0480 public:
0481 streamer_object_pointer(const std::string& aName,const std::string& aTitle,
0482 int aOffset,const std::string& aTypeName)
0483 :streamer_element(aName,aTitle,aOffset,streamer__info::OBJECT_POINTER,aTypeName){
0484 if(aTitle.substr(0,2)=="->") fType = streamer__info::OBJECT_ARROW;
0485 }
0486 virtual ~streamer_object_pointer(){}
0487 public:
0488 streamer_object_pointer(const streamer_object_pointer& a_from):ibo(a_from),streamer_element(a_from){}
0489 streamer_object_pointer& operator=(const streamer_object_pointer& a_from){
0490 streamer_element::operator=(a_from);
0491 return *this;
0492 }
0493 };
0494
0495 class streamer_object_any : public streamer_element {
0496 public: //ibo
0497 virtual const std::string& store_cls() const {
0498 static const std::string s_v("TStreamerObjectAny");
0499 return s_v;
0500 }
0501 virtual bool stream(buffer& aBuffer) const {
0502 unsigned int c;
0503 if(!aBuffer.write_version(2,c)) return false;
0504 if(!streamer_element::stream(aBuffer)) return false;
0505 if(!aBuffer.set_byte_count(c)) return false;
0506 return true;
0507 }
0508 public: //streamer_element
0509 virtual streamer_element* copy() const {return new streamer_object_any(*this);}
0510 public:
0511 streamer_object_any(const std::string& aName,const std::string& aTitle,
0512 int aOffset,const std::string& aTypeName)
0513 :streamer_element(aName,aTitle,aOffset,streamer__info::OBJECT_ANY,aTypeName)
0514 {}
0515 virtual ~streamer_object_any(){}
0516 public:
0517 streamer_object_any(const streamer_object_any& a_from):ibo(a_from),streamer_element(a_from){}
0518 streamer_object_any& operator=(const streamer_object_any& a_from){
0519 streamer_element::operator=(a_from);
0520 return *this;
0521 }
0522 };
0523
0524
0525 class streamer_STL : public streamer_element {
0526 public: //ibo
0527 virtual const std::string& store_cls() const {
0528 static const std::string s_v("TStreamerSTL");
0529 return s_v;
0530 }
0531 virtual bool stream(buffer& aBuffer) const {
0532 unsigned int c;
0533 if(!aBuffer.write_version(2,c)) return false;
0534 if(!streamer_element::stream(aBuffer)) return false;
0535 if(!aBuffer.write(fSTLtype)) return false;
0536 if(!aBuffer.write(fCtype)) return false;
0537 if(!aBuffer.set_byte_count(c)) return false;
0538 return true;
0539 }
0540 public: //streamer_element
0541 virtual streamer_element* copy() const {return new streamer_STL(*this);}
0542 protected:
0543 enum ESTLtype { kSTL = 300, kSTLstring =365, kSTLvector = 1,
0544 kSTLlist = 2, kSTLdeque = 3, kSTLmap = 4,
0545 kSTLset = 5, kSTLmultimap=6, kSTLmultiset=7};
0546
0547 // Instead of EDataType, we use the streamer__info::Type.
0548 //enum EDataType {
0549 // kChar_t = 1, kUChar_t = 11, kShort_t = 2, kUShort_t = 12,
0550 // kInt_t = 3, kUInt_t = 13, kLong_t = 4, kULong_t = 14,
0551 // kFloat_t = 5, kDouble_t = 8, kchar = 10, kOther_t = -1
0552 //};
0553 public:
0554 streamer_STL(const std::string& aName,const std::string& aTitle,
0555 int aOffset,
0556 streamer__info::Type aType, //Must match TDataType/EDataType
0557 const std::string& aTypeName)
0558 :streamer_element(aName,aTitle,aOffset,kSTL,aTypeName){
0559 fSTLtype = kSTLvector;
0560 fCtype = aType;
0561 }
0562 virtual ~streamer_STL(){}
0563 public:
0564 streamer_STL(const streamer_STL& a_from)
0565 :ibo(a_from),streamer_element(a_from)
0566 ,fSTLtype(a_from.fSTLtype)
0567 ,fCtype(a_from.fCtype)
0568 {}
0569 streamer_STL& operator=(const streamer_STL& a_from){
0570 streamer_element::operator=(a_from);
0571 fSTLtype = a_from.fSTLtype;
0572 fCtype = a_from.fCtype;
0573 return *this;
0574 }
0575 protected:
0576 int fSTLtype; //type of STL vector
0577 int fCtype; //STL contained type
0578 };
0579
0580 }}
0581
0582 #endif