Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_TObject
16 #include "TObject.h"
17 #endif
18 
19 #ifndef ROOT_TLeafElement
20 #include "TLeafElement.h"
21 #endif
22 
23 #include "TArrayI.h"
24 #include "TDataType.h"
25 #include "TStreamerInfo.h"
26 #include "TStreamerElement.h"
27 
28 
29 // declare the extra versions of GetValue() plus templated implementation
30 #define DECLARE_GETVAL \
31  virtual Double_t GetValue(TLeaf *leaf, Int_t instance = 0) \
32  { return GetValueImpl<Double_t>(leaf, instance); } \
33  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t instance = 0) \
34  { return GetValueImpl<Long64_t>(leaf, instance); } \
35  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t instance = 0) \
36  { return GetValueImpl<LongDouble_t>(leaf, instance); } \
37  template<typename T> T GetValueImpl(TLeaf *leaf, Int_t instance = 0) // no semicolon
38 
39 
40 // declare the extra versions of ReadValue() plus templated implementation
41 #define DECLARE_READVAL \
42  virtual Double_t ReadValue(char *where, Int_t instance = 0) \
43  { return ReadValueImpl<Double_t>(where, instance); } \
44  virtual Long64_t ReadValueLong64(char *where, Int_t instance = 0) \
45  { return ReadValueImpl<Long64_t>(where, instance); } \
46  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t instance = 0) \
47  { return ReadValueImpl<LongDouble_t>(where, instance); } \
48  template<typename T> T ReadValueImpl(char *where, Int_t instance = 0) // no semicolon
49 
50 
51 
52 
53 class TFormLeafInfo : public TObject {
54 public:
55  // Constructors
56  TFormLeafInfo(TClass* classptr = 0, Long_t offset = 0,
57  TStreamerElement* element = 0);
58  TFormLeafInfo(const TFormLeafInfo& orig);
59  virtual TFormLeafInfo* DeepCopy() const;
60  virtual ~TFormLeafInfo();
61 
62  void Swap(TFormLeafInfo &other);
64 
65  // Data Members
66  TClass *fClass; //! This is the class of the data pointed to
67  //TStreamerInfo *fInfo; //! == fClass->GetStreamerInfo()
68  Long_t fOffset; //! Offset of the data pointed inside the class fClass
69  TStreamerElement *fElement; //! Descriptor of the data pointed to.
70  //Warning, the offset in fElement is NOT correct because it does not take into
71  //account base classes and nested objects (which fOffset does).
73  TFormLeafInfo *fNext; // follow this to grab the inside information
76 
77 protected:
79 public:
80 
81  virtual void AddOffset(Int_t offset, TStreamerElement* element);
82 
83  virtual Int_t GetArrayLength();
84  virtual TClass* GetClass() const;
85  virtual Int_t GetCounterValue(TLeaf* leaf);
86  virtual Int_t ReadCounterValue(char *where);
87 
88  char* GetObjectAddress(TLeafElement* leaf, Int_t &instance);
89 
91 
92  // Currently only implemented in TFormLeafInfoCast
93  Int_t GetNdata(TLeaf* leaf);
94  virtual Int_t GetNdata();
95 
96  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
97  virtual void *GetValuePointer(char *from, Int_t instance = 0);
98  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
99  virtual void *GetLocalValuePointer( char *from, Int_t instance = 0);
100 
101  virtual Bool_t HasCounter() const;
102  virtual Bool_t IsString() const;
103 
104  virtual Bool_t IsInteger() const;
105  virtual Bool_t IsReference() const { return kFALSE; }
106 
107  // Method for multiple variable dimensions.
108  virtual Int_t GetPrimaryIndex();
109  virtual Int_t GetVarDim();
110  virtual Int_t GetVirtVarDim();
111  virtual Int_t GetSize(Int_t index);
112  virtual Int_t GetSumOfSizes();
113  virtual void LoadSizes(TBranch* branch);
114  virtual void SetPrimaryIndex(Int_t index);
115  virtual void SetSecondaryIndex(Int_t index);
116  virtual void SetSize(Int_t index, Int_t val);
117  virtual void SetBranch(TBranch* br) { if ( fNext ) fNext->SetBranch(br); }
118  virtual void UpdateSizes(TArrayI *garr);
119 
120  virtual Bool_t Update();
121 
124 
125  template <typename T> struct ReadValueHelper {
126  static T Exec(TFormLeafInfo *leaf, char *where, Int_t instance) {
127  return leaf->ReadValue(where, instance);
128  }
129  };
130  template <typename T > T ReadTypedValue(char *where, Int_t instance = 0) {
131  return ReadValueHelper<T>::Exec(this, where, instance);
132  }
133 
134  template <typename T> struct GetValueHelper {
135  static T Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) {
136  return linfo->GetValue(leaf, instance);
137  }
138  };
139  template <typename T > T GetTypedValue(TLeaf *leaf, Int_t instance = 0) {
140  return GetValueHelper<T>::Exec(this, leaf, instance);
141  }
142 };
143 
144 
146  static Long64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance) { return leaf->ReadValueLong64(where, instance); }
147 };
149  static ULong64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance) { return (ULong64_t)leaf->ReadValueLong64(where, instance); }
150 };
152  static LongDouble_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance) { return leaf->ReadValueLongDouble(where, instance); }
153 };
154 
156  static Long64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) { return linfo->GetValueLong64(leaf, instance); }
157 };
159  static ULong64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) { return (ULong64_t)linfo->GetValueLong64(leaf, instance); }
160 };
162  static LongDouble_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance) { return linfo->GetValueLongDouble(leaf, instance); }
163 };
164 
165 // TFormLeafInfoDirect is a small helper class to implement reading a data
166 // member on an object stored in a TTree.
167 
169 public:
171  // The implicit default constructor's implementation is correct.
172 
173  virtual TFormLeafInfo* DeepCopy() const;
174 
176  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
177  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
178 
179  virtual Double_t ReadValue(char * /*where*/, Int_t /*instance*/= 0);
180  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
181  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
182 
183 };
184 
185 // TFormLeafInfoNumerical is a small helper class to implement reading a
186 // numerical value inside a collection
187 
191 public:
195 
196  virtual TFormLeafInfo* DeepCopy() const;
197  void Swap(TFormLeafInfoNumerical &other);
199 
200  virtual ~TFormLeafInfoNumerical();
201 
202  virtual Bool_t IsString() const;
203  virtual Bool_t Update();
204 };
205 
206 // TFormLeafInfoCollectionObject
207 // This class is used when we are interested by the collection it self and
208 // it is split.
209 
211  Bool_t fTop; //If true, it indicates that the branch itself contains
212 public:
213  TFormLeafInfoCollectionObject(TClass* classptr = 0, Bool_t fTop = kTRUE);
215 
216  void Swap(TFormLeafInfoCollectionObject &other);
218 
219  virtual TFormLeafInfo* DeepCopy() const {
220  return new TFormLeafInfoCollectionObject(*this);
221  }
222 
224  virtual Int_t GetCounterValue(TLeaf* leaf);
225  virtual Double_t ReadValue(char *where, Int_t instance = 0);
226  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
227  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
228  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
229  virtual void *GetValuePointer(char *thisobj, Int_t instance = 0);
230  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
231  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
232 };
233 
234 // TFormLeafInfoClones is a small helper class to implement reading a data
235 // member on a TClonesArray object stored in a TTree.
236 
238  Bool_t fTop; //If true, it indicates that the branch itself contains
239 public:
240  //either the clonesArrays or something inside the clonesArray
241  TFormLeafInfoClones(TClass* classptr = 0, Long_t offset = 0);
242  TFormLeafInfoClones(TClass* classptr, Long_t offset, Bool_t top);
243  TFormLeafInfoClones(TClass* classptr, Long_t offset, TStreamerElement* element,
244  Bool_t top = kFALSE);
246 
247  void Swap(TFormLeafInfoClones &other);
249 
250  virtual TFormLeafInfo* DeepCopy() const {
251  return new TFormLeafInfoClones(*this);
252  }
253 
256  virtual Int_t GetCounterValue(TLeaf* leaf);
257  virtual Int_t ReadCounterValue(char *where);
258  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
259  virtual void *GetValuePointer(char *thisobj, Int_t instance = 0);
260  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
261  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
262 };
263 
264 // TFormLeafInfoCollection is a small helper class to implement reading a data member
265 // on a generic collection object stored in a TTree.
266 
268  Bool_t fTop; //If true, it indicates that the branch itself contains
269  //either the clonesArrays or something inside the clonesArray
274 public:
275 
277  Long_t offset,
278  TStreamerElement* element,
279  Bool_t top = kFALSE);
280 
281  TFormLeafInfoCollection(TClass* motherclassptr,
282  Long_t offset = 0,
283  TClass* elementclassptr = 0,
284  Bool_t top = kFALSE);
285 
288 
290 
291  void Swap(TFormLeafInfoCollection &other);
293 
294  virtual TFormLeafInfo* DeepCopy() const;
295 
296  virtual Bool_t Update();
297 
300  virtual Int_t GetCounterValue(TLeaf* leaf);
301  virtual Int_t ReadCounterValue(char* where);
302  virtual Int_t GetCounterValue(TLeaf* leaf, Int_t instance);
303  virtual Bool_t HasCounter() const;
304  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
305  virtual void *GetValuePointer(char *thisobj, Int_t instance = 0);
306  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
307  virtual void *GetLocalValuePointer(char *thisobj, Int_t instance = 0);
308 };
309 
310 // TFormLeafInfoCollectionSize is used to return the size of a collection
311 
316 public:
318  TFormLeafInfoCollectionSize(TClass* classptr,Long_t offset,TStreamerElement* element);
321 
323 
324  void Swap(TFormLeafInfoCollectionSize &other);
326 
327  virtual TFormLeafInfo* DeepCopy() const;
328 
329  virtual Bool_t Update();
330 
331  virtual void *GetValuePointer(TLeaf *leaf, Int_t instance = 0);
332  virtual void *GetValuePointer(char *from, Int_t instance = 0);
333  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
334  virtual void *GetLocalValuePointer( char *from, Int_t instance = 0);
335  virtual Double_t ReadValue(char *where, Int_t instance = 0);
336  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
337  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
338 };
339 
340 // TFormLeafInfoPointer is a small helper class to implement reading a data
341 // member by following a pointer inside a branch of TTree.
342 
344 public:
345  TFormLeafInfoPointer(TClass* classptr = 0, Long_t offset = 0,
346  TStreamerElement* element = 0);
347  // The default copy constructor is the right implementation.
348 
349  virtual TFormLeafInfo* DeepCopy() const;
350 
353 };
354 
355 // TFormLeafInfoMethod is a small helper class to implement executing a method
356 // of an object stored in a TTree
357 
359 
368 
369 public:
370  static TClass *ReturnTClass(TMethodCall *mc);
371 
372  TFormLeafInfoMethod(TClass* classptr = 0, TMethodCall *method = 0);
375 
376  void Swap(TFormLeafInfoMethod &other);
378 
379  virtual TFormLeafInfo* DeepCopy() const;
380 
382  virtual TClass* GetClass() const;
383  virtual void *GetLocalValuePointer( TLeaf *from, Int_t instance = 0);
384  virtual void *GetLocalValuePointer(char *from, Int_t instance = 0);
385  virtual Bool_t IsInteger() const;
386  virtual Bool_t IsString() const;
387  virtual Bool_t Update();
388 };
389 
390 // TFormLeafInfoMultiVarDim is a small helper class to implement reading a
391 // data member on a variable size array inside a TClonesArray object stored in
392 // a TTree. This is the version used when the data member is inside a
393 // non-split object.
394 
396 public:
398  TArrayI fSizes; // Array of sizes of the variable dimension
399  TFormLeafInfo *fCounter2; // Information on how to read the secondary dimensions
400  Int_t fSumOfSizes; // Sum of the content of fSizes
401  Int_t fDim; // physical number of the dimension that is variable
402  Int_t fVirtDim; // number of the virtual dimension to which this object correspond.
403  Int_t fPrimaryIndex; // Index of the dimensions that is indexing the second dimension's size
404  Int_t fSecondaryIndex; // Index of the second dimension
405 
406 protected:
408  TStreamerElement* element) : TFormLeafInfo(classptr,offset,element),fNsize(0),fSizes(),fCounter2(0),fSumOfSizes(0),fDim(0),fVirtDim(0),fPrimaryIndex(-1),fSecondaryIndex(-1) {}
409 
410 public:
411  TFormLeafInfoMultiVarDim(TClass* classptr, Long_t offset,
412  TStreamerElement* element, TFormLeafInfo* parent);
416 
417  void Swap(TFormLeafInfoMultiVarDim &other);
419 
420  virtual TFormLeafInfo* DeepCopy() const;
421 
422  /* The proper indexing and unwinding of index is done by prior leafinfo in the chain. */
423  //virtual Double_t ReadValue(char *where, Int_t instance = 0) {
424  // return TFormLeafInfo::ReadValue(where,instance);
425  //}
426 
427  virtual void LoadSizes(TBranch* branch);
428  virtual Int_t GetPrimaryIndex();
429  virtual void SetPrimaryIndex(Int_t index);
430  virtual void SetSecondaryIndex(Int_t index);
431  virtual void SetSize(Int_t index, Int_t val);
432  virtual Int_t GetSize(Int_t index);
433  virtual Int_t GetSumOfSizes();
434  virtual Double_t GetValue(TLeaf * /*leaf*/, Int_t /*instance*/ = 0);
435  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
436  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
437  virtual Int_t GetVarDim();
438  virtual Int_t GetVirtVarDim();
439  virtual Bool_t Update();
440  virtual void UpdateSizes(TArrayI *garr);
441 };
442 
443 // TFormLeafInfoMultiVarDimDirect is a small helper class to implement reading
444 // a data member on a variable size array inside a TClonesArray object stored
445 // in a TTree. This is the version used for split access
446 
448 public:
449  // The default constructor are the correct implementation.
450 
451  virtual TFormLeafInfo* DeepCopy() const;
452 
454  virtual Double_t ReadValue(char * /*where*/, Int_t /*instance*/ = 0);
455  virtual Long64_t ReadValueLong64(char *where, Int_t i= 0) { return ReadValue(where, i); }
456  virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i= 0) { return ReadValue(where, i); }
457 };
458 
459 // TFormLeafInfoMultiVarDimCollection is a small helper class to implement reading
460 // a data member which is a collection inside a TClonesArray or collection object
461 // stored in a TTree. This is the version used for split access
462 //
464 public:
465  TFormLeafInfoMultiVarDimCollection(TClass* motherclassptr, Long_t offset,
466  TClass* elementclassptr, TFormLeafInfo *parent);
468  TStreamerElement* element, TFormLeafInfo* parent);
469  // The default copy constructor is the right implementation.
470 
471  virtual TFormLeafInfo* DeepCopy() const;
472 
473  virtual Int_t GetArrayLength() { return 0; }
474  virtual void LoadSizes(TBranch* branch);
475  virtual Double_t GetValue(TLeaf *leaf, Int_t instance = 0);
476  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
477  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
479 };
480 
481 // TFormLeafInfoMultiVarDimClones is a small helper class to implement reading
482 // a data member which is a TClonesArray inside a TClonesArray or collection object
483 // stored in a TTree. This is the version used for split access
484 //
486 public:
487  TFormLeafInfoMultiVarDimClones(TClass* motherclassptr, Long_t offset,
488  TClass* elementclassptr, TFormLeafInfo *parent);
489  TFormLeafInfoMultiVarDimClones(TClass* classptr, Long_t offset,
490  TStreamerElement* element, TFormLeafInfo* parent);
491  // The default copy constructor is the right implementation.
492 
493  virtual TFormLeafInfo* DeepCopy() const;
494 
495  virtual Int_t GetArrayLength() { return 0; }
496  virtual void LoadSizes(TBranch* branch);
497  virtual Double_t GetValue(TLeaf *leaf, Int_t instance = 0);
498  virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
499  virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i= 0) { return GetValue(leaf, i); }
501 };
502 
503 // TFormLeafInfoCast is a small helper class to implement casting an object to
504 // a different type (equivalent to dynamic_cast)
505 
507 public:
508  TClass *fCasted; //! Pointer to the class we are trying to case to
509  TString fCastedName; //! Name of the class we are casting to.
510  Bool_t fGoodCast; //! Marked by ReadValue.
511  Bool_t fIsTObject; //! Indicated whether the fClass inherits from TObject.
512 
513  TFormLeafInfoCast(TClass* classptr = 0, TClass* casted = 0);
515  virtual ~TFormLeafInfoCast();
516 
517  void Swap(TFormLeafInfoCast &other);
519 
520  virtual TFormLeafInfo* DeepCopy() const;
521 
523  // Currently only implemented in TFormLeafInfoCast
524  virtual Int_t GetNdata();
525  virtual Bool_t Update();
526 };
527 
528 // TFormLeafInfoTTree is a small helper class to implement reading
529 // from the containing TTree object itself.
530 
535 
536 public:
537  TFormLeafInfoTTree(TTree *tree = 0, const char *alias = 0, TTree *current = 0);
539 
540  void Swap(TFormLeafInfoTTree &other);
542 
543  virtual TFormLeafInfo* DeepCopy() const;
544 
546  using TFormLeafInfo::GetValue;
547 
550  virtual void *GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0);
551  virtual Bool_t Update();
552 };
553 
554 
555 #endif /* ROOT_TFormLeafInfo */
556 
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:37
TFormLeafInfo & operator=(const TFormLeafInfo &orig)
Exception safe assignment operator.
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
TVirtualCollectionProxy * fCollProxy
Bool_t fGoodCast
Name of the class we are casting to.
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:74
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)
A small helper class to implement casting an object to a different type (equivalent to dynamic_cast) ...
Basic string class.
Definition: TString.h:137
virtual TClass * GetClass() const
Get the class of the underlying data.
TFormLeafInfo * fNext
Definition: TFormLeafInfo.h:73
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
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...
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:29
virtual Long64_t ReadValueLong64(char *where, Int_t i=0)
TMethodCall * fMethod
virtual Int_t GetArrayLength()
Return the current length of the array.
TString fCastedName
Pointer to the class we are trying to case to.
TString fElementName
Definition: TFormLeafInfo.h:75
virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i=0)
static T Exec(TFormLeafInfo *leaf, char *where, Int_t instance)
virtual void LoadSizes(TBranch *branch)
Load the current array sizes.
Method or function calling interface.
Definition: TMethodCall.h:41
virtual Bool_t HasCounter() const
Return true if any of underlying data has a array size counter.
static ULong64_t Exec(TFormLeafInfo *leaf, char *where, Int_t instance)
virtual Bool_t IsReference() const
char * GetObjectAddress(TLeafElement *leaf, Int_t &instance)
Returns the the location of the object pointed to.
Int_t fMultiplicity
Definition: TFormLeafInfo.h:78
A small helper class to implement reading a data member on a variable size array inside a TClonesArra...
Used to return the size of a collection.
TClass * fClass
Definition: TFormLeafInfo.h:66
virtual ~TFormLeafInfo()
Delete this object and all its content.
virtual void SetSecondaryIndex(Int_t index)
Set the primary index value.
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo 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...
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:69
A small helper class to implement reading a data member by following a pointer inside a branch of TTr...
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo and all its content.
virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i=0)
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.
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
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
A TLeaf for the general case when using the branches created via a TStreamerInfo (i.e.
Definition: TLeafElement.h:34
virtual TFormLeafInfo * DeepCopy() const
Make a complete copy of this FormLeafInfo and all its content.
A Branch for the case of an object.
long Long_t
Definition: RtypesCore.h:50
static Long64_t Exec(TFormLeafInfo *linfo, TLeaf *leaf, Int_t instance)
virtual Int_t GetVirtVarDim()
Return the virtual index (for this expression) of the dimension which varies for each elements of an ...
virtual Bool_t IsInteger() const
Return true if the underlying data is an integral value.
A small helper class to implement reading from the containing TTree object itself.
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)
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.
This class is a small helper class to implement reading a data member on an object stored in a TTree...
Definition: TFormLeafInfo.h:53
unsigned long long ULong64_t
Definition: RtypesCore.h:70
Int_t GetMultiplicity()
Reminder of the meaning of fMultiplicity:
EDataType
Definition: TDataType.h:30
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...
TFormLeafInfo * fCounter2
virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i=0)
Mother of all ROOT objects.
Definition: TObject.h:37
virtual LongDouble_t GetValueLongDouble(TLeaf *leaf, Int_t i=0)
void Swap(TFormLeafInfo &other)
virtual Bool_t IsString() const
Return true if the underlying data is a string.
TFormLeafInfoMultiVarDim(TClass *classptr, Long_t offset, TStreamerElement *element)
virtual LongDouble_t ReadValueLongDouble(char *where, Int_t i=0)
T GetTypedValue(TLeaf *leaf, Int_t instance=0)
TStreamerElement * fLocalElement
Definition: tree.py:1
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:98
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.
TFormLeafInfo * fCounter
Descriptor of the data pointed to.
Definition: TFormLeafInfo.h:72
Long_t fOffset
This is the class of the data pointed to.
Definition: TFormLeafInfo.h:68
virtual Int_t GetArrayLength()
Return the current length of the array.
A TTree is a list of TBranches.
Definition: TBranch.h:58
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)
const Bool_t kTRUE
Definition: Rtypes.h:91
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 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 GetArrayLength()
Return the current length of the array.
virtual Long64_t ReadValueLong64(char *where, Int_t i=0)
virtual Long64_t GetValueLong64(TLeaf *leaf, Int_t i=0)