g4tools  5.4.0
element
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_wroot_element
5 #define tools_wroot_element
6 
7 #include "buffer"
8 #include "named"
9 #include "../snpf"
10 
11 namespace tools {
12 namespace wroot {
13 
14 namespace streamer__info {
15 
16  enum Type { // sizeof :
17  BASE = 0, // x
18  ARRAY = 20, // ?
19  POINTER = 40, // 4
20  POINTER_INT = 43, // 4
21  POINTER_FLOAT = 45, // 4
22  POINTER_DOUBLE = 48, // 4
23  COUNTER = 6, // 4
24  CHAR = 1, // 1
25  SHORT = 2, // 2
26  INT = 3, // 4
27  FLOAT = 5, // 4
28  DOUBLE = 8, // 8
29  UNSIGNED_CHAR = 11, // 1
30  UNSIGNED_SHORT = 12, // 2
31  UNSIGNED_INT = 13, // 4
32  BOOL = 18, // 1 ?
33  OBJECT = 61, // ?
34  OBJECT_ANY = 62, // ?
35  OBJECT_ARROW = 63, // ?
36  OBJECT_POINTER = 64, // ?
37  _TSTRING = 65, // 8 //NOTE : TSTRING clashes with a cpp macro in cfitsio.
38  TOBJECT = 66, // 12
39  TNAMED = 67 // 28
40  };
41 
42  const int size_FLOAT = 4;
43  const int size_DOUBLE = 8;
44  const int size_INT = 4;
45  const int size_UINT = 4;
46  const int size_SHORT = 2;
47  const int size_BOOL = 4; //(Bool_t = 1 + 3 for alignement)
48  //uuu ? const int size_BOOL = 1;
49 
50  const int size_TString = 8;
51 }
52 
53 
54 class streamer_element : public virtual ibo {
55  static const std::string& s_class() {
56  static const std::string s_v("tools::wroot::streamer_element");
57  return s_v;
58  }
59 public: //ibo
60  virtual const std::string& store_cls() const {
61  static const std::string s_v("TStreamerElement");
62  return s_v;
63  }
64  virtual bool stream(buffer& aBuffer) const {
65  unsigned int c;
66  if(!aBuffer.write_version(2,c)) return false;
67  if(!Named_stream(aBuffer,fName,fTitle)) return false;
68  if(!aBuffer.write(fType)) return false;
69  if(!aBuffer.write(fSize)) return false;
70  if(!aBuffer.write(fArrayLength)) return false;
71  if(!aBuffer.write(fArrayDim)) return false;
72  if(!aBuffer.write_fast_array<int>(fMaxIndex,5)) return false;
73  if(!aBuffer.write(fTypeName)) return false;
74  if(!aBuffer.set_byte_count(c)) return false;
75  return true;
76  }
77 public:
78  virtual streamer_element* copy() const = 0;
79 public:
80  virtual void out(std::ostream& aOut) const {
81  std::string _fname;
82  fullName(_fname);
83  char s[256];
84  snpf(s,sizeof(s)," %-14s%-15s offset=%3d type=%2d %-20s",fTypeName.c_str(),_fname.c_str(),fOffset,fType,fTitle.c_str());
85  aOut << s << std::endl;
86  }
87 public:
88  streamer_element(const std::string& aName,const std::string& aTitle,
89  int aOffset,int aType,const std::string& aTypeName)
90  :fName(aName),fTitle(aTitle),fType(aType)
91  ,fSize(0),fArrayLength(0),fArrayDim(0),fOffset(aOffset)
92  ,fTypeName(aTypeName){
93 #ifdef TOOLS_MEM
94  mem::increment(s_class().c_str());
95 #endif
96  for(int i=0;i<5;i++) fMaxIndex[i] = 0;
97  }
98  virtual ~streamer_element(){
99 #ifdef TOOLS_MEM
100  mem::decrement(s_class().c_str());
101 #endif
102  }
103 protected:
105  :ibo(a_from)
106  ,fName(a_from.fName),fTitle(a_from.fTitle)
107  ,fType(a_from.fType),fSize(a_from.fSize)
108  ,fArrayLength(a_from.fArrayLength)
109  ,fArrayDim(a_from.fArrayDim),fOffset(a_from.fOffset)
110  ,fTypeName(a_from.fTypeName){
111 #ifdef TOOLS_MEM
112  mem::increment(s_class().c_str());
113 #endif
114  for(int i=0;i<5;i++) fMaxIndex[i] = a_from.fMaxIndex[i];
115  }
117  fName = a_from.fName;
118  fTitle = a_from.fTitle;
119  fType = a_from.fType;
120  fSize = a_from.fSize;
121  fArrayLength = a_from.fArrayLength;
122  fArrayDim = a_from.fArrayDim;
123  fOffset = a_from.fOffset;
124  fTypeName = a_from.fTypeName;
125  for(int i=0;i<5;i++) fMaxIndex[i] = a_from.fMaxIndex[i];
126  return *this;
127  }
128 public:
129  virtual void setArrayDimension(int aDimension){
130  fArrayDim = aDimension;
131  if(aDimension) fType += streamer__info::ARRAY;
132  //fNewType = fType;
133  }
134  virtual void setMaxIndex(int aDimension,int aMaximum){
135  //set maximum index for array with dimension dim
136  if (aDimension < 0 || aDimension > 4) return;
137  fMaxIndex[aDimension] = aMaximum;
138  if (fArrayLength == 0) fArrayLength = aMaximum;
139  else fArrayLength *= aMaximum;
140  }
141 
142  virtual void fullName(std::string& a_s) const {
143  a_s = fName;
144  for (int i=0;i<fArrayDim;i++) {
145  char cdim[32];
146  snpf(cdim,sizeof(cdim),"[%d]",fMaxIndex[i]);
147  a_s += cdim;
148  }
149  }
150 protected: //Named
151  std::string fName;
152  std::string fTitle;
153 protected:
154  int fType; //element type
155  int fSize; //sizeof element
156  int fArrayLength; //cumulative size of all array dims
157  int fArrayDim; //number of array dimensions
158  int fMaxIndex[5]; //Maximum array index for array dimension "dim"
159  int fOffset;
160  //FIXME Int_t fNewType; //!new element type when reading
161  std::string fTypeName; //Data type name of data member
162 };
163 
165 public: //ibo
166  virtual const std::string& store_cls() const {
167  static const std::string s_v("TStreamerBase");
168  return s_v;
169  }
170  virtual bool stream(buffer& aBuffer) const {
171  unsigned int c;
172  if(!aBuffer.write_version(3,c)) return false;
173  if(!streamer_element::stream(aBuffer)) return false;
174  if(!aBuffer.write(fBaseVersion)) return false;
175  if(!aBuffer.set_byte_count(c)) return false;
176  return true;
177  }
178 public: //streamer_element
179  virtual streamer_element* copy() const {return new streamer_base(*this);}
180 public:
181  streamer_base(const std::string& aName,const std::string& aTitle,int aOffset,int aBaseVersion)
182  :streamer_element(aName,aTitle,aOffset,streamer__info::BASE,"BASE")
183  ,fBaseVersion(aBaseVersion)
184  {
185  if (aName=="TObject") fType = streamer__info::TOBJECT;
186  if (aName=="TNamed") fType = streamer__info::TNAMED;
187  }
188  virtual ~streamer_base(){}
189 public:
191  :ibo(a_from)
192  ,streamer_element(a_from)
193  ,fBaseVersion(a_from.fBaseVersion)
194  {}
197  fBaseVersion = a_from.fBaseVersion;
198  return *this;
199  }
200 protected:
201  int fBaseVersion; //version number of the base class
202 };
203 
205 public: //ibo
206  virtual const std::string& store_cls() const {
207  static const std::string s_v("TStreamerBasicType");
208  return s_v;
209  }
210  virtual bool stream(buffer& aBuffer) const {
211  unsigned int c;
212  if(!aBuffer.write_version(2,c)) return false;
213  if(!streamer_element::stream(aBuffer)) return false;
214  if(!aBuffer.set_byte_count(c)) return false;
215  return true;
216  }
217 public: //streamer_element
218  virtual streamer_element* copy() const {return new streamer_basic_type(*this);}
219 public:
220  streamer_basic_type(const std::string& aName,const std::string& aTitle,
221  int aOffset,int aType,const std::string& aTypeName)
222  :streamer_element(aName,aTitle,aOffset,aType,aTypeName)
223  {}
225 public:
227  :ibo(a_from),streamer_element(a_from)
228  {}
231  return *this;
232  }
233 };
234 
236 public: //streamer_element
237  virtual streamer_element* copy() const {return new streamer_short(*this);}
238 public:
239  streamer_short(const std::string& aName,const std::string& aTitle,int aOffset)
240  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::SHORT,"Short_t")
241  {}
242  streamer_short(int& aOffset,const std::string& aName,const std::string& aTitle)
243  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::SHORT,"Short_t")
244  {
245  aOffset += streamer__info::size_SHORT;
246  }
247  virtual ~streamer_short(){}
248 public:
249  streamer_short(const streamer_short& a_from):ibo(a_from),streamer_basic_type(a_from){}
251 };
252 
254 public: //streamer_element
255  virtual streamer_element* copy() const {return new streamer_int(*this);}
256 public:
257  streamer_int(const std::string& aName,const std::string& aTitle,int aOffset)
258  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::INT,"Int_t")
259  {}
260  streamer_int(int& aOffset,const std::string& aName,const std::string& aTitle)
261  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::INT,"Int_t")
262  {
263  aOffset += streamer__info::size_INT;
264  }
265  virtual ~streamer_int(){}
266 public:
267  streamer_int(const streamer_int& a_from):ibo(a_from),streamer_basic_type(a_from){}
268  streamer_int& operator=(const streamer_int& a_from){streamer_basic_type::operator=(a_from);return *this;}
269 };
270 
272 public: //streamer_element
273  virtual streamer_element* copy() const {return new streamer_uint(*this);}
274 public:
275  streamer_uint(const std::string& aName,const std::string& aTitle,int aOffset)
276  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_INT,"UInt_t")
277  {}
278  streamer_uint(int& aOffset,const std::string& aName,const std::string& aTitle)
279  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_INT,"UInt_t")
280  {
281  aOffset += streamer__info::size_UINT;
282  }
283  virtual ~streamer_uint(){}
284 public:
285  streamer_uint(const streamer_uint& a_from):ibo(a_from),streamer_basic_type(a_from){}
287 };
288 
290 public: //streamer_element
291  virtual streamer_element* copy() const {return new streamer_float(*this);}
292 public:
293  streamer_float(const std::string& aName,const std::string& aTitle,int aOffset)
294  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::FLOAT,"Float_t")
295  {}
296  streamer_float(int& aOffset,const std::string& aName,const std::string& aTitle)
297  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::FLOAT,"Float_t")
298  {
299  aOffset += streamer__info::size_FLOAT;
300  }
301  virtual ~streamer_float(){}
302 public:
303  streamer_float(const streamer_float& a_from):ibo(a_from),streamer_basic_type(a_from){}
305 };
306 
308 public: //streamer_element
309  virtual streamer_element* copy() const {return new streamer_double(*this);}
310 public:
311  streamer_double(const std::string& aName,const std::string& aTitle,int aOffset)
312  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Double_t")
313  {}
314  streamer_double(int& aOffset,const std::string& aName,const std::string& aTitle)
315  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Double_t")
316  {
317  aOffset += streamer__info::size_DOUBLE;
318  }
319  virtual ~streamer_double(){}
320 public:
321  streamer_double(const streamer_double& a_from):ibo(a_from),streamer_basic_type(a_from){}
323 };
324 
326 public: //streamer_element
327  virtual streamer_element* copy() const {return new streamer_stat_t(*this);}
328 public:
329  streamer_stat_t(const std::string& aName,const std::string& aTitle,int aOffset)
330  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Stat_t")
331  {}
332  streamer_stat_t(int& aOffset,const std::string& aName,const std::string& aTitle)
333  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::DOUBLE,"Stat_t")
334  {
335  aOffset += streamer__info::size_DOUBLE;
336  }
337  virtual ~streamer_stat_t(){}
338 public:
339  streamer_stat_t(const streamer_stat_t& a_from):ibo(a_from),streamer_basic_type(a_from){}
341 };
342 
344 public: //streamer_element
345  virtual streamer_element* copy() const {return new streamer_bool(*this);}
346 public:
347  streamer_bool(const std::string& aName,const std::string& aTitle,int aOffset)
348  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_CHAR,"Bool_t")
349  {}
350  streamer_bool(int& aOffset,const std::string& aName,const std::string& aTitle)
351  :streamer_basic_type(aName,aTitle,aOffset,streamer__info::UNSIGNED_CHAR,"Bool_t")
352  {
353  aOffset += streamer__info::size_BOOL;
354  }
355  virtual ~streamer_bool(){}
356 public:
357  streamer_bool(const streamer_bool& a_from):ibo(a_from),streamer_basic_type(a_from){}
359 };
360 
362 public: //ibo
363  virtual const std::string& store_cls() const {
364  static const std::string s_v("TStreamerBasicPointer");
365  return s_v;
366  }
367  virtual bool stream(buffer& aBuffer) const {
368  unsigned int c;
369  if(!aBuffer.write_version(2,c)) return false;
370  if(!streamer_element::stream(aBuffer)) return false;
371  if(!aBuffer.write(fCountVersion)) return false;
372  if(!aBuffer.write(fCountName)) return false;
373  if(!aBuffer.write(fCountClass)) return false;
374  if(!aBuffer.set_byte_count(c)) return false;
375  return true;
376  }
377 public: //streamer_element
378  virtual streamer_element* copy() const {return new streamer_basic_pointer(*this);}
379 public:
380  streamer_basic_pointer(const std::string& aName,const std::string& aTitle,
381  int aOffset,int aType,
382  const std::string& aCountName,
383  const std::string& aCountClass,
384  int aCountVersion,
385  const std::string& aTypeName)
386  :streamer_element(aName,aTitle,aOffset,aType+streamer__info::POINTER,aTypeName)
387  ,fCountVersion(aCountVersion)
388  ,fCountName(aCountName)
389  ,fCountClass(aCountClass)
390  {}
392 public:
394  :ibo(a_from),streamer_element(a_from)
396  ,fCountName(a_from.fCountName)
397  ,fCountClass(a_from.fCountClass)
398  {}
401  fCountVersion = a_from.fCountVersion;
402  fCountName = a_from.fCountName;
403  fCountClass = a_from.fCountClass;
404  return *this;
405  }
406 protected:
407  int fCountVersion; //version number of the class with the counter
408  std::string fCountName; //name of data member holding the array count
409  std::string fCountClass; //name of the class with the counter
410 };
411 
413 public: //ibo
414  virtual const std::string& store_cls() const {
415  static const std::string s_v("TStreamerString");
416  return s_v;
417  }
418  virtual bool stream(buffer& aBuffer) const {
419  unsigned int c;
420  if(!aBuffer.write_version(2,c)) return false;
421  if(!streamer_element::stream(aBuffer)) return false;
422  if(!aBuffer.set_byte_count(c)) return false;
423  return true;
424  }
425 public: //streamer_element
426  virtual streamer_element* copy() const {return new streamer_string(*this);}
427 public:
428  streamer_string(const std::string& aName,const std::string& aTitle,int aOffset)
429  :streamer_element(aName,aTitle,aOffset,streamer__info::_TSTRING,"TString")
430  {}
431  streamer_string(int& aOffset,const std::string& aName,const std::string& aTitle)
432  :streamer_element(aName,aTitle,aOffset,streamer__info::_TSTRING,"TString")
433  {
434  aOffset += streamer__info::size_TString;
435  }
436  virtual ~streamer_string(){}
437 public:
438  streamer_string(const streamer_string& a_from):ibo(a_from),streamer_element(a_from){}
440 };
441 
442 
444 public: //ibo
445  virtual const std::string& store_cls() const {
446  static const std::string s_v("TStreamerObject");
447  return s_v;
448  }
449  virtual bool stream(buffer& aBuffer) const {
450  unsigned int c;
451  if(!aBuffer.write_version(2,c)) return false;
452  if(!streamer_element::stream(aBuffer)) return false;
453  if(!aBuffer.set_byte_count(c)) return false;
454  return true;
455  }
456 public: //streamer_element
457  virtual streamer_element* copy() const {return new streamer_object(*this);}
458 public:
459  streamer_object(const std::string& aName,const std::string& aTitle,int aOffset,const std::string& aTypeName)
460  :streamer_element(aName,aTitle,aOffset,0,aTypeName){
462  if (aName=="TObject") fType = streamer__info::TOBJECT;
463  if (aName=="TNamed") fType = streamer__info::TNAMED;
464  }
465  virtual ~streamer_object(){}
466 public:
467  streamer_object(const streamer_object& a_from):ibo(a_from),streamer_element(a_from){}
470  return *this;
471  }
472 };
473 
475 public: //ibo
476  virtual const std::string& store_cls() const {
477  static const std::string s_v("TStreamerObjectPointer");
478  return s_v;
479  }
480  virtual bool stream(buffer& aBuffer) const {
481  unsigned int c;
482  if(!aBuffer.write_version(2,c)) return false;
483  if(!streamer_element::stream(aBuffer)) return false;
484  if(!aBuffer.set_byte_count(c)) return false;
485  return true;
486  }
487 public: //streamer_element
488  virtual streamer_element* copy() const {return new streamer_object_pointer(*this);}
489 public:
490  streamer_object_pointer(const std::string& aName,const std::string& aTitle,
491  int aOffset,const std::string& aTypeName)
492  :streamer_element(aName,aTitle,aOffset,streamer__info::OBJECT_POINTER,aTypeName){
493  if(aTitle.substr(0,2)=="->") fType = streamer__info::OBJECT_ARROW;
494  }
496 public:
500  return *this;
501  }
502 };
503 
505 public: //ibo
506  virtual const std::string& store_cls() const {
507  static const std::string s_v("TStreamerObjectAny");
508  return s_v;
509  }
510  virtual bool stream(buffer& aBuffer) const {
511  unsigned int c;
512  if(!aBuffer.write_version(2,c)) return false;
513  if(!streamer_element::stream(aBuffer)) return false;
514  if(!aBuffer.set_byte_count(c)) return false;
515  return true;
516  }
517 public: //streamer_element
518  virtual streamer_element* copy() const {return new streamer_object_any(*this);}
519 public:
520  streamer_object_any(const std::string& aName,const std::string& aTitle,
521  int aOffset,const std::string& aTypeName)
522  :streamer_element(aName,aTitle,aOffset,streamer__info::OBJECT_ANY,aTypeName)
523  {}
525 public:
529  return *this;
530  }
531 };
532 
533 
535 public: //ibo
536  virtual const std::string& store_cls() const {
537  static const std::string s_v("TStreamerSTL");
538  return s_v;
539  }
540  virtual bool stream(buffer& aBuffer) const {
541  unsigned int c;
542  if(!aBuffer.write_version(2,c)) return false;
543  if(!streamer_element::stream(aBuffer)) return false;
544  if(!aBuffer.write(fSTLtype)) return false;
545  if(!aBuffer.write(fCtype)) return false;
546  if(!aBuffer.set_byte_count(c)) return false;
547  return true;
548  }
549 public: //streamer_element
550  virtual streamer_element* copy() const {return new streamer_STL(*this);}
551 protected:
552  enum ESTLtype { kSTL = 300, kSTLstring =365, kSTLvector = 1,
553  kSTLlist = 2, kSTLdeque = 3, kSTLmap = 4,
555 
556  // Instead of EDataType, we use the streamer__info::Type.
557  //enum EDataType {
558  // kChar_t = 1, kUChar_t = 11, kShort_t = 2, kUShort_t = 12,
559  // kInt_t = 3, kUInt_t = 13, kLong_t = 4, kULong_t = 14,
560  // kFloat_t = 5, kDouble_t = 8, kchar = 10, kOther_t = -1
561  //};
562 public:
563  streamer_STL(const std::string& aName,const std::string& aTitle,
564  int aOffset,
565  streamer__info::Type aType, //Must match TDataType/EDataType
566  const std::string& aTypeName)
567  :streamer_element(aName,aTitle,aOffset,kSTL,aTypeName){
569  fCtype = aType;
570  }
571  virtual ~streamer_STL(){}
572 public:
573  streamer_STL(const streamer_STL& a_from)
574  :ibo(a_from),streamer_element(a_from)
575  ,fSTLtype(a_from.fSTLtype)
576  ,fCtype(a_from.fCtype)
577  {}
580  fSTLtype = a_from.fSTLtype;
581  fCtype = a_from.fCtype;
582  return *this;
583  }
584 protected:
585  int fSTLtype; //type of STL vector
586  int fCtype; //STL contained type
587 };
588 
589 }}
590 
591 #endif
tools::wroot::streamer_object_pointer::~streamer_object_pointer
virtual ~streamer_object_pointer()
Definition: element:495
tools::wroot::streamer__info::size_BOOL
const int size_BOOL
Definition: element:47
tools::wroot::streamer_STL::kSTLmap
@ kSTLmap
Definition: element:553
tools::wroot::streamer_STL::kSTL
@ kSTL
Definition: element:552
tools::wroot::streamer_short::copy
virtual streamer_element * copy() const
Definition: element:237
tools::wroot::streamer__info::OBJECT_POINTER
@ OBJECT_POINTER
Definition: element:36
tools::wroot::streamer_object_any::~streamer_object_any
virtual ~streamer_object_any()
Definition: element:524
tools::wroot::streamer_basic_pointer::fCountName
std::string fCountName
Definition: element:408
tools::wroot::streamer_basic_pointer::copy
virtual streamer_element * copy() const
Definition: element:378
tools::wroot::streamer_string::~streamer_string
virtual ~streamer_string()
Definition: element:436
tools::wroot::streamer_float::streamer_float
streamer_float(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:296
tools::wroot::streamer_double::streamer_double
streamer_double(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:314
tools::wroot::streamer_double::~streamer_double
virtual ~streamer_double()
Definition: element:319
tools::wroot::streamer_object::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:449
tools::wroot::streamer__info::size_SHORT
const int size_SHORT
Definition: element:46
tools::wroot::streamer_basic_pointer::~streamer_basic_pointer
virtual ~streamer_basic_pointer()
Definition: element:391
tools::wroot::streamer_basic_type::copy
virtual streamer_element * copy() const
Definition: element:218
tools::wroot::streamer_bool::streamer_bool
streamer_bool(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:350
tools::wroot::streamer_basic_type::streamer_basic_type
streamer_basic_type(const streamer_basic_type &a_from)
Definition: element:226
tools::wroot::streamer_element::fTitle
std::string fTitle
Definition: element:152
tools::wroot::streamer_bool::copy
virtual streamer_element * copy() const
Definition: element:345
tools::wroot::streamer__info::size_TString
const int size_TString
Definition: element:50
tools::wroot::streamer_bool::operator=
streamer_bool & operator=(const streamer_bool &a_from)
Definition: element:358
tools::wroot::streamer_basic_type::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:210
tools::wroot::streamer_base::fBaseVersion
int fBaseVersion
Definition: element:201
tools::wroot::streamer__info::POINTER_DOUBLE
@ POINTER_DOUBLE
Definition: element:22
tools::wroot::streamer_short::streamer_short
streamer_short(const streamer_short &a_from)
Definition: element:249
tools::wroot::streamer_basic_pointer::fCountVersion
int fCountVersion
Definition: element:407
tools::wroot::streamer__info::TNAMED
@ TNAMED
Definition: element:39
tools::wroot::streamer_basic_type
Definition: element:204
tools::wroot::streamer_element::setMaxIndex
virtual void setMaxIndex(int aDimension, int aMaximum)
Definition: element:134
tools::wroot::streamer_double
Definition: element:307
tools::wroot::streamer_basic_pointer::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:367
tools::wroot::streamer_basic_pointer::streamer_basic_pointer
streamer_basic_pointer(const streamer_basic_pointer &a_from)
Definition: element:393
tools::wroot::streamer_basic_pointer::store_cls
virtual const std::string & store_cls() const
Definition: element:363
tools::wroot::streamer_uint::copy
virtual streamer_element * copy() const
Definition: element:273
tools::wroot::streamer_element::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:64
tools::wroot::streamer_element
Definition: element:54
tools::wroot::streamer_object::store_cls
virtual const std::string & store_cls() const
Definition: element:445
tools::wroot::streamer_uint::streamer_uint
streamer_uint(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:275
tools::wroot::streamer_int::copy
virtual streamer_element * copy() const
Definition: element:255
tools::wroot::streamer_basic_type::~streamer_basic_type
virtual ~streamer_basic_type()
Definition: element:224
buffer
tools::wroot::streamer_object_pointer::streamer_object_pointer
streamer_object_pointer(const streamer_object_pointer &a_from)
Definition: element:497
tools::wroot::streamer_float::copy
virtual streamer_element * copy() const
Definition: element:291
tools::wroot::streamer__info::COUNTER
@ COUNTER
Definition: element:23
tools::wroot::streamer_int::streamer_int
streamer_int(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:257
tools::wroot::streamer__info::size_INT
const int size_INT
Definition: element:44
tools::wroot::streamer__info::POINTER
@ POINTER
Definition: element:19
tools::wroot::ibo
Definition: ibo:17
tools::wroot::streamer_object::copy
virtual streamer_element * copy() const
Definition: element:457
tools::wroot::streamer_bool::streamer_bool
streamer_bool(const streamer_bool &a_from)
Definition: element:357
tools::wroot::streamer_object_any::store_cls
virtual const std::string & store_cls() const
Definition: element:506
tools::wroot::streamer_STL::ESTLtype
ESTLtype
Definition: element:552
tools::wroot::streamer_basic_type::operator=
streamer_basic_type & operator=(const streamer_basic_type &a_from)
Definition: element:229
tools::wroot::streamer_stat_t::streamer_stat_t
streamer_stat_t(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:332
tools::wroot::streamer_bool::~streamer_bool
virtual ~streamer_bool()
Definition: element:355
tools::wroot::streamer_float
Definition: element:289
tools::wroot::streamer_object_any::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:510
tools::wroot::streamer_element::streamer_element
streamer_element(const streamer_element &a_from)
Definition: element:104
tools::wroot::streamer_element::out
virtual void out(std::ostream &aOut) const
Definition: element:80
tools::wroot::streamer_short::streamer_short
streamer_short(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:239
tools::wroot::streamer_double::copy
virtual streamer_element * copy() const
Definition: element:309
tools::wroot::streamer_object_any::streamer_object_any
streamer_object_any(const streamer_object_any &a_from)
Definition: element:526
tools::wroot::streamer_STL::kSTLset
@ kSTLset
Definition: element:554
tools::wroot::streamer_bool::streamer_bool
streamer_bool(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:347
tools::wroot::streamer_double::operator=
streamer_double & operator=(const streamer_double &a_from)
Definition: element:322
tools::wroot::streamer_uint::streamer_uint
streamer_uint(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:278
tools::wroot::streamer_object_pointer::streamer_object_pointer
streamer_object_pointer(const std::string &aName, const std::string &aTitle, int aOffset, const std::string &aTypeName)
Definition: element:490
tools::wroot::streamer_element::fArrayDim
int fArrayDim
Definition: element:157
named
tools::wroot::streamer_STL::~streamer_STL
virtual ~streamer_STL()
Definition: element:571
tools::wroot::streamer_object_pointer::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:480
tools::wroot::buffer::set_byte_count
bool set_byte_count(uint32 a_pos)
Definition: buffer:199
tools::wroot::streamer_string::streamer_string
streamer_string(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:431
tools::wroot::streamer_float::streamer_float
streamer_float(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:293
tools::wroot::streamer__info::DOUBLE
@ DOUBLE
Definition: element:28
tools::wroot::streamer_short::~streamer_short
virtual ~streamer_short()
Definition: element:247
tools::wroot::streamer_STL::kSTLstring
@ kSTLstring
Definition: element:552
tools::wroot::streamer_base::store_cls
virtual const std::string & store_cls() const
Definition: element:166
tools::wroot::streamer_object
Definition: element:443
tools::wroot::streamer__info::SHORT
@ SHORT
Definition: element:25
tools::wroot::streamer_string::store_cls
virtual const std::string & store_cls() const
Definition: element:414
tools::wroot::streamer_stat_t::streamer_stat_t
streamer_stat_t(const streamer_stat_t &a_from)
Definition: element:339
tools::wroot::streamer_object_any::operator=
streamer_object_any & operator=(const streamer_object_any &a_from)
Definition: element:527
tools::wroot::streamer_short
Definition: element:235
tools::wroot::Named_stream
bool Named_stream(buffer &a_buffer, const std::string &a_name, const std::string &a_title)
Definition: named:23
tools::wroot::streamer_element::~streamer_element
virtual ~streamer_element()
Definition: element:98
tools::wroot::streamer__info::OBJECT
@ OBJECT
Definition: element:33
tools::wroot::streamer_STL::operator=
streamer_STL & operator=(const streamer_STL &a_from)
Definition: element:578
tools::wroot::streamer_float::operator=
streamer_float & operator=(const streamer_float &a_from)
Definition: element:304
tools::wroot::streamer_object::streamer_object
streamer_object(const streamer_object &a_from)
Definition: element:467
tools::wroot::streamer_basic_pointer::streamer_basic_pointer
streamer_basic_pointer(const std::string &aName, const std::string &aTitle, int aOffset, int aType, const std::string &aCountName, const std::string &aCountClass, int aCountVersion, const std::string &aTypeName)
Definition: element:380
tools::wroot::streamer_object_pointer::store_cls
virtual const std::string & store_cls() const
Definition: element:476
tools::wroot::streamer__info::POINTER_FLOAT
@ POINTER_FLOAT
Definition: element:21
tools::wroot::streamer_int
Definition: element:253
tools::wroot::streamer__info::FLOAT
@ FLOAT
Definition: element:27
tools::wroot::streamer__info::ARRAY
@ ARRAY
Definition: element:18
tools::snpf
int snpf(char *a_s, size_t a_n, const char *a_fmt,...)
Definition: snpf:27
tools::wroot::streamer_element::fOffset
int fOffset
Definition: element:159
tools::wroot::streamer__info::_TSTRING
@ _TSTRING
Definition: element:37
tools::wroot::streamer__info::OBJECT_ARROW
@ OBJECT_ARROW
Definition: element:35
tools::wroot::streamer_string::streamer_string
streamer_string(const streamer_string &a_from)
Definition: element:438
tools::wroot::streamer_STL::streamer_STL
streamer_STL(const std::string &aName, const std::string &aTitle, int aOffset, streamer__info::Type aType, const std::string &aTypeName)
Definition: element:563
tools::wroot::streamer_base::streamer_base
streamer_base(const streamer_base &a_from)
Definition: element:190
tools::wroot::streamer_double::streamer_double
streamer_double(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:311
tools::wroot::streamer__info::Type
Type
Definition: element:16
tools::wroot::streamer_element::fType
int fType
Definition: element:154
tools::wroot::streamer_object_pointer
Definition: element:474
tools::wroot::streamer_base::~streamer_base
virtual ~streamer_base()
Definition: element:188
tools::wroot::streamer_STL::kSTLvector
@ kSTLvector
Definition: element:552
tools::wroot::streamer_string::streamer_string
streamer_string(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:428
tools::wroot::streamer_stat_t::operator=
streamer_stat_t & operator=(const streamer_stat_t &a_from)
Definition: element:340
tools::wroot::streamer_element::fMaxIndex
int fMaxIndex[5]
Definition: element:158
tools::wroot::streamer_STL::kSTLmultiset
@ kSTLmultiset
Definition: element:554
tools::wroot::buffer::write_version
bool write_version(short a_version)
Definition: buffer:169
tools::wroot::streamer_stat_t::copy
virtual streamer_element * copy() const
Definition: element:327
tools::wroot::streamer_element::fName
std::string fName
Definition: element:151
tools::wroot::streamer_short::operator=
streamer_short & operator=(const streamer_short &a_from)
Definition: element:250
tools::wroot::streamer_basic_pointer
Definition: element:361
tools::wroot::streamer_base::operator=
streamer_base & operator=(const streamer_base &a_from)
Definition: element:195
tools::wroot::streamer_uint
Definition: element:271
tools::wroot::streamer_STL::streamer_STL
streamer_STL(const streamer_STL &a_from)
Definition: element:573
tools::wroot::streamer__info::OBJECT_ANY
@ OBJECT_ANY
Definition: element:34
tools::wroot::streamer_basic_type::store_cls
virtual const std::string & store_cls() const
Definition: element:206
tools::wroot::buffer::write
bool write(T x)
Definition: buffer:97
tools::wroot::streamer_bool
Definition: element:343
tools::wroot::streamer__info::BOOL
@ BOOL
Definition: element:32
tools::wroot::streamer_uint::~streamer_uint
virtual ~streamer_uint()
Definition: element:283
tools::wroot::streamer_object_pointer::copy
virtual streamer_element * copy() const
Definition: element:488
tools::wroot::streamer__info::CHAR
@ CHAR
Definition: element:24
tools::wroot::streamer_string::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:418
tools::wroot::buffer::write_fast_array
bool write_fast_array(const char *a_a, uint32 a_n)
Definition: buffer:114
tools::wroot::streamer_basic_pointer::operator=
streamer_basic_pointer & operator=(const streamer_basic_pointer &a_from)
Definition: element:399
tools::wroot::streamer_element::fSize
int fSize
Definition: element:155
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::wroot::streamer_element::copy
virtual streamer_element * copy() const =0
tools::wroot::streamer_float::~streamer_float
virtual ~streamer_float()
Definition: element:301
tools::wroot::streamer__info::UNSIGNED_CHAR
@ UNSIGNED_CHAR
Definition: element:29
tools::wroot::streamer_STL::copy
virtual streamer_element * copy() const
Definition: element:550
tools::wroot::buffer
Definition: buffer:28
tools::wroot::streamer_basic_pointer::fCountClass
std::string fCountClass
Definition: element:409
tools::wroot::streamer_base::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:170
tools::wroot::streamer_object_any::streamer_object_any
streamer_object_any(const std::string &aName, const std::string &aTitle, int aOffset, const std::string &aTypeName)
Definition: element:520
tools::wroot::streamer_stat_t::streamer_stat_t
streamer_stat_t(const std::string &aName, const std::string &aTitle, int aOffset)
Definition: element:329
tools::wroot::streamer_element::fullName
virtual void fullName(std::string &a_s) const
Definition: element:142
tools::wroot::streamer_object_pointer::operator=
streamer_object_pointer & operator=(const streamer_object_pointer &a_from)
Definition: element:498
tools::wroot::streamer_STL
Definition: element:534
tools::wroot::streamer_STL::kSTLmultimap
@ kSTLmultimap
Definition: element:554
tools::wroot::streamer_object::operator=
streamer_object & operator=(const streamer_object &a_from)
Definition: element:468
tools::wroot::streamer_int::operator=
streamer_int & operator=(const streamer_int &a_from)
Definition: element:268
tools::wroot::streamer__info::UNSIGNED_SHORT
@ UNSIGNED_SHORT
Definition: element:30
tools::wroot::streamer_int::streamer_int
streamer_int(const streamer_int &a_from)
Definition: element:267
tools::wroot::streamer_string::copy
virtual streamer_element * copy() const
Definition: element:426
tools::wroot::streamer_element::streamer_element
streamer_element(const std::string &aName, const std::string &aTitle, int aOffset, int aType, const std::string &aTypeName)
Definition: element:88
tools::wroot::streamer_object_any
Definition: element:504
tools::wroot::streamer_STL::kSTLlist
@ kSTLlist
Definition: element:553
tools::wroot::streamer__info::size_UINT
const int size_UINT
Definition: element:45
tools::wroot::streamer_STL::stream
virtual bool stream(buffer &aBuffer) const
Definition: element:540
tools::wroot::streamer_int::streamer_int
streamer_int(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:260
tools::wroot::streamer_basic_type::streamer_basic_type
streamer_basic_type(const std::string &aName, const std::string &aTitle, int aOffset, int aType, const std::string &aTypeName)
Definition: element:220
tools::wroot::streamer__info::size_DOUBLE
const int size_DOUBLE
Definition: element:43
tools::wroot::streamer_base::streamer_base
streamer_base(const std::string &aName, const std::string &aTitle, int aOffset, int aBaseVersion)
Definition: element:181
tools::wroot::streamer__info::BASE
@ BASE
Definition: element:17
tools::wroot::streamer_base::copy
virtual streamer_element * copy() const
Definition: element:179
tools::wroot::streamer_string::operator=
streamer_string & operator=(const streamer_string &a_from)
Definition: element:439
tools::wroot::streamer__info::size_FLOAT
const int size_FLOAT
Definition: element:42
tools::wroot::streamer_object::~streamer_object
virtual ~streamer_object()
Definition: element:465
tools::wroot::streamer_base
Definition: element:164
tools::wroot::streamer_element::store_cls
virtual const std::string & store_cls() const
Definition: element:60
tools::wroot::streamer_element::setArrayDimension
virtual void setArrayDimension(int aDimension)
Definition: element:129
tools::wroot::streamer__info::POINTER_INT
@ POINTER_INT
Definition: element:20
tools::wroot::streamer_float::streamer_float
streamer_float(const streamer_float &a_from)
Definition: element:303
tools::wroot::streamer__info::TOBJECT
@ TOBJECT
Definition: element:38
tools::wroot::streamer_double::streamer_double
streamer_double(const streamer_double &a_from)
Definition: element:321
tools::wroot::streamer_object_any::copy
virtual streamer_element * copy() const
Definition: element:518
tools::wroot::streamer_uint::streamer_uint
streamer_uint(const streamer_uint &a_from)
Definition: element:285
tools::wroot::streamer_short::streamer_short
streamer_short(int &aOffset, const std::string &aName, const std::string &aTitle)
Definition: element:242
tools::wroot::streamer_object::streamer_object
streamer_object(const std::string &aName, const std::string &aTitle, int aOffset, const std::string &aTypeName)
Definition: element:459
tools::wroot::streamer_uint::operator=
streamer_uint & operator=(const streamer_uint &a_from)
Definition: element:286
tools::wroot::streamer_stat_t
Definition: element:325
tools::wroot::streamer_STL::fSTLtype
int fSTLtype
Definition: element:585
tools::wroot::streamer_element::operator=
streamer_element & operator=(const streamer_element &a_from)
Definition: element:116
tools::wroot::streamer_int::~streamer_int
virtual ~streamer_int()
Definition: element:265
tools::wroot::streamer_element::fArrayLength
int fArrayLength
Definition: element:156
tools::wroot::streamer_stat_t::~streamer_stat_t
virtual ~streamer_stat_t()
Definition: element:337
tools::wroot::streamer_STL::store_cls
virtual const std::string & store_cls() const
Definition: element:536
tools::wroot::streamer_element::fTypeName
std::string fTypeName
element offset in class
Definition: element:161
tools::wroot::streamer_string
Definition: element:412
tools::wroot::streamer__info::UNSIGNED_INT
@ UNSIGNED_INT
Definition: element:31
tools::wroot::streamer_STL::fCtype
int fCtype
Definition: element:586
tools::wroot::streamer_STL::kSTLdeque
@ kSTLdeque
Definition: element:553
tools::wroot::streamer__info::INT
@ INT
Definition: element:26