Logo ROOT   6.10/09
Reference Guide
TBranchClones.cxx
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 11/02/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
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 #include "TBranchClones.h"
13 
14 #include "TBasket.h"
15 #include "TClass.h"
16 #include "TClonesArray.h"
17 #include "TDataMember.h"
18 #include "TDataType.h"
19 #include "TFile.h"
20 #include "TLeafI.h"
21 #include "TRealData.h"
22 #include "TTree.h"
23 
24 #include <cstring>
25 
27 
28 /** \class TBranchClones
29 \ingroup tree
30 
31 A Branch for the case of an array of clone objects.
32 
33 See TTree.
34 */
35 
36 ////////////////////////////////////////////////////////////////////////////////
37 /// Default and i/o constructor.
38 
40 : TBranch()
41 , fList(0)
42 , fRead(0)
43 , fN(0)
44 , fNdataMax(0)
45 , fBranchCount(0)
46 {
47 }
48 
49 ////////////////////////////////////////////////////////////////////////////////
50 /// Constructor.
51 
52 TBranchClones::TBranchClones(TTree *tree, const char* name, void* pointer, Int_t basketsize, Int_t compress, Int_t splitlevel)
53 : TBranch()
54 , fList(0)
55 , fRead(0)
56 , fN(0)
57 , fNdataMax(0)
58 , fBranchCount(0)
59 {
60  Init(tree,0,name,pointer,basketsize,compress,splitlevel);
61 }
62 
63 ////////////////////////////////////////////////////////////////////////////////
64 /// Constructor.
65 
66 TBranchClones::TBranchClones(TBranch *parent, const char* name, void* pointer, Int_t basketsize, Int_t compress, Int_t splitlevel)
67 : TBranch()
68 , fList(0)
69 , fRead(0)
70 , fN(0)
71 , fNdataMax(0)
72 , fBranchCount(0)
73 {
74  Init(0,parent,name,pointer,basketsize,compress,splitlevel);
75 }
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 /// Initialization (non-virtual, to be called from constructor).
79 
80 void TBranchClones::Init(TTree *tree, TBranch *parent, const char* name, void* pointer, Int_t basketsize, Int_t compress, Int_t splitlevel)
81 {
82  if (tree==0 && parent!=0) tree = parent->GetTree();
83  fTree = tree;
84  fMother = parent ? parent->GetMother() : this;
85  fParent = parent;
86 
87  TString leaflist;
88  TString branchname;
89  TString branchcount;
90  SetName(name);
91  if ((compress == -1) && tree->GetDirectory()) {
92  TFile* bfile = 0;
93  if (tree->GetDirectory()) {
94  bfile = tree->GetDirectory()->GetFile();
95  }
96  if (bfile) {
97  compress = bfile->GetCompressionSettings();
98  }
99  }
100  char* cpointer = (char*) pointer;
101  char** ppointer = (char**) pointer;
102  fList = (TClonesArray*) *ppointer;
103  fAddress = cpointer;
104  TClass* cl = fList->GetClass();
105  if (!cl) {
106  return;
107  }
108  tree->BuildStreamerInfo(cl);
109  fClassName = cl->GetName();
110  fSplitLevel = splitlevel;
111 
112  // Create a branch to store the array count.
113  if (basketsize < 100) {
114  basketsize = 100;
115  }
116  leaflist.Form("%s_/I", name);
117  branchcount.Form("%s_", name);
118  fBranchCount = new TBranch(this, branchcount, &fN, leaflist, basketsize);
120  TLeaf* leafcount = (TLeaf*) fBranchCount->GetListOfLeaves()->UncheckedAt(0);
122  fFileName = "";
123 
124  // Loop on all public data members of the class and its base classes.
125  const char* itype = 0;
126  TRealData* rd = 0;
127  TIter next(cl->GetListOfRealData());
128  while ((rd = (TRealData *) next())) {
129  if (rd->TestBit(TRealData::kTransient)) continue;
130 
131  if (rd->IsObject()) {
132  continue;
133  }
134  TDataMember* member = rd->GetDataMember();
135  if (!member->IsPersistent()) {
136  // -- Skip non-persistent members.
137  continue;
138  }
139  if (!member->IsBasic() || member->IsaPointer()) {
140  Warning("BranchClones", "Cannot process: %s::%s", cl->GetName(), member->GetName());
141  continue;
142  }
143  // Forget TObject part if splitlevel = 2.
144  if ((splitlevel > 1) || fList->TestBit(TClonesArray::kForgetBits) || cl->CanIgnoreTObjectStreamer()) {
145  if (!std::strcmp(member->GetName(), "fBits")) {
146  continue;
147  }
148  if (!std::strcmp(member->GetName(), "fUniqueID")) {
149  continue;
150  }
151  }
153  TDataType* membertype = member->GetDataType();
154  Int_t type = membertype->GetType();
155  if (!type) {
156  Warning("BranchClones", "Cannot process: %s::%s of type zero!", cl->GetName(), member->GetName());
157  continue;
158  }
159 
160  if (type == 1) {
161  itype = "B";
162  } else if (type == 2) {
163  itype = "S";
164  } else if (type == 3) {
165  itype = "I";
166  } else if (type == 5) {
167  itype = "F";
168  } else if (type == 8) {
169  itype = "D";
170  } else if (type == 9) {
171  itype = "D";
172  } else if (type == 11) {
173  itype = "b";
174  } else if (type == 12) {
175  itype = "s";
176  } else if (type == 13) {
177  itype = "i";
178  }
179 
180  leaflist.Form("%s[%s]/%s", member->GetName(), branchcount.Data(), itype);
181  Int_t comp = compress;
182  branchname.Form("%s.%s", name, rd->GetName());
183  TBranch* branch = new TBranch(this, branchname, this, leaflist, basketsize, comp);
184  branch->SetBit(kIsClone);
185  TObjArray* leaves = branch->GetListOfLeaves();
186  TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(0);
187  leaf->SetOffset(rd->GetThisOffset());
188  leaf->SetLeafCount(leafcount);
189  Int_t arraydim = member->GetArrayDim();
190  if (arraydim) {
191  Int_t maxindex = 1;
192  while (arraydim) {
193  maxindex *= member->GetMaxIndex(--arraydim);
194  }
195  leaf->SetLen(maxindex);
196  }
197  fBranches.Add(branch);
198  }
199 }
200 
201 ////////////////////////////////////////////////////////////////////////////////
202 /// Destructor.
203 
205 {
206  delete fBranchCount;
207  fBranchCount = 0;
208  fBranches.Delete();
209  // FIXME: We might own this, possible memory leak.
210  fList = 0;
211 }
212 
213 ////////////////////////////////////////////////////////////////////////////////
214 /// Browse this branch.
215 
217 {
218  fBranches.Browse(b);
219 }
220 
221 ////////////////////////////////////////////////////////////////////////////////
222 /// Loop on all branches and fill Basket buffer.
223 
225 {
226  Int_t i = 0;
227  Int_t nbytes = 0;
228  Int_t nbranches = fBranches.GetEntriesFast();
229  char** ppointer = (char**) fAddress;
230  if (!ppointer) {
231  return 0;
232  }
233  fList = (TClonesArray*) *ppointer;
234  fN = fList->GetEntriesFast();
235  fEntries++;
236  if (fN > fNdataMax) {
237  fNdataMax = fList->GetSize();
238  TString branchcount;
239  branchcount.Form("%s_", GetName());
240  TLeafI* leafi = (TLeafI*) fBranchCount->GetLeaf(branchcount);
241  leafi->SetMaximum(fNdataMax);
242  for (i = 0; i < nbranches; i++) {
243  TBranch* branch = (TBranch*) fBranches.UncheckedAt(i);
244  TObjArray* leaves = branch->GetListOfLeaves();
245  TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(0);
246  leaf->SetAddress();
247  }
248  }
249  nbytes += fBranchCount->FillImpl(imtHelper);
250  for (i = 0; i < nbranches; i++) {
251  TBranch* branch = (TBranch*) fBranches.UncheckedAt(i);
252  TObjArray* leaves = branch->GetListOfLeaves();
253  TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(0);
254  leaf->Import(fList, fN);
255  nbytes += branch->FillImpl(imtHelper);
256  }
257  return nbytes;
258 }
259 
260 ////////////////////////////////////////////////////////////////////////////////
261 /// Read all branches and return total number of bytes read.
262 
264 {
265  if (TestBit(kDoNotProcess) && !getall) {
266  return 0;
267  }
268  Int_t nbytes = fBranchCount->GetEntry(entry, getall);
269  TLeaf* leafcount = (TLeaf*) fBranchCount->GetListOfLeaves()->UncheckedAt(0);
270  fN = Int_t(leafcount->GetValue());
271  if (fN <= 0) {
272  if (fList) {
273  fList->Clear();
274  }
275  return 0;
276  }
277  TBranch* branch = 0;
278  Int_t nbranches = fBranches.GetEntriesFast();
279  // If fList exists, create clones array objects.
280  if (fList) {
281  fList->Clear();
283  for (Int_t i = 0; i < nbranches; i++) {
284  branch = (TBranch*) fBranches.UncheckedAt(i);
285  if (((TLeaf*) branch->GetListOfLeaves()->UncheckedAt(0))->GetOffset() < 0) {
286  continue;
287  }
288  nbytes += branch->GetEntryExport(entry, getall, fList, fN);
289  }
290  } else {
291  for (Int_t i = 0; i < nbranches; i++) {
292  branch = (TBranch*) fBranches.UncheckedAt(i);
293  nbytes += branch->GetEntry(entry, getall);
294  }
295  }
296  return nbytes;
297 }
298 
299 ////////////////////////////////////////////////////////////////////////////////
300 /// Print branch parameters.
301 
302 void TBranchClones::Print(Option_t *option) const
303 {
304  fBranchCount->Print(option);
305  Int_t nbranches = fBranches.GetEntriesFast();
306  for (Int_t i = 0; i < nbranches; i++) {
307  TBranch* branch = (TBranch*) fBranches.At(i);
308  branch->Print(option);
309  }
310 }
311 
312 ////////////////////////////////////////////////////////////////////////////////
313 /// Reset branch.
314 ///
315 /// - Existing buffers are deleted
316 /// - Entries, max and min are reset
317 
319 {
320  fEntries = 0;
321  fTotBytes = 0;
322  fZipBytes = 0;
323  Int_t nbranches = fBranches.GetEntriesFast();
324  for (Int_t i = 0; i < nbranches; i++) {
325  TBranch* branch = (TBranch*) fBranches.At(i);
326  branch->Reset(option);
327  }
328  fBranchCount->Reset();
329 }
330 
331 ////////////////////////////////////////////////////////////////////////////////
332 /// Reset branch after a merge.
333 ///
334 /// - Existing buffers are deleted
335 /// - Entries, max and min are reset
336 
338 {
339  fEntries = 0;
340  fTotBytes = 0;
341  fZipBytes = 0;
342  Int_t nbranches = fBranches.GetEntriesFast();
343  for (Int_t i = 0; i < nbranches; i++) {
344  TBranch* branch = (TBranch*) fBranches.At(i);
345  branch->ResetAfterMerge(info);
346  }
348 }
349 
350 ////////////////////////////////////////////////////////////////////////////////
351 /// Set address of this branch.
352 
354 {
355  fReadEntry = -1;
356  fAddress = (char*) addr;
357  char** pp= (char**) fAddress;
358  if (pp && (*pp == 0)) {
359  // We've been asked to allocate an object for the user.
360  *pp= (char*) new TClonesArray(fClassName);
361  }
362  fList = 0;
363  if (pp) {
364  fList = (TClonesArray*) *pp;
365  }
367 }
368 
369 ////////////////////////////////////////////////////////////////////////////////
370 /// Reset basket size for all sub-branches.
371 
373 {
374  TBranch::SetBasketSize(buffsize);
375 
376  Int_t nbranches = fBranches.GetEntriesFast();
377  for (Int_t i = 0; i < nbranches; i++) {
378  TBranch* branch = (TBranch*) fBranches[i];
379  branch->SetBasketSize(fBasketSize);
380  }
381 }
382 
383 ////////////////////////////////////////////////////////////////////////////////
384 /// Serialize/Deserialize from a buffer.
385 
386 void TBranchClones::Streamer(TBuffer& b)
387 {
388  UInt_t R__s, R__c;
389  if (b.IsReading()) {
390  b.ReadVersion(&R__s, &R__c);
391  TNamed::Streamer(b);
392  b >> fCompress;
393  b >> fBasketSize;
394  b >> fEntryOffsetLen;
395  b >> fMaxBaskets;
396  b >> fWriteBasket;
397  b >> fEntryNumber;
398  b >> fEntries;
399  b >> fTotBytes;
400  b >> fZipBytes;
401  b >> fOffset;
402  b >> fBranchCount;
403  fClassName.Streamer(b);
404  fBranches.Streamer(b);
405  fTree = 0;
406  TBranch* branch = 0;
407  TLeaf* leaf = 0;
408  Int_t nbranches = fBranches.GetEntriesFast();
409  for (Int_t i = 0; i < nbranches; i++) {
410  branch = (TBranch*) fBranches[i];
411  branch->SetBit(kIsClone);
412  leaf = (TLeaf*) branch->GetListOfLeaves()->UncheckedAt(0);
413  leaf->SetOffset(-1);
414  }
415  fRead = 1;
416  TClass* cl = TClass::GetClass((const char*) fClassName);
417  if (!cl) {
418  Warning("Streamer", "Unknown class: %s. Cannot read BranchClones: %s", fClassName.Data(), GetName());
420  return;
421  }
422  if (!cl->GetListOfRealData()) {
423  cl->BuildRealData();
424  }
425  TString branchname;
426  TRealData* rd = 0;
427  TIter next(cl->GetListOfRealData());
428  while ((rd = (TRealData*) next())) {
429  if (rd->TestBit(TRealData::kTransient)) continue;
430 
431  TDataMember* member = rd->GetDataMember();
432  if (!member || !member->IsBasic() || !member->IsPersistent()) {
433  continue;
434  }
435  TDataType* membertype = member->GetDataType();
436  if (!membertype->GetType()) {
437  continue;
438  }
439  branchname.Form("%s.%s", GetName(), rd->GetName());
440  branch = (TBranch*) fBranches.FindObject(branchname);
441  if (!branch) {
442  continue;
443  }
444  TObjArray* leaves = branch->GetListOfLeaves();
445  leaf = (TLeaf*) leaves->UncheckedAt(0);
446  leaf->SetOffset(rd->GetThisOffset());
447  }
448  b.CheckByteCount(R__s, R__c, TBranchClones::IsA());
449  } else {
450  R__c = b.WriteVersion(TBranchClones::IsA(), kTRUE);
451  TNamed::Streamer(b);
452  b << fCompress;
453  b << fBasketSize;
454  b << fEntryOffsetLen;
455  b << fMaxBaskets;
456  b << fWriteBasket;
457  b << fEntryNumber;
458  b << fEntries;
459  b << fTotBytes;
460  b << fZipBytes;
461  b << fOffset;
462  b << fBranchCount;
463  fClassName.Streamer(b);
464  fBranches.Streamer(b);
465  b.SetByteCount(R__c, kTRUE);
466  }
467 }
468 
469 ////////////////////////////////////////////////////////////////////////////////
470 /// Refresh the value of fDirectory (i.e. where this branch writes/reads its buffers)
471 /// with the current value of fTree->GetCurrentFile unless this branch has been
472 /// redirected to a different file. Also update the sub-branches.
473 
475 {
478 }
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:32
Bool_t IsReading() const
Definition: TBuffer.h:81
TBranchClones()
Default and i/o constructor.
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
Definition: TTree.cxx:2560
An array of TObjects.
Definition: TObjArray.h:37
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:810
virtual void SetAddress(void *add)
Set address of this branch.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Definition: TBranch.cxx:2762
virtual void SetAddress(void *add)
Set address of this branch.
Definition: TBranch.cxx:2148
Int_t fOffset
Offset of this branch.
Definition: TBranch.h:75
long long Long64_t
Definition: RtypesCore.h:69
TString fClassName
name of the class of the objets in the ClonesArray
Definition: TBranchClones.h:36
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Long64_t fEntries
Number of entries.
Definition: TBranch.h:85
const char Option_t
Definition: RtypesCore.h:62
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Definition: TObjArray.cxx:329
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:31
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Definition: TBranch.h:88
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches and return total number of bytes read.
Bool_t TestBit(UInt_t f) const
Definition: TObject.h:159
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all branches and fill Basket buffer.
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:131
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
Int_t GetOffset() const
Definition: TBranch.h:172
Int_t fRead
! flag = 1 if clonesarray has been read
Definition: TBranchClones.h:33
Basic string class.
Definition: TString.h:129
TBranch * fBranchCount
Branch with clones count.
Definition: TBranchClones.h:37
virtual void Import(TClonesArray *, Int_t)
Definition: TLeaf.h:83
int Int_t
Definition: RtypesCore.h:41
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TObject * At(Int_t idx) const
Definition: TObjArray.h:165
virtual ~TBranchClones()
Destructor.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:687
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
Definition: TBranch.h:74
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Int_t fWriteBasket
Last basket number written.
Definition: TBranch.h:73
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
friend class TClonesArray
Definition: TObject.h:200
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
Definition: TBranch.h:87
virtual Double_t GetValue(Int_t i=0) const
Definition: TLeaf.h:117
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Definition: TObjArray.cxx:396
virtual void SetLen(Int_t len=1)
Definition: TLeaf.h:97
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Definition: TBranch.cxx:1552
const Int_t kDoNotProcess
Definition: TBranch.h:45
Long_t GetThisOffset() const
Definition: TRealData.h:55
TDataType * GetDataType() const
Definition: TDataMember.h:72
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition: TBranch.h:76
virtual void SetAddress(void *add=0)
Definition: TLeaf.h:119
virtual TFile * GetFile() const
Definition: TDirectory.h:145
Int_t fSplitLevel
Branch split level.
Definition: TBranch.h:78
TBranch()
Default constructor. Used for I/O by default.
Definition: TBranch.cxx:76
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
virtual void Clear(Option_t *option="")
Clear the clones array.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition: TBranch.cxx:2064
Int_t GetType() const
Definition: TDataType.h:68
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition: TClass.cxx:1943
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n)
Read all leaves of an entry and export buffers to real objects in a TClonesArray list.
Definition: TBranch.cxx:1383
Int_t fBasketSize
Initial Size of Basket Buffer.
Definition: TBranch.h:71
Basic data type descriptor (datatype information is obtained from CINT).
Definition: TDataType.h:44
TDataMember * GetDataMember() const
Definition: TRealData.h:53
const Int_t kIsClone
Definition: TBranch.h:46
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition: TString.cxx:2332
virtual void SetBasketSize(Int_t buffsize)
Reset basket size for all sub-branches.
unsigned int UInt_t
Definition: RtypesCore.h:42
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:30
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Definition: TBranch.cxx:1291
Bool_t CanIgnoreTObjectStreamer()
Definition: TClass.h:348
Int_t GetArrayDim() const
Return number of array dimensions.
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:71
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
Definition: TLeaf.cxx:340
virtual void SetOffset(Int_t offset=0)
Definition: TLeaf.h:98
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
Definition: TBranch.cxx:2195
TObject * UncheckedAt(Int_t i) const
Definition: TObjArray.h:89
#define ClassImp(name)
Definition: Rtypes.h:336
void Init(TTree *tree, TBranch *parent, const char *name, void *clonesaddress, Int_t basketsize=32000, Int_t compress=-1, Int_t splitlevel=1)
Initialization (non-virtual, to be called from constructor).
TDirectory * GetDirectory() const
Definition: TTree.h:380
int type
Definition: TGX11.cxx:120
TList * GetListOfRealData() const
Definition: TClass.h:395
TTree * fTree
! Pointer to Tree header
Definition: TBranch.h:95
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
TObjArray * GetListOfLeaves()
Definition: TBranch.h:183
virtual void Reset(Option_t *option="")
Reset branch.
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
Definition: TBranch.h:99
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2885
Bool_t IsPersistent() const
Definition: TDataMember.h:87
TClass * GetClass() const
Definition: TClonesArray.h:57
virtual void SetMaximum(Int_t max)
Definition: TLeafI.h:53
An array of clone (identical) objects.
Definition: TClonesArray.h:32
A Branch for the case of an array of clone objects.
Definition: TBranchClones.h:29
virtual void ExpandCreateFast(Int_t n)
Expand or shrink the array to n elements and create the clone objects by calling their default ctor...
TClonesArray * fList
! Pointer to the clonesarray
Definition: TBranchClones.h:32
virtual void Reset(Option_t *option="")
Reset a Branch.
Definition: TBranch.cxx:2023
Long64_t fReadEntry
! Current entry number when reading
Definition: TBranch.h:81
virtual void Browse(TBrowser *b)
Browse this branch.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Definition: TBranch.h:96
TTree * GetTree() const
Definition: TBranch.h:188
Definition: tree.py:1
void Add(TObject *obj)
Definition: TObjArray.h:73
A TTree object has a header with a name and a title.
Definition: TTree.h:78
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition: TBranch.h:72
Int_t fN
! Number of elements in ClonesArray
Definition: TBranchClones.h:34
TObjArray fBranches
-> List of Branches of this branch
Definition: TBranch.h:89
virtual Int_t GetSize() const
Definition: TCollection.h:89
A TTree is a list of TBranches.
Definition: TBranch.h:57
virtual const char * GetName() const
Returns name of object.
Definition: TRealData.h:52
Int_t fCompress
Compression level and algorithm.
Definition: TBranch.h:70
Bool_t IsaPointer() const
Return true if data member is a pointer.
virtual void Print(Option_t *option="") const
Print TBranch parameters.
Definition: TBranch.cxx:1816
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Definition: TBranch.h:100
const Bool_t kTRUE
Definition: RtypesCore.h:91
TBranch * fParent
! Pointer to parent branch.
Definition: TBranch.h:97
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset branch after a merge.
Bool_t IsObject() const
Definition: TRealData.h:56
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition: TBranch.cxx:1625
A TLeaf for an Integer data type.
Definition: TLeafI.h:27
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:859
Int_t fNdataMax
! Maximum value of fN
Definition: TBranchClones.h:35
Int_t GetCompressionSettings() const
Definition: TFile.h:374
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void Print(Option_t *option="") const
Print branch parameters.
const char * Data() const
Definition: TString.h:347
char * fAddress
! Address of 1st leaf (variable or object)
Definition: TBranch.h:98