Logo ROOT   6.10/00
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TFormLeafInfo.h
Go to the documentation of this file.
1 // @(#)root/treeplayer:$Id$
2 // Author: Philippe Canal 01/06/2004
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers and al. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFormLeafInfo
13 #define ROOT_TFormLeafInfo
14 
15 #include "TObject.h"
16 
17 #include "TLeafElement.h"
18 
19 #include "TArrayI.h"
20 #include "TDataType.h"
21 #include "TStreamerInfo.h"
22 #include "TStreamerElement.h"
23 
24 
25 // declare the extra versions of GetValue() plus templated implementation
26 #define DECLARE_GETVAL \
27  virtual Double_t GetValue(TLeaf *leaf, Int_t instance = 0) \
28  { return GetValueImpl<Double_t>(leaf, instance); } \
29  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t instance = 0) \
30  { return GetValueImpl<Long64_t>(leaf, instance); } \
31  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t instance = 0) \
32  { return GetValueImpl<LongDouble_t>(leaf, instance); } \
33  template<typename T> T GetValueImpl(TLeaf *leaf, Int_t instance = 0) // no semicolon
34 
35 
36 // declare the extra versions of ReadValue() plus templated implementation
37 #define DECLARE_READVAL \
38  virtual Double_t ReadValue(char *where, Int_t instance = 0) \
39  { return ReadValueImpl<Double_t>(where, instance); } \
40  virtual Long64_t ReadValueLong64(char *where, Int_t instance = 0) \
41  { return ReadValueImpl<Long64_t>(where, instance); } \
42  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t instance = 0) \
43  { return ReadValueImpl<LongDouble_t>(where, instance); } \
44  template<typename T> T ReadValueImpl(char *where, Int_t instance = 0) // no semicolon
45 
46 
47 
48 
49 class TFormLeafInfo : public TObject {
50 public:
51  // Constructors
52  TFormLeafInfo(TClass* classptr = 0, Long_t offset = 0,
53  TStreamerElement* element = 0);
54  TFormLeafInfo(const TFormLeafInfo& orig);
55  virtual TFormLeafInfo* DeepCopy() const;
56  virtual ~TFormLeafInfo();
57 
58  void Swap(TFormLeafInfo &other);
60 
61  // Data Members
62  TClass *fClass; //! This is the class of the data pointed to
63  //TStreamerInfo *fInfo; //! == fClass->GetStreamerInfo()
64  Long_t fOffset; //! Offset of the data pointed inside the class fClass
65  TStreamerElement *fElement; //! Descriptor of the data pointed to.
66  //Warning, the offset in fElement is NOT correct because it does not take into
67  //account base classes and nested objects (which fOffset does).
69  TFormLeafInfo *fNext; // follow this to grab the inside information
72 
73 protected:
75 public:
76 
77  virtual void AddOffset(Int_t offset, TStreamerElement* element);
78 
79  virtual Int_t GetArrayLength();
80  virtual TClass* GetClass() const;
81  virtual Int_t GetCounterValue(TLeaf* leaf);
82  virtual Int_t ReadCounterValue(char *where);
83 
84  char* GetObjectAddress(TLeafElement* leaf, Int_t &instance);
85 
87 
88  // Currently only implemented in TFormLeafInfoCast
89  Int_t GetNdata(TLeaf* leaf);
90  virtual Int_t GetNdata();
91 
92  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
93  virtual void *GetValuePointer(char *from, Int_t instance = 0);
94  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
95  virtual void *GetLocalValuePointer( char *from, Int_t instance = 0);
96 
97  virtual Bool_t HasCounter() const;
98  virtual Bool_t IsString() const;
99 
100  virtual Bool_t IsInteger() const;
101  virtual Bool_t IsReference() const { return kFALSE; }
102 
103  // Method for multiple variable dimensions.
104  virtual Int_t GetPrimaryIndex();
105  virtual Int_t GetVarDim();
106  virtual Int_t GetVirtVarDim();
107  virtual Int_t GetSize(Int_t index);
108  virtual Int_t GetSumOfSizes();
109  virtual void LoadSizes(TBranch* branch);
110  virtual void SetPrimaryIndex(Int_t index);
111  virtual void SetSecondaryIndex(Int_t index);
112  virtual void SetSize(Int_t index, Int_t val);
113  virtual void SetBranch(TBranch* br) { if ( fNext ) fNext->SetBranch(br); }
114  virtual void UpdateSizes(TArrayI *garr);
115 
116  virtual Bool_t Update();
117 
120 
121  template <typename T> struct ReadValueHelper {
122  static T Exec(TFormLeafInfo *leaf, char *where, Int_t instance) {
123  return leaf->ReadValue(where, instance);
124  }
125  };
126  template <typename T > T ReadTypedValue(char *where, Int_t instance = 0) {
127  return ReadValueHelper<T>::Exec(this, where, instance);
128  }
129 
130  template <typename T> struct GetValueHelper {
131  static T Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) {
132  return linfo->GetValue(leaf, instance);
133  }
134  };
135  template <typename T > T GetTypedValue(TLeaf *leaf, Int_t instance = 0) {
136  return GetValueHelper<T>::Exec(this, leaf, instance);
137  }
138 };
139 
140 
142  static Long64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance) { return leaf->ReadValueLong64(where, instance); }
143 };
145  static ULong64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance) { return (ULong64_t)leaf->ReadValueLong64(where, instance); }
146 };
148  static LongDouble_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance) { return leaf->ReadValueLongDouble(where, instance); }
149 };
150 
152  static Long64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) { return linfo->GetValueLong64(leaf, instance); }
153 };
155  static ULong64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) { return (ULong64_t)linfo->GetValueLong64(leaf, instance); }
156 };
158  static LongDouble_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) { return linfo->GetValueLongDouble(leaf, instance); }
159 };
160 
161 // TFormLeafInfoDirect is a small helper class to implement reading a data
162 // member on an object stored in a TTree.
163 
165 public:
167  // The implicit default constructor's implementation is correct.
168 
169  virtual TFormLeafInfo* DeepCopy() const;
170 
172  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
173  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
174 
175  virtual Double_t ReadValue(char * /*where*/, Int_t /*instance*/= 0);
176  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
177  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
178 
179 };
180 
181 // TFormLeafInfoNumerical is a small helper class to implement reading a
182 // numerical value inside a collection
183 
187 public:
191 
192  virtual TFormLeafInfo* DeepCopy() const;
193  void Swap(TFormLeafInfoNumerical &other);
195 
196  virtual ~TFormLeafInfoNumerical();
197 
198  virtual Bool_t IsString() const;
199  virtual Bool_t Update();
200 };
201 
202 // TFormLeafInfoCollectionObject
203 // This class is used when we are interested by the collection it self and
204 // it is split.
205 
207  Bool_t fTop; //If true, it indicates that the branch itself contains
208 public:
211 
212  void Swap(TFormLeafInfoCollectionObject &other);
214 
215  virtual TFormLeafInfo* DeepCopy() const {
216  return new TFormLeafInfoCollectionObject(*this);
217  }
218 
220  virtual Int_t GetCounterValue(TLeaf* leaf);
221  virtual Double_t ReadValue(char *where, Int_t instance = 0);
222  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
223  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
224  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
225  virtual void *GetValuePointer(char *thisobj, Int_t instance = 0);
226  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
227  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
228 };
229 
230 // TFormLeafInfoClones is a small helper class to implement reading a data
231 // member on a TClonesArray object stored in a TTree.
232 
234  Bool_t fTop; //If true, it indicates that the branch itself contains
235 public:
236  //either the clonesArrays or something inside the clonesArray
237  TFormLeafInfoClones(TClass* classptr = 0, Long_t offset = 0);
238  TFormLeafInfoClones(TClass* classptr, Long_t offset, Bool_t top);
239  TFormLeafInfoClones(TClass* classptr, Long_t offset, TStreamerElement* element,
240  Bool_t top = kFALSE);
242 
243  void Swap(TFormLeafInfoClones &other);
245 
246  virtual TFormLeafInfo* DeepCopy() const {
247  return new TFormLeafInfoClones(*this);
248  }
249 
252  virtual Int_t GetCounterValue(TLeaf* leaf);
253  virtual Int_t ReadCounterValue(char *where);
254  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
255  virtual void *GetValuePointer(char *thisobj, Int_t instance = 0);
256  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
257  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
258 };
259 
260 // TFormLeafInfoCollection is a small helper class to implement reading a data member
261 // on a generic collection object stored in a TTree.
262 
264  Bool_t fTop; //If true, it indicates that the branch itself contains
265  //either the clonesArrays or something inside the clonesArray
270 public:
271 
273  Long_t offset,
274  TStreamerElement* element,
275  Bool_t top = kFALSE);
276 
277  TFormLeafInfoCollection(TClass* motherclassptr,
278  Long_t offset = 0,
279  TClass* elementclassptr = 0,
280  Bool_t top = kFALSE);
281 
284 
286 
287  void Swap(TFormLeafInfoCollection &other);
289 
290  virtual TFormLeafInfo* DeepCopy() const;
291 
292  virtual Bool_t Update();
293 
296  virtual Int_t GetCounterValue(TLeaf* leaf);
297  virtual Int_t ReadCounterValue(char* where);
298  virtual Int_t GetCounterValue(TLeaf* leaf, Int_t instance);
299  virtual Bool_t HasCounter() const;
300  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
301  virtual void *GetValuePointer(char *thisobj, Int_t instance = 0);
302  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
303  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
304 };
305 
306 // TFormLeafInfoCollectionSize is used to return the size of a collection
307 
312 public:
314  TFormLeafInfoCollectionSize(TClass* classptr,Long_t offset,TStreamerElement* element);
317 
319 
320  void Swap(TFormLeafInfoCollectionSize &other);
322 
323  virtual TFormLeafInfo* DeepCopy() const;
324 
325  virtual Bool_t Update();
326 
327  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
328  virtual void *GetValuePointer(char *from, Int_t instance = 0);
329  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
330  virtual void *GetLocalValuePointer( char *from, Int_t instance = 0);
331  virtual Double_t ReadValue(char *where, Int_t instance = 0);
332  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
333  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
334 };
335 
336 // TFormLeafInfoPointer is a small helper class to implement reading a data
337 // member by following a pointer inside a branch of TTree.
338 
340 public:
341  TFormLeafInfoPointer(TClass* classptr = 0, Long_t offset = 0,
342  TStreamerElement* element = 0);
343  // The default copy constructor is the right implementation.
344 
345  virtual TFormLeafInfo* DeepCopy() const;
346 
349 };
350 
351 // TFormLeafInfoMethod is a small helper class to implement executing a method
352 // of an object stored in a TTree
353 
355 
364 
365 public:
366 
367  TFormLeafInfoMethod(TClass* classptr = 0, TMethodCall *method = 0);
370 
371  void Swap(TFormLeafInfoMethod &other);
373 
374  virtual TFormLeafInfo* DeepCopy() const;
375 
377  virtual TClass* GetClass() const;
378  virtual void *GetLocalValuePointer( TLeaf *from, Int_t instance = 0);
379  virtual void *GetLocalValuePointer(char *from, Int_t instance = 0);
380  virtual Bool_t IsInteger() const;
381  virtual Bool_t IsString() const;
382  virtual Bool_t Update();
383 };
384 
385 // TFormLeafInfoMultiVarDim is a small helper class to implement reading a
386 // data member on a variable size array inside a TClonesArray object stored in
387 // a TTree. This is the version used when the data member is inside a
388 // non-split object.
389 
391 public:
393  TArrayI fSizes; // Array of sizes of the variable dimension
394  TFormLeafInfo *fCounter2; // Information on how to read the secondary dimensions
395  Int_t fSumOfSizes; // Sum of the content of fSizes
396  Int_t fDim; // physical number of the dimension that is variable
397  Int_t fVirtDim; // number of the virtual dimension to which this object correspond.
398  Int_t fPrimaryIndex; // Index of the dimensions that is indexing the second dimension's size
399  Int_t fSecondaryIndex; // Index of the second dimension
400 
401 protected:
403  TStreamerElement* element) : TFormLeafInfo(classptr,offset,element),fNsize(0),fSizes(),fCounter2(0),fSumOfSizes(0),fDim(0),fVirtDim(0),fPrimaryIndex(-1),fSecondaryIndex(-1) {}
404 
405 public:
406  TFormLeafInfoMultiVarDim(TClass* classptr, Long_t offset,
407  TStreamerElement* element, TFormLeafInfo* parent);
411 
412  void Swap(TFormLeafInfoMultiVarDim &other);
414 
415  virtual TFormLeafInfo* DeepCopy() const;
416 
417  /* The proper indexing and unwinding of index is done by prior leafinfo in the chain. */
418  //virtual Double_t ReadValue(char *where, Int_t instance = 0) {
419  // return TFormLeafInfo::ReadValue(where,instance);
420  //}
421 
422  virtual void LoadSizes(TBranch* branch);
423  virtual Int_t GetPrimaryIndex();
424  virtual void SetPrimaryIndex(Int_t index);
425  virtual void SetSecondaryIndex(Int_t index);
426  virtual void SetSize(Int_t index, Int_t val);
427  virtual Int_t GetSize(Int_t index);
428  virtual Int_t GetSumOfSizes();
429  virtual Double_t GetValue(TLeaf * /*leaf*/, Int_t /*instance*/ = 0);
430  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
431  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
432  virtual Int_t GetVarDim();
433  virtual Int_t GetVirtVarDim();
434  virtual Bool_t Update();
435  virtual void UpdateSizes(TArrayI *garr);
436 };
437 
438 // TFormLeafInfoMultiVarDimDirect is a small helper class to implement reading
439 // a data member on a variable size array inside a TClonesArray object stored
440 // in a TTree. This is the version used for split access
441 
443 public:
444  // The default constructor are the correct implementation.
445 
446  virtual TFormLeafInfo* DeepCopy() const;
447 
449  virtual Double_t ReadValue(char * /*where*/, Int_t /*instance*/ = 0);
450  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
451  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
452 };
453 
454 // TFormLeafInfoMultiVarDimCollection is a small helper class to implement reading
455 // a data member which is a collection inside a TClonesArray or collection object
456 // stored in a TTree. This is the version used for split access
457 //
459 public:
460  TFormLeafInfoMultiVarDimCollection(TClass* motherclassptr, Long_t offset,
461  TClass* elementclassptr, TFormLeafInfo *parent);
463  TStreamerElement* element, TFormLeafInfo* parent);
464  // The default copy constructor is the right implementation.
465 
466  virtual TFormLeafInfo* DeepCopy() const;
467 
468  virtual Int_t GetArrayLength() { return 0; }
469  virtual void LoadSizes(TBranch* branch);
470  virtual Double_t GetValue(TLeaf *leaf, Int_t instance = 0);
471  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
472  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
474 };
475 
476 // TFormLeafInfoMultiVarDimClones is a small helper class to implement reading
477 // a data member which is a TClonesArray inside a TClonesArray or collection object
478 // stored in a TTree. This is the version used for split access
479 //
481 public:
482  TFormLeafInfoMultiVarDimClones(TClass* motherclassptr, Long_t offset,
483  TClass* elementclassptr, TFormLeafInfo *parent);
484  TFormLeafInfoMultiVarDimClones(TClass* classptr, Long_t offset,
485  TStreamerElement* element, TFormLeafInfo* parent);
486  // The default copy constructor is the right implementation.
487 
488  virtual TFormLeafInfo* DeepCopy() const;
489 
490  virtual Int_t GetArrayLength() { return 0; }
491  virtual void LoadSizes(TBranch* branch);
492  virtual Double_t GetValue(TLeaf *leaf, Int_t instance = 0);
493  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
494  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
496 };
497 
498 // TFormLeafInfoCast is a small helper class to implement casting an object to
499 // a different type (equivalent to dynamic_cast)
500 
502 public:
503  TClass *fCasted; //! Pointer to the class we are trying to case to
504  TString fCastedName; //! Name of the class we are casting to.
505  Bool_t fGoodCast; //! Marked by ReadValue.
506  Bool_t fIsTObject; //! Indicated whether the fClass inherits from TObject.
507 
508  TFormLeafInfoCast(TClass* classptr = 0, TClass* casted = 0);
510  virtual ~TFormLeafInfoCast();
511 
512  void Swap(TFormLeafInfoCast &other);
514 
515  virtual TFormLeafInfo* DeepCopy() const;
516 
518  // Currently only implemented in TFormLeafInfoCast
519  virtual Int_t GetNdata();
520  virtual Bool_t Update();
521 };
522 
523 // TFormLeafInfoTTree is a small helper class to implement reading
524 // from the containing TTree object itself.
525 
530 
531 public:
532  TFormLeafInfoTTree(TTree *tree = 0, const char *alias = 0, TTree *current = 0);
534 
535  void Swap(TFormLeafInfoTTree &other);
537 
538  virtual TFormLeafInfo* DeepCopy() const;
539 
541  using TFormLeafInfo::GetValue;
542 
545  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
546  virtual Bool_t Update();
547 };
548 
549 
550 #endif /* ROOT_TFormLeafInfo */
551 
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:32
virtual Bool_t IsReference() const
virtual Int_t ReadCounterValue(char *where)
Return the current size of the the TClonesArray.
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
TFormLeafInfoNumerical & operator=(const TFormLeafInfoNumerical &orig)
Exception safe assignment operator.
TFormLeafInfo & operator=(const TFormLeafInfo &orig)
Exception safe assignment operator.
~TFormLeafInfoCollection()
Destructor.
A small helper class to implement reading a data member on a TClonesArray object stored in a TTree...
virtual void AddOffset(Int_t offset, TStreamerElement *element)
Increase the offset of this element.
long long Long64_t
Definition: RtypesCore.h:69
virtual void LoadSizes(TBranch *branch)
Load the current array sizes.
TVirtualCollectionProxy * fCollProxy
Bool_t fGoodCast
Name of the class we are casting to.
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
Return the pointer to the clonesArray.
TFormLeafInfoCollectionSize()
Constructor.
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
Return the pointer to the clonesArray.
virtual void * GetValuePointer(TLeaf *leaf, Int_t instance=0)
Return the pointer to the clonesArray.
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
A small helper class to implement reading a data member on an object stored in a TTree.
double T(double x)
Definition: ChebyshevPol.h:34
TString fClassName
Definition: TFormLeafInfo.h:70
virtual void * GetValuePointer(TLeaf *leaf, Int_t instance=0)
returns the address of the value pointed to by the serie of TFormLeafInfo.
virtual Long64_t ReadValueLong64(char *where, Int_t i=0)
virtual Double_t GetValue(TLeaf *leaf, Int_t instance=0)
TFormLeafInfoCollectionObject(TClass *classptr=0, Bool_t fTop=kTRUE)
Constructor.
void Swap(TFormLeafInfoCast &other)
Exception safe swap.
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all of its content.
void Swap(TFormLeafInfoMultiVarDim &other)
Exception safe swap.
A small helper class to implement casting an object to a different type (equivalent to dynamic_cast) ...
Basic string class.
Definition: TString.h:129
TFormLeafInfoCast & operator=(const TFormLeafInfoCast &orig)
Exception safe assignment operator.
TFormLeafInfo * fNext
Definition: TFormLeafInfo.h:69
TFormLeafInfoTTree & operator=(const TFormLeafInfoTTree &orig)
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TFormLeafInfoNumerical(TVirtualCollectionProxy *holder_of)
Construct a TFormLeafInfo for the numerical type contained in the collection.
TFormLeafInfo(TClass *classptr=0, Long_t offset=0, TStreamerElement *element=0)
Constructor.
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
virtual void * GetValuePointer(TLeaf *leaf, Int_t instance=0)
Return the pointer to the clonesArray.
virtual Int_t GetSize(Int_t index)
Return the size of the requested sub-array.
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo and all its content.
~TFormLeafInfoCollectionSize()
Destructor.
virtual Int_t GetPrimaryIndex()
Return the index vlaue of the primary index.
TFormLeafInfoClones(TClass *classptr=0, Long_t offset=0)
Constructor.
virtual void * GetLocalValuePointer(TLeaf *from, Int_t instance=0)
This is implemented here because some compiler want ALL the signature of an overloaded function to be...
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo and all its content.
TFormLeafInfoCollection()
Constructor.
TFormLeafInfoCollectionObject & operator=(const TFormLeafInfoCollectionObject &orig)
Exception safe assignement operator.
A helper class to implement reading a data member on a variable size array inside a TClonesArray obje...
Array of integers (32 bits per element).
Definition: TArrayI.h:27
virtual Long64_t ReadValueLong64(char *where, Int_t i=0)
TMethodCall * fMethod
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its content.
virtual TClass * GetClass() const
Get the class of the underlying data.
TFormLeafInfoMultiVarDim()
Constructor.
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all of its contnet.
TFormLeafInfoMethod & operator=(const TFormLeafInfoMethod &orig)
Exception safe assignment operator.
virtual Bool_t IsString() const
Return true if the underlying data is a string.
virtual Int_t GetVarDim()
Return the index of the dimension which varies for each elements of an enclosing array (typically a T...
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its content.
virtual Int_t GetArrayLength()
Return the current length of the array.
TFormLeafInfoMultiVarDim & operator=(const TFormLeafInfoMultiVarDim &orig)
Exception safe assignment operator.
virtual TFormLeafInfo * DeepCopy() const
Copy this object and its content.
virtual Bool_t Update()
Update after a change of file in a chain.
TString fCastedName
Pointer to the class we are trying to case to.
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its content.
virtual Int_t GetSumOfSizes()
Get the total size.
TString fElementName
Definition: TFormLeafInfo.h:71
virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i=0)
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
Not implemented.
virtual ~TFormLeafInfoCast()
Destructor.
TFormLeafInfoTTree(TTree *tree=0, const char *alias=0, TTree *current=0)
TFormLeafInfoMultiVarDimCollection(TClass *motherclassptr, Long_t offset, TClass *elementclassptr, TFormLeafInfo *parent)
Constructor.
virtual Double_t ReadValue(char *, Int_t=0)
Read the value at the given memory location.
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
virtual void * GetValuePointer(TLeaf *leaf, Int_t instance=0)
Return the pointer to the clonesArray.
static T Exec(TFormLeafInfo *leaf, char *where, Int_t instance)
virtual void SetPrimaryIndex(Int_t index)
Set the current value of the primary index.
virtual void LoadSizes(TBranch *branch)
Load the current array sizes.
virtual Double_t ReadValue(char *where, Int_t instance=0)
Return the value of the underlying data member inside the clones array.
virtual Bool_t IsInteger() const
Return true if the underlying data is an integral value.
Method or function calling interface.
Definition: TMethodCall.h:37
virtual void UpdateSizes(TArrayI *garr)
Update the sizes of the arrays.
static ULong64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance)
virtual Int_t ReadCounterValue(char *where)
Return the size of the underlying array for the current entry in the TTree.
TFormLeafInfoMethod(TClass *classptr=0, TMethodCall *method=0)
Constructor.
char * GetObjectAddress(TLeafElement *leaf, Int_t &instance)
Returns the the location of the object pointed to.
Int_t fMultiplicity
Definition: TFormLeafInfo.h:74
A small helper class to implement reading a data member on a variable size array inside a TClonesArra...
virtual Int_t GetCounterValue(TLeaf *leaf)
Return the current size of the the TClonesArray.
Used to return the size of a collection.
TClass * fClass
Definition: TFormLeafInfo.h:62
virtual ~TFormLeafInfo()
Delete this object and all its content.
virtual void SetSecondaryIndex(Int_t index)
Set the primary index value.
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its content.
static LongDouble_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance)
A small helper class to implement reading a data member on a variable size array inside a TClonesArra...
virtual Int_t GetCounterValue(TLeaf *leaf)
Return the current size of the the TClonesArray.
static LongDouble_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance)
TStreamerElement * fElement
Offset of the data pointed inside the class fClass.
Definition: TFormLeafInfo.h:65
A small helper class to implement reading a data member by following a pointer inside a branch of TTr...
virtual Int_t GetCounterValue(TLeaf *leaf)
Return the current size of the the TClonesArray.
virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i=0)
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its content.
virtual void SetSize(Int_t index, Int_t val)
Set the current size of the arrays.
virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i=0)
static Long64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance)
virtual Int_t GetPrimaryIndex()
Method for multiple variable dimensions.
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
returns the address of the value pointed to by the TFormLeafInfo.
virtual void SetSize(Int_t index, Int_t val)
Set the sizes of the sub-array.
virtual Bool_t HasCounter() const
Return true if the underlying data has a array size counter.
virtual void LoadSizes(TBranch *branch)
Load the current array sizes.
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:71
long double LongDouble_t
Definition: RtypesCore.h:57
T ReadTypedValue(char *where, Int_t instance=0)
virtual Int_t GetSize(Int_t index)
For the current entry, and the value &#39;index&#39; for the main array, return the size of the secondary var...
virtual void UpdateSizes(TArrayI *garr)
Set the current sizes of the arrays.
virtual void SetPrimaryIndex(Int_t index)
Set the primary index value.
TVirtualCollectionProxy * fCollProxy
TFormLeafInfoClones & operator=(const TFormLeafInfoClones &orig)
Exception safe assignement operator.
virtual ~TFormLeafInfoNumerical()
Destructor.
virtual Double_t ReadValue(char *, Int_t=0)
Not implemented.
virtual void * GetValuePointer(TLeaf *leaf, Int_t instance=0)
Not implemented.
A TLeaf for the general case when using the branches created via a TStreamerInfo (i.e.
Definition: TLeafElement.h:30
A Branch for the case of an object.
virtual void SetSecondaryIndex(Int_t index)
Set the current value of the primary index.
const Bool_t kFALSE
Definition: RtypesCore.h:92
TFormLeafInfoCollection & operator=(const TFormLeafInfoCollection &orig)
Exception safe assignment operator.
TFormLeafInfoCollectionSize & operator=(const TFormLeafInfoCollectionSize &orig)
Exception safe assignment operator.
~TFormLeafInfoMethod()
Destructor.
void Swap(TFormLeafInfoNumerical &other)
Exception safe swap.
long Long_t
Definition: RtypesCore.h:50
static Long64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance)
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo and all its content.
virtual Int_t GetVirtVarDim()
Return the virtual index (for this expression) of the dimension which varies for each elements of an ...
TFormLeafInfoPointer(TClass *classptr=0, Long_t offset=0, TStreamerElement *element=0)
Constructor.
A small helper class to implement reading from the containing TTree object itself.
virtual TFormLeafInfo * DeepCopy() const
Copy of the object and its content.
virtual Int_t ReadCounterValue(char *where)
Return the size of the underlying array for the current entry in the TTree.
static T Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance)
virtual Int_t GetNdata()
Get the number of element in the entry.
virtual void SetBranch(TBranch *br)
TFormLeafInfoMultiVarDimClones(TClass *motherclassptr, Long_t offset, TClass *elementclassptr, TFormLeafInfo *parent)
Constructor.
double Double_t
Definition: RtypesCore.h:55
virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i=0)
A small helper class to implement reading a numerical value inside a collection.
virtual Bool_t IsString() const
Return true if the return value is a string.
This class is a small helper class to implement reading a data member on an object stored in a TTree...
Definition: TFormLeafInfo.h:49
unsigned long long ULong64_t
Definition: RtypesCore.h:70
Int_t GetMultiplicity()
Reminder of the meaning of fMultiplicity:
EDataType
Definition: TDataType.h:28
TFormLeafInfoDirect(TBranchElement *from)
Constructor.
virtual Int_t GetNdata()
Get the number of element in the entry.
virtual void LoadSizes(TBranch *branch)
Load the current array sizes.
virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i=0)
virtual Int_t GetSumOfSizes()
Total all the elements that are available for the current entry for the secondary variable dimension...
void Swap(TFormLeafInfoCollectionSize &other)
Exception safe swap.
TFormLeafInfo * fCounter2
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its content.
void Swap(TFormLeafInfoCollection &other)
Exception safe swap.
virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i=0)
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
Return the address of the underlying value.
virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i=0)
void Swap(TFormLeafInfoClones &other)
Exception safe swap.
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo and all its content.
virtual Double_t ReadValue(char *where, Int_t instance=0)
Return the value of the underlying pointer data member.
void Swap(TFormLeafInfo &other)
virtual Double_t GetValue(TLeaf *, Int_t=0)
virtual Bool_t HasCounter() const
Return true if any of underlying data has a array size counter.
TFormLeafInfoMultiVarDim(TClass *classptr, Long_t offset, TStreamerElement *element)
virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i=0)
TFormLeafInfoCast(TClass *classptr=0, TClass *casted=0)
Indicated whether the fClass inherits from TObject.
T GetTypedValue(TLeaf *leaf, Int_t instance=0)
virtual Bool_t IsInteger() const
Return true if the return value is integral.
TStreamerElement * fLocalElement
A small helper class to implement reading a data member on a generic collection object stored in a TT...
A TTree object has a header with a name and a title.
Definition: TTree.h:78
Asmall helper class to implement executing a method of an object stored in a TTree.
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
returns the address of the value pointed to by the TFormLeafInfo.
virtual Long64_t ReadValueLong64(char *where, Int_t i=0)
Bool_t fIsTObject
Marked by ReadValue.
virtual void * GetLocalValuePointer(TLeaf *leaf, Int_t instance=0)
Return the pointer to the clonesArray.
TFormLeafInfo * fCounter
Descriptor of the data pointed to.
Definition: TFormLeafInfo.h:68
Long_t fOffset
This is the class of the data pointed to.
Definition: TFormLeafInfo.h:64
virtual Int_t GetArrayLength()
Return the current length of the array.
virtual Bool_t IsString() const
Return true if the underlying data is a string.
A TTree is a list of TBranches.
Definition: TBranch.h:57
A small helper class to implement reading a data member on a TClonesArray object stored in a TTree...
static ULong64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance)
void Swap(TFormLeafInfoCollectionObject &other)
Exception safe swap.
A small helper class to implement reading a data member on a variable size array inside a TClonesArra...
virtual Int_t GetCounterValue(TLeaf *leaf)
Return the size of the underlying array for the current entry in the TTree.
virtual TClass * GetClass() const
Return the type of the underlying return value.
const Bool_t kTRUE
Definition: RtypesCore.h:91
virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i=0)
virtual Int_t GetVarDim()
Return the index of the dimension which varies for each elements of an enclosing array (typically a T...
virtual Int_t GetVirtVarDim()
Return the virtual index (for this expression) of the dimension which varies for each elements of an ...
virtual Int_t GetArrayLength()
Return the current length of the array.
virtual Long64_t ReadValueLong64(char *where, Int_t i=0)
~TFormLeafInfoMultiVarDim()
Destructor.
virtual TFormLeafInfo * DeepCopy() const
Copy the object and all its data.
void Swap(TFormLeafInfoMethod &other)
Exception safe swap.
virtual Bool_t Update()
We reloading all cached information in case the underlying class information has changed (for example...
virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i=0)
void Swap(TFormLeafInfoTTree &other)
virtual Double_t GetValue(TLeaf *leaf, Int_t instance=0)