Logo ROOT   6.08/07
Reference Guide
TBranch.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 12/01/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 #ifndef ROOT_TBranch
13 #define ROOT_TBranch
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TBranch //
19 // //
20 // A TTree object is a list of TBranchs. //
21 // A TBranch describes the branch data structure and supports : //
22 // the list of TBaskets (branch buffers) associated to this branch. //
23 // the list of TLeaves (branch description) //
24 //////////////////////////////////////////////////////////////////////////
25 
26 
27 #ifndef ROOT_TNamed
28 #include "TNamed.h"
29 #endif
30 
31 #ifndef ROOT_TObjArray
32 #include "TObjArray.h"
33 #endif
34 
35 #ifndef ROOT_TAttFill
36 #include "TAttFill.h"
37 #endif
38 
39 #ifndef ROOT_TDataType
40 #include "TDataType.h"
41 #endif
42 
43 class TTree;
44 class TBasket;
45 class TLeaf;
46 class TBrowser;
47 class TDirectory;
48 class TFile;
49 class TClonesArray;
50 class TTreeCloner;
51 
52  const Int_t kDoNotProcess = BIT(10); // Active bit for branches
53  const Int_t kIsClone = BIT(11); // to indicate a TBranchClones
54  const Int_t kBranchObject = BIT(12); // branch is a TObject*
55  const Int_t kBranchAny = BIT(17); // branch is an object*
57 
58 class TBranch : public TNamed , public TAttFill {
59 
60 protected:
61  friend class TTreeCloner;
62  // TBranch status bits
63  enum EStatusBits {
65  kDoNotUseBufferMap = BIT(22) // If set, at least one of the entry in the branch will use the buffer's map of classname and objects.
66  };
67 
68  static Int_t fgCount; ///<! branch counter
69  Int_t fCompress; ///< Compression level and algorithm
70  Int_t fBasketSize; ///< Initial Size of Basket Buffer
71  Int_t fEntryOffsetLen; ///< Initial Length of fEntryOffset table in the basket buffers
72  Int_t fWriteBasket; ///< Last basket number written
73  Long64_t fEntryNumber; ///< Current entry number (last one filled in this branch)
74  Int_t fOffset; ///< Offset of this branch
75  Int_t fMaxBaskets; ///< Maximum number of Baskets so far
76  Int_t fNBaskets; ///<! Number of baskets in memory
77  Int_t fSplitLevel; ///< Branch split level
78  Int_t fNleaves; ///<! Number of leaves
79  Int_t fReadBasket; ///<! Current basket number when reading
80  Long64_t fReadEntry; ///<! Current entry number when reading
81  Long64_t fFirstBasketEntry; ///<! First entry in the current basket.
82  Long64_t fNextBasketEntry; ///<! Next entry that will requires us to go to the next basket
83  TBasket *fCurrentBasket; ///<! Pointer to the current basket.
84  Long64_t fEntries; ///< Number of entries
85  Long64_t fFirstEntry; ///< Number of the first entry in this branch
86  Long64_t fTotBytes; ///< Total number of bytes in all leaves before compression
87  Long64_t fZipBytes; ///< Total number of bytes in all leaves after compression
88  TObjArray fBranches; ///< -> List of Branches of this branch
89  TObjArray fLeaves; ///< -> List of leaves of this branch
90  TObjArray fBaskets; ///< -> List of baskets of this branch
91  Int_t *fBasketBytes; ///<[fMaxBaskets] Length of baskets on file
92  Long64_t *fBasketEntry; ///<[fMaxBaskets] Table of first entry in each basket
93  Long64_t *fBasketSeek; ///<[fMaxBaskets] Addresses of baskets on file
94  TTree *fTree; ///<! Pointer to Tree header
95  TBranch *fMother; ///<! Pointer to top-level parent branch in the tree.
96  TBranch *fParent; ///<! Pointer to parent branch.
97  char *fAddress; ///<! Address of 1st leaf (variable or object)
98  TDirectory *fDirectory; ///<! Pointer to directory where this branch buffers are stored
99  TString fFileName; ///< Name of file where buffers are stored ("" if in same file as Tree header)
100  TBuffer *fEntryBuffer; ///<! Buffer used to directly pass the content without streaming
101  TBuffer *fTransientBuffer; ///<! Pointer to the current transient buffer.
102  TList *fBrowsables; ///<! List of TVirtualBranchBrowsables used for Browse()
103 
104  Bool_t fSkipZip; ///<! After being read, the buffer will not be unzipped.
105 
107  ReadLeaves_t fReadLeaves; ///<! Pointer to the ReadLeaves implementation to use.
109  FillLeaves_t fFillLeaves; ///<! Pointer to the FillLeaves implementation to use.
110  void ReadLeavesImpl(TBuffer &b);
111  void ReadLeaves0Impl(TBuffer &b);
112  void ReadLeaves1Impl(TBuffer &b);
113  void ReadLeaves2Impl(TBuffer &b);
114  void FillLeavesImpl(TBuffer &b);
115 
116  void SetSkipZip(Bool_t skip = kTRUE) { fSkipZip = skip; }
117  void Init(const char *name, const char *leaflist, Int_t compress);
118 
120  Int_t WriteBasket(TBasket* basket, Int_t where);
121 
122  TString GetRealFileName() const;
123 
124 private:
125  Int_t FillEntryBuffer(TBasket* basket,TBuffer* buf, Int_t& lnew);
126  TBranch(const TBranch&); // not implemented
127  TBranch& operator=(const TBranch&); // not implemented
128 
129 public:
130  TBranch();
131  TBranch(TTree *tree, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
132  TBranch(TBranch *parent, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
133  virtual ~TBranch();
134 
135  virtual void AddBasket(TBasket &b, Bool_t ondisk, Long64_t startEntry);
136  virtual void AddLastBasket(Long64_t startEntry);
137  virtual void Browse(TBrowser *b);
138  virtual void DeleteBaskets(Option_t* option="");
139  virtual void DropBaskets(Option_t *option = "");
140  void ExpandBasketArrays();
141  virtual Int_t Fill();
142  virtual TBranch *FindBranch(const char *name);
143  virtual TLeaf *FindLeaf(const char *name);
145  Int_t FlushOneBasket(UInt_t which);
146 
147  virtual char *GetAddress() const {return fAddress;}
148  TBasket *GetBasket(Int_t basket);
149  Int_t *GetBasketBytes() const {return fBasketBytes;}
151  virtual Long64_t GetBasketSeek(Int_t basket) const;
152  virtual Int_t GetBasketSize() const {return fBasketSize;}
153  virtual TList *GetBrowsables();
154  virtual const char* GetClassName() const;
156  Int_t GetCompressionLevel() const;
158  TDirectory *GetDirectory() const {return fDirectory;}
159  virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0);
160  virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n);
162  Int_t GetEvent(Long64_t entry=0) {return GetEntry(entry);}
163  const char *GetIconName() const;
164  virtual Int_t GetExpectedType(TClass *&clptr,EDataType &type);
165  virtual TLeaf *GetLeaf(const char *name) const;
166  virtual TFile *GetFile(Int_t mode=0);
167  const char *GetFileName() const {return fFileName.Data();}
168  Int_t GetOffset() const {return fOffset;}
169  Int_t GetReadBasket() const {return fReadBasket;}
170  Long64_t GetReadEntry() const {return fReadEntry;}
172  Long64_t GetTotalSize(Option_t *option="") const;
173  Long64_t GetTotBytes(Option_t *option="") const;
174  Long64_t GetZipBytes(Option_t *option="") const;
176  Long64_t GetFirstEntry() const {return fFirstEntry; }
180  Int_t GetMaxBaskets() const {return fMaxBaskets;}
181  Int_t GetNleaves() const {return fNleaves;}
182  Int_t GetSplitLevel() const {return fSplitLevel;}
183  Long64_t GetEntries() const {return fEntries;}
184  TTree *GetTree() const {return fTree;}
185  virtual Int_t GetRow(Int_t row);
186  virtual Bool_t GetMakeClass() const;
187  TBranch *GetMother() const;
188  TBranch *GetSubBranch(const TBranch *br) const;
190  Bool_t IsAutoDelete() const;
191  Bool_t IsFolder() const;
192  virtual void KeepCircular(Long64_t maxEntries);
193  virtual Int_t LoadBaskets();
194  virtual void Print(Option_t *option="") const;
195  virtual void ReadBasket(TBuffer &b);
196  virtual void Refresh(TBranch *b);
197  virtual void Reset(Option_t *option="");
198  virtual void ResetAfterMerge(TFileMergeInfo *);
199  virtual void ResetAddress();
200  virtual void ResetReadEntry() {fReadEntry = -1;}
201  virtual void SetAddress(void *add);
202  virtual void SetObject(void *objadd);
203  virtual void SetAutoDelete(Bool_t autodel=kTRUE);
204  virtual void SetBasketSize(Int_t buffsize);
205  virtual void SetBufferAddress(TBuffer *entryBuffer);
206  void SetCompressionAlgorithm(Int_t algorithm=0);
207  void SetCompressionLevel(Int_t level=1);
208  void SetCompressionSettings(Int_t settings=1);
209  virtual void SetEntries(Long64_t entries);
210  virtual void SetEntryOffsetLen(Int_t len, Bool_t updateSubBranches = kFALSE);
211  virtual void SetFirstEntry( Long64_t entry );
212  virtual void SetFile(TFile *file=0);
213  virtual void SetFile(const char *filename);
214  virtual Bool_t SetMakeClass(Bool_t decomposeObj = kTRUE);
215  virtual void SetOffset(Int_t offset=0) {fOffset=offset;}
216  virtual void SetStatus(Bool_t status=1);
217  virtual void SetTree(TTree *tree) { fTree = tree;}
218  virtual void SetupAddresses();
219  virtual void UpdateAddress() {;}
220  virtual void UpdateFile();
221 
222  static void ResetCount();
223 
224  ClassDef(TBranch,12); //Branch descriptor
225 };
226 
227 //______________________________________________________________________________
229 {
230  return (fCompress < 0) ? -1 : fCompress / 100;
231 }
232 
233 //______________________________________________________________________________
235 {
236  return (fCompress < 0) ? -1 : fCompress % 100;
237 }
238 
239 //______________________________________________________________________________
241 {
242  return (fCompress < 0) ? -1 : fCompress;
243 }
244 
245 #endif
virtual void UpdateAddress()
Definition: TBranch.h:219
void Init(const char *name, const char *leaflist, Int_t compress)
Definition: TBranch.cxx:268
Int_t fNBaskets
! Number of baskets in memory
Definition: TBranch.h:76
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
Definition: TBranch.cxx:1182
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:37
virtual void SetBufferAddress(TBuffer *entryBuffer)
Set address of this branch directly from a TBuffer to avoid streaming.
Definition: TBranch.cxx:2124
An array of TObjects.
Definition: TObjArray.h:39
Long64_t * GetBasketEntry() const
Definition: TBranch.h:150
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Definition: TBranch.cxx:2664
virtual void SetAddress(void *add)
Set address of this branch.
Definition: TBranch.cxx:2061
Int_t GetSplitLevel() const
Definition: TBranch.h:182
Int_t fOffset
Offset of this branch.
Definition: TBranch.h:74
long long Long64_t
Definition: RtypesCore.h:69
virtual Int_t GetBasketSize() const
Definition: TBranch.h:152
TObjArray * GetListOfBaskets()
Definition: TBranch.h:177
virtual ~TBranch()
Destructor.
Definition: TBranch.cxx:404
Long64_t fEntries
Number of entries.
Definition: TBranch.h:84
Int_t FlushOneBasket(UInt_t which)
If we have a write basket in memory and it contains some entries and has not yet been written to disk...
Definition: TBranch.cxx:1054
virtual Int_t GetExpectedType(TClass *&clptr, EDataType &type)
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
Definition: TBranch.cxx:1381
Int_t GetCompressionLevel() const
Definition: TBranch.h:234
const char Option_t
Definition: RtypesCore.h:62
Long64_t GetZipBytes(Option_t *option="") const
Return total number of zip bytes in the branch if option ="*" includes all sub-branches of this branc...
Definition: TBranch.cxx:1647
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Definition: TBranch.h:87
ReadLeaves_t fReadLeaves
! Pointer to the ReadLeaves implementation to use.
Definition: TBranch.h:107
Int_t FillEntryBuffer(TBasket *basket, TBuffer *buf, Int_t &lnew)
Copy the data from fEntryBuffer into the current basket.
Definition: TBranch.cxx:808
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
Definition: TBranch.cxx:1572
const Int_t kMapObject
Definition: TBranch.h:56
#define BIT(n)
Definition: Rtypes.h:120
void SetCompressionAlgorithm(Int_t algorithm=0)
Set compression algorithm.
Definition: TBranch.cxx:2142
virtual void DropBaskets(Option_t *option="")
Loop on all branch baskets.
Definition: TBranch.cxx:641
virtual void SetStatus(Bool_t status=1)
Set branch status to Process or DoNotProcess.
Definition: TBranch.cxx:2326
void ReadLeaves2Impl(TBuffer &b)
Read two leaves without the overhead of a loop.
Definition: TBranch.cxx:1866
virtual void SetFirstEntry(Long64_t entry)
set the first entry number (case of TBranchSTL)
Definition: TBranch.cxx:2639
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:50
void SetCompressionLevel(Int_t level=1)
Set compression level.
Definition: TBranch.cxx:2162
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name &#39;searchname&#39;.
Definition: TBranch.cxx:953
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
Bool_t IsFolder() const
Return kTRUE if more than one leaf or browsables, kFALSE otherwise.
Definition: TBranch.cxx:1672
TBasket * fCurrentBasket
! Pointer to the current basket.
Definition: TBranch.h:83
const Int_t kBranchObject
Definition: TBranch.h:54
TDirectory * GetDirectory() const
Definition: TBranch.h:158
Int_t GetOffset() const
Definition: TBranch.h:168
TObjArray fBaskets
-> List of baskets of this branch
Definition: TBranch.h:90
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Int_t fNleaves
! Number of leaves
Definition: TBranch.h:78
Int_t GetCompressionAlgorithm() const
Definition: TBranch.h:228
TString GetRealFileName() const
Get real file name.
Definition: TBranch.cxx:1491
TObjArray fLeaves
-> List of leaves of this branch
Definition: TBranch.h:89
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
Definition: TBranch.h:93
virtual void DeleteBaskets(Option_t *option="")
Loop on all branch baskets.
Definition: TBranch.cxx:610
Int_t GetEntryOffsetLen() const
Definition: TBranch.h:161
virtual Int_t GetRow(Int_t row)
Return all elements of one row unpacked in internal array fValues [Actually just returns 1 (...
Definition: TBranch.cxx:1532
void SetSkipZip(Bool_t skip=kTRUE)
Definition: TBranch.h:116
TBasket * GetFreshBasket()
Return a fresh basket by either resusing an existing basket that needs to be drop (according to TTree...
Definition: TBranch.cxx:1435
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch...
Definition: TBranch.cxx:2654
Long64_t fFirstBasketEntry
! First entry in the current basket.
Definition: TBranch.h:81
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
Definition: TBranch.h:91
virtual TList * GetBrowsables()
Returns (and, if 0, creates) browsable objects for this branch See TVirtualBranchBrowsable::FillListO...
Definition: TBranch.cxx:1170
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
Definition: TBranch.h:73
virtual void SetTree(TTree *tree)
Definition: TBranch.h:217
const Int_t kBranchAny
Definition: TBranch.h:55
Long64_t GetTotBytes(Option_t *option="") const
Return total number of bytes in the branch (excluding current buffer) if option ="*" includes all sub...
Definition: TBranch.cxx:1629
Int_t fWriteBasket
Last basket number written.
Definition: TBranch.h:72
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
Definition: TBranch.h:86
Fill Area Attributes class.
Definition: TAttFill.h:24
Int_t * GetBasketBytes() const
Definition: TBranch.h:149
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
virtual void Browse(TBrowser *b)
Browser interface.
Definition: TBranch.cxx:583
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Definition: TBranch.cxx:1478
void ReadLeavesImpl(TBuffer &b)
Loop on all leaves of this branch to read Basket buffer.
Definition: TBranch.cxx:1840
virtual Bool_t SetMakeClass(Bool_t decomposeObj=kTRUE)
Set the branch in a mode where the object are decomposed (Also known as MakeClass mode)...
Definition: TBranch.cxx:2306
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
Definition: TBranch.cxx:907
Bool_t IsAutoDelete() const
Return kTRUE if an existing object in a TBranchObject must be deleted.
Definition: TBranch.cxx:1664
const Int_t kDoNotProcess
Definition: TBranch.h:52
TObjArray * GetListOfBranches()
Definition: TBranch.h:178
TBasket * GetBasket(Int_t basket)
Return pointer to basket basketnumber in this Branch.
Definition: TBranch.cxx:1095
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition: TBranch.h:75
Long64_t GetEntryNumber() const
Definition: TBranch.h:175
Int_t fSplitLevel
Branch split level.
Definition: TBranch.h:77
TBranch()
Default constructor. Used for I/O by default.
Definition: TBranch.cxx:71
A doubly linked list.
Definition: TList.h:47
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition: TBranch.cxx:1977
virtual Int_t Fill()
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:737
const char * GetIconName() const
Return icon name depending on type of branch.
Definition: TBranch.cxx:1190
Int_t GetEvent(Long64_t entry=0)
Definition: TBranch.h:162
Int_t GetCompressionSettings() const
Definition: TBranch.h:240
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
void(TBranch::* ReadLeaves_t)(TBuffer &b)
Definition: TBranch.h:106
virtual void AddLastBasket(Long64_t startEntry)
Add the start entry of the write basket (not yet created)
Definition: TBranch.cxx:563
Int_t WriteBasket(TBasket *basket, Int_t where)
Write the current basket to disk and return the number of bytes written to the file.
Definition: TBranch.cxx:2578
TBuffer * fEntryBuffer
! Buffer used to directly pass the content without streaming
Definition: TBranch.h:100
Int_t GetReadBasket() const
Definition: TBranch.h:169
static Int_t fgCount
! branch counter
Definition: TBranch.h:68
void FillLeavesImpl(TBuffer &b)
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:1875
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:1309
virtual void SetOffset(Int_t offset=0)
Definition: TBranch.h:215
Int_t fBasketSize
Initial Size of Basket Buffer.
Definition: TBranch.h:70
void SetCompressionSettings(Int_t settings=1)
Set compression settings.
Definition: TBranch.cxx:2184
virtual void SetEntries(Long64_t entries)
Set the number of entries in this branch.
Definition: TBranch.cxx:2217
TList * fBrowsables
! List of TVirtualBranchBrowsables used for Browse()
Definition: TBranch.h:102
Long64_t GetFirstEntry() const
Definition: TBranch.h:176
Int_t GetWriteBasket() const
Definition: TBranch.h:171
const Int_t kIsClone
Definition: TBranch.h:53
FillLeaves_t fFillLeaves
! Pointer to the FillLeaves implementation to use.
Definition: TBranch.h:109
unsigned int UInt_t
Definition: RtypesCore.h:42
Long64_t fNextBasketEntry
! Next entry that will requires us to go to the next basket
Definition: TBranch.h:82
Manages buffers for branches of a Tree.
Definition: TBasket.h:38
Int_t GetMaxBaskets() const
Definition: TBranch.h:180
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:1217
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
const char * GetFileName() const
Definition: TBranch.h:167
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TBranch for reading/writing baskets.
Definition: TBranch.cxx:475
virtual void KeepCircular(Long64_t maxEntries)
keep a maximum of fMaxEntries in memory
Definition: TBranch.cxx:1684
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
Definition: TBranch.cxx:1160
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:2108
Bool_t fSkipZip
! After being read, the buffer will not be unzipped.
Definition: TBranch.h:104
Int_t fReadBasket
! Current basket number when reading
Definition: TBranch.h:79
virtual void ResetAddress()
Reset the address of the branch.
Definition: TBranch.cxx:2030
Describe directory structure in memory.
Definition: TDirectory.h:44
EStatusBits
Definition: TObject.h:55
int type
Definition: TGX11.cxx:120
EDataType
Definition: TDataType.h:30
TTree * fTree
! Pointer to Tree header
Definition: TBranch.h:94
TObjArray * GetListOfLeaves()
Definition: TBranch.h:179
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
Definition: TBranch.h:98
Long64_t GetTotalSize(Option_t *option="") const
Return total number of bytes in the branch (including current buffer)
Definition: TBranch.cxx:1610
virtual void SetEntryOffsetLen(Int_t len, Bool_t updateSubBranches=kFALSE)
Update the default value for the branch&#39;s fEntryOffsetLen if and only if it was already non zero (and...
Definition: TBranch.cxx:2200
typedef void((*Func_t)())
virtual void SetFile(TFile *file=0)
Set file where this branch writes/reads its buffers.
Definition: TBranch.cxx:2242
virtual void Refresh(TBranch *b)
Refresh this branch using new information in b This function is called by TTree::Refresh.
Definition: TBranch.cxx:1887
Long64_t GetEntries() const
Definition: TBranch.h:183
An array of clone (identical) objects.
Definition: TClonesArray.h:32
void ReadLeaves0Impl(TBuffer &b)
Read zero leaves without the overhead of a loop.
Definition: TBranch.cxx:1851
Class implementing or helping the various TTree cloning method.
Definition: TTreeCloner.h:40
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
Definition: TBranch.h:92
Definition: file.py:1
virtual void Reset(Option_t *option="")
Reset a Branch.
Definition: TBranch.cxx:1936
void(TBranch::* FillLeaves_t)(TBuffer &b)
Definition: TBranch.h:108
Long64_t fReadEntry
! Current entry number when reading
Definition: TBranch.h:80
Long64_t GetReadEntry() const
Definition: TBranch.h:170
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
virtual void AddBasket(TBasket &b, Bool_t ondisk, Long64_t startEntry)
Add the basket to this branch.
Definition: TBranch.cxx:497
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Definition: TBranch.h:95
virtual Int_t LoadBaskets()
Baskets associated to this branch are forced to be in memory.
Definition: TBranch.cxx:1710
virtual Bool_t GetMakeClass() const
Return whether this branch is in a mode where the object are decomposed or not (Also known as MakeCla...
Definition: TBranch.cxx:1541
TTree * GetTree() const
Definition: TBranch.h:184
Definition: tree.py:1
virtual char * GetAddress() const
Definition: TBranch.h:147
A TTree object has a header with a name and a title.
Definition: TTree.h:98
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition: TBranch.h:71
virtual void ReadBasket(TBuffer &b)
Loop on all leaves of this branch to read Basket buffer.
Definition: TBranch.cxx:1832
Int_t FlushBaskets()
Flush to disk all the baskets of this branch and any of subbranches.
Definition: TBranch.cxx:1008
TObjArray fBranches
-> List of Branches of this branch
Definition: TBranch.h:88
virtual void ResetReadEntry()
Definition: TBranch.h:200
virtual TFile * GetFile(Int_t mode=0)
Return pointer to the file where branch buffers reside, returns 0 in case branch buffers reside in th...
Definition: TBranch.cxx:1400
A TTree is a list of TBranches.
Definition: TBranch.h:58
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
Definition: TBranch.h:101
Int_t fCompress
Compression level and algorithm.
Definition: TBranch.h:69
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual void Print(Option_t *option="") const
Print TBranch parameters.
Definition: TBranch.cxx:1739
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Definition: TBranch.h:99
TBranch * fParent
! Pointer to parent branch.
Definition: TBranch.h:96
static char * skip(char **buf, const char *delimiters)
Definition: civetweb.c:2039
const Int_t n
Definition: legend1.C:16
Long64_t fFirstEntry
Number of the first entry in this branch.
Definition: TBranch.h:85
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition: TBranch.cxx:1551
char name[80]
Definition: TGX11.cxx:109
TBranch & operator=(const TBranch &)
void ExpandBasketArrays()
Increase BasketEntry buffer of a minimum of 10 locations and a maximum of 50 per cent of current size...
Definition: TBranch.cxx:709
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
Definition: TBranch.cxx:2315
void ReadLeaves1Impl(TBuffer &b)
Read one leaf without the overhead of a loop.
Definition: TBranch.cxx:1858
static void ResetCount()
Static function resetting fgCount.
Definition: TBranch.cxx:2053
Int_t GetNleaves() const
Definition: TBranch.h:181
const char * Data() const
Definition: TString.h:349
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.
Definition: TBranch.cxx:2095
char * fAddress
! Address of 1st leaf (variable or object)
Definition: TBranch.h:97