Logo ROOT   6.10/00
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #include <memory>
27 
28 #include "TNamed.h"
29 
30 #include "TObjArray.h"
31 
32 #include "TAttFill.h"
33 
34 #include "TDataType.h"
35 
36 class TTree;
37 class TBasket;
38 class TLeaf;
39 class TBrowser;
40 class TDirectory;
41 class TFile;
42 class TClonesArray;
43 class TTreeCloner;
44 
45  const Int_t kDoNotProcess = BIT(10); // Active bit for branches
46  const Int_t kIsClone = BIT(11); // to indicate a TBranchClones
47  const Int_t kBranchObject = BIT(12); // branch is a TObject*
48  const Int_t kBranchAny = BIT(17); // branch is an object*
50 
51 namespace ROOT {
52  namespace Internal {
53  class TBranchIMTHelper; ///< A helper class for managing IMT work during TTree:Fill operations.
54  }
55 }
56 
57 class TBranch : public TNamed , public TAttFill {
58 
59 protected:
60  friend class TTreeCloner;
61  friend class TTree;
62 
63  // TBranch status bits
64  enum EStatusBits {
66  kDoNotUseBufferMap = BIT(22) // If set, at least one of the entry in the branch will use the buffer's map of classname and objects.
67  };
68 
69  static Int_t fgCount; ///<! branch counter
70  Int_t fCompress; ///< Compression level and algorithm
71  Int_t fBasketSize; ///< Initial Size of Basket Buffer
72  Int_t fEntryOffsetLen; ///< Initial Length of fEntryOffset table in the basket buffers
73  Int_t fWriteBasket; ///< Last basket number written
74  Long64_t fEntryNumber; ///< Current entry number (last one filled in this branch)
75  Int_t fOffset; ///< Offset of this branch
76  Int_t fMaxBaskets; ///< Maximum number of Baskets so far
77  Int_t fNBaskets; ///<! Number of baskets in memory
78  Int_t fSplitLevel; ///< Branch split level
79  Int_t fNleaves; ///<! Number of leaves
80  Int_t fReadBasket; ///<! Current basket number when reading
81  Long64_t fReadEntry; ///<! Current entry number when reading
82  Long64_t fFirstBasketEntry; ///<! First entry in the current basket.
83  Long64_t fNextBasketEntry; ///<! Next entry that will requires us to go to the next basket
84  TBasket *fCurrentBasket; ///<! Pointer to the current basket.
85  Long64_t fEntries; ///< Number of entries
86  Long64_t fFirstEntry; ///< Number of the first entry in this branch
87  Long64_t fTotBytes; ///< Total number of bytes in all leaves before compression
88  Long64_t fZipBytes; ///< Total number of bytes in all leaves after compression
89  TObjArray fBranches; ///< -> List of Branches of this branch
90  TObjArray fLeaves; ///< -> List of leaves of this branch
91  TObjArray fBaskets; ///< -> List of baskets of this branch
92  Int_t *fBasketBytes; ///<[fMaxBaskets] Length of baskets on file
93  Long64_t *fBasketEntry; ///<[fMaxBaskets] Table of first entry in each basket
94  Long64_t *fBasketSeek; ///<[fMaxBaskets] Addresses of baskets on file
95  TTree *fTree; ///<! Pointer to Tree header
96  TBranch *fMother; ///<! Pointer to top-level parent branch in the tree.
97  TBranch *fParent; ///<! Pointer to parent branch.
98  char *fAddress; ///<! Address of 1st leaf (variable or object)
99  TDirectory *fDirectory; ///<! Pointer to directory where this branch buffers are stored
100  TString fFileName; ///< Name of file where buffers are stored ("" if in same file as Tree header)
101  TBuffer *fEntryBuffer; ///<! Buffer used to directly pass the content without streaming
102  TBuffer *fTransientBuffer; ///<! Pointer to the current transient buffer.
103  TList *fBrowsables; ///<! List of TVirtualBranchBrowsables used for Browse()
104 
105  Bool_t fSkipZip; ///<! After being read, the buffer will not be unzipped.
106 
108  ReadLeaves_t fReadLeaves; ///<! Pointer to the ReadLeaves implementation to use.
110  FillLeaves_t fFillLeaves; ///<! Pointer to the FillLeaves implementation to use.
111  void ReadLeavesImpl(TBuffer &b);
112  void ReadLeaves0Impl(TBuffer &b);
113  void ReadLeaves1Impl(TBuffer &b);
114  void ReadLeaves2Impl(TBuffer &b);
115  void FillLeavesImpl(TBuffer &b);
116 
118  void Init(const char *name, const char *leaflist, Int_t compress);
119 
121  Int_t WriteBasket(TBasket* basket, Int_t where) { return WriteBasketImpl(basket, where, nullptr); }
122 
123  TString GetRealFileName() const;
124 
125 private:
126  Int_t FillEntryBuffer(TBasket* basket,TBuffer* buf, Int_t& lnew);
128  TBranch(const TBranch&) = delete; // not implemented
129  TBranch& operator=(const TBranch&) = delete; // not implemented
130 
131 public:
132  TBranch();
133  TBranch(TTree *tree, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
134  TBranch(TBranch *parent, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
135  virtual ~TBranch();
136 
137  virtual void AddBasket(TBasket &b, Bool_t ondisk, Long64_t startEntry);
138  virtual void AddLastBasket(Long64_t startEntry);
139  virtual void Browse(TBrowser *b);
140  virtual void DeleteBaskets(Option_t* option="");
141  virtual void DropBaskets(Option_t *option = "");
142  void ExpandBasketArrays();
143  Int_t Fill() { return FillImpl(nullptr); }
145  virtual TBranch *FindBranch(const char *name);
146  virtual TLeaf *FindLeaf(const char *name);
148  Int_t FlushOneBasket(UInt_t which);
149 
150  virtual char *GetAddress() const {return fAddress;}
151  TBasket *GetBasket(Int_t basket);
152  Int_t *GetBasketBytes() const {return fBasketBytes;}
154  virtual Long64_t GetBasketSeek(Int_t basket) const;
155  virtual Int_t GetBasketSize() const {return fBasketSize;}
156  virtual TList *GetBrowsables();
157  virtual const char* GetClassName() const;
159  Int_t GetCompressionLevel() const;
161  TDirectory *GetDirectory() const {return fDirectory;}
162  virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0);
163  virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n);
165  Int_t GetEvent(Long64_t entry=0) {return GetEntry(entry);}
166  const char *GetIconName() const;
167  virtual Int_t GetExpectedType(TClass *&clptr,EDataType &type);
168  virtual TLeaf *GetLeaf(const char *name) const;
169  virtual TFile *GetFile(Int_t mode=0);
170  const char *GetFileName() const {return fFileName.Data();}
171  Int_t GetOffset() const {return fOffset;}
172  Int_t GetReadBasket() const {return fReadBasket;}
173  Long64_t GetReadEntry() const {return fReadEntry;}
175  Long64_t GetTotalSize(Option_t *option="") const;
176  Long64_t GetTotBytes(Option_t *option="") const;
177  Long64_t GetZipBytes(Option_t *option="") const;
179  Long64_t GetFirstEntry() const {return fFirstEntry; }
183  Int_t GetMaxBaskets() const {return fMaxBaskets;}
184  Int_t GetNleaves() const {return fNleaves;}
185  Int_t GetSplitLevel() const {return fSplitLevel;}
186  Long64_t GetEntries() const {return fEntries;}
187  TTree *GetTree() const {return fTree;}
188  virtual Int_t GetRow(Int_t row);
189  virtual Bool_t GetMakeClass() const;
190  TBranch *GetMother() const;
191  TBranch *GetSubBranch(const TBranch *br) const;
193  Bool_t IsAutoDelete() const;
194  Bool_t IsFolder() const;
195  virtual void KeepCircular(Long64_t maxEntries);
196  virtual Int_t LoadBaskets();
197  virtual void Print(Option_t *option="") const;
198  virtual void ReadBasket(TBuffer &b);
199  virtual void Refresh(TBranch *b);
200  virtual void Reset(Option_t *option="");
201  virtual void ResetAfterMerge(TFileMergeInfo *);
202  virtual void ResetAddress();
203  virtual void ResetReadEntry() {fReadEntry = -1;}
204  virtual void SetAddress(void *add);
205  virtual void SetObject(void *objadd);
206  virtual void SetAutoDelete(Bool_t autodel=kTRUE);
207  virtual void SetBasketSize(Int_t buffsize);
208  virtual void SetBufferAddress(TBuffer *entryBuffer);
209  void SetCompressionAlgorithm(Int_t algorithm=0);
210  void SetCompressionLevel(Int_t level=1);
211  void SetCompressionSettings(Int_t settings=1);
212  virtual void SetEntries(Long64_t entries);
213  virtual void SetEntryOffsetLen(Int_t len, Bool_t updateSubBranches = kFALSE);
214  virtual void SetFirstEntry( Long64_t entry );
215  virtual void SetFile(TFile *file=0);
216  virtual void SetFile(const char *filename);
217  virtual Bool_t SetMakeClass(Bool_t decomposeObj = kTRUE);
218  virtual void SetOffset(Int_t offset=0) {fOffset=offset;}
219  virtual void SetStatus(Bool_t status=1);
220  virtual void SetTree(TTree *tree) { fTree = tree;}
221  virtual void SetupAddresses();
222  virtual void UpdateAddress() {;}
223  virtual void UpdateFile();
224 
225  static void ResetCount();
226 
227  ClassDef(TBranch,12); //Branch descriptor
228 };
229 
230 //______________________________________________________________________________
232 {
233  return (fCompress < 0) ? -1 : fCompress / 100;
234 }
235 
236 //______________________________________________________________________________
238 {
239  return (fCompress < 0) ? -1 : fCompress % 100;
240 }
241 
242 //______________________________________________________________________________
244 {
245  return (fCompress < 0) ? -1 : fCompress;
246 }
247 
248 #endif
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:1558
virtual void UpdateAddress()
Definition: TBranch.h:222
Long64_t GetReadEntry() const
Definition: TBranch.h:173
void Init(const char *name, const char *leaflist, Int_t compress)
Definition: TBranch.cxx:273
Int_t fNBaskets
! Number of baskets in memory
Definition: TBranch.h:77
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:32
virtual void SetBufferAddress(TBuffer *entryBuffer)
Set address of this branch directly from a TBuffer to avoid streaming.
Definition: TBranch.cxx:2141
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:753
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Definition: TBranch.cxx:2692
virtual void SetAddress(void *add)
Set address of this branch.
Definition: TBranch.cxx:2078
Int_t fOffset
Offset of this branch.
Definition: TBranch.h:75
long long Long64_t
Definition: RtypesCore.h:69
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Definition: TBranch.cxx:1495
Int_t GetCompressionAlgorithm() const
Definition: TBranch.h:231
TObjArray * GetListOfBaskets()
Definition: TBranch.h:180
virtual ~TBranch()
Destructor.
Definition: TBranch.cxx:417
Long64_t fEntries
Number of entries.
Definition: TBranch.h:85
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:1071
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:1398
const char Option_t
Definition: RtypesCore.h:62
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Definition: TBranch.h:88
ReadLeaves_t fReadLeaves
! Pointer to the ReadLeaves implementation to use.
Definition: TBranch.h:108
Int_t FillEntryBuffer(TBasket *basket, TBuffer *buf, Int_t &lnew)
Copy the data from fEntryBuffer into the current basket.
Definition: TBranch.cxx:825
const Int_t kMapObject
Definition: TBranch.h:49
#define BIT(n)
Definition: Rtypes.h:75
void SetCompressionAlgorithm(Int_t algorithm=0)
Set compression algorithm.
Definition: TBranch.cxx:2159
virtual void DropBaskets(Option_t *option="")
Loop on all branch baskets.
Definition: TBranch.cxx:654
virtual void SetStatus(Bool_t status=1)
Set branch status to Process or DoNotProcess.
Definition: TBranch.cxx:2343
void ReadLeaves2Impl(TBuffer &b)
Read two leaves without the overhead of a loop.
Definition: TBranch.cxx:1883
virtual void SetFirstEntry(Long64_t entry)
set the first entry number (case of TBranchSTL)
Definition: TBranch.cxx:2667
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
void(TBranch::* ReadLeaves_t)(TBuffer &b)
Definition: TBranch.h:107
void SetCompressionLevel(Int_t level=1)
Set compression level.
Definition: TBranch.cxx:2179
Long64_t GetTotBytes(Option_t *option="") const
Return total number of bytes in the branch (excluding current buffer) if option =&quot;*&quot; includes all sub...
Definition: TBranch.cxx:1646
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name &#39;searchname&#39;.
Definition: TBranch.cxx:970
virtual void Print(Option_t *option="") const
Print TBranch parameters.
Definition: TBranch.cxx:1756
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
TBasket * fCurrentBasket
! Pointer to the current basket.
Definition: TBranch.h:84
const Int_t kBranchObject
Definition: TBranch.h:47
TObjArray fBaskets
-&gt; List of baskets of this branch
Definition: TBranch.h:91
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
Definition: TBranch.cxx:1177
Int_t fNleaves
! Number of leaves
Definition: TBranch.h:79
TObjArray fLeaves
-&gt; List of leaves of this branch
Definition: TBranch.h:90
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
Definition: TBranch.h:94
Int_t GetSplitLevel() const
Definition: TBranch.h:185
virtual void DeleteBaskets(Option_t *option="")
Loop on all branch baskets.
Definition: TBranch.cxx:623
Long64_t * GetBasketEntry() const
Definition: TBranch.h:153
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:1549
void SetSkipZip(Bool_t skip=kTRUE)
Definition: TBranch.h:117
TBasket * GetFreshBasket()
Return a fresh basket by either resusing an existing basket that needs to be drop (according to TTree...
Definition: TBranch.cxx:1452
TString GetRealFileName() const
Get real file name.
Definition: TBranch.cxx:1508
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch...
Definition: TBranch.cxx:2682
Long64_t fFirstBasketEntry
! First entry in the current basket.
Definition: TBranch.h:82
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
Definition: TBranch.h:92
virtual TList * GetBrowsables()
Returns (and, if 0, creates) browsable objects for this branch See TVirtualBranchBrowsable::FillListO...
Definition: TBranch.cxx:1187
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
Definition: TBranch.h:74
virtual void SetTree(TTree *tree)
Definition: TBranch.h:220
const Int_t kBranchAny
Definition: TBranch.h:48
const char * Data() const
Definition: TString.h:344
Int_t fWriteBasket
Last basket number written.
Definition: TBranch.h:73
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
Definition: TBranch.h:87
Fill Area Attributes class.
Definition: TAttFill.h:19
#define ClassDef(name, id)
Definition: Rtypes.h:297
Int_t GetOffset() const
Definition: TBranch.h:171
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void Browse(TBrowser *b)
Browser interface.
Definition: TBranch.cxx:596
void ReadLeavesImpl(TBuffer &b)
Loop on all leaves of this branch to read Basket buffer.
Definition: TBranch.cxx:1857
Int_t * GetBasketBytes() const
Definition: TBranch.h:152
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:2323
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
Definition: TBranch.cxx:924
const Int_t kDoNotProcess
Definition: TBranch.h:45
Long64_t GetEntries() const
Definition: TBranch.h:186
Long64_t GetZipBytes(Option_t *option="") const
Return total number of zip bytes in the branch if option =&quot;*&quot; includes all sub-branches of this branc...
Definition: TBranch.cxx:1664
TObjArray * GetListOfBranches()
Definition: TBranch.h:181
TBasket * GetBasket(Int_t basket)
Return pointer to basket basketnumber in this Branch.
Definition: TBranch.cxx:1112
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition: TBranch.h:76
Long64_t GetEntryNumber() const
Definition: TBranch.h:178
Int_t fSplitLevel
Branch split level.
Definition: TBranch.h:78
TBranch & operator=(const TBranch &)=delete
TBranch()
Default constructor. Used for I/O by default.
Definition: TBranch.cxx:76
A doubly linked list.
Definition: TList.h:43
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition: TBranch.cxx:1994
Int_t Fill()
Definition: TBranch.h:143
Int_t GetEvent(Long64_t entry=0)
Definition: TBranch.h:165
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual char * GetAddress() const
Definition: TBranch.h:150
virtual void AddLastBasket(Long64_t startEntry)
Add the start entry of the write basket (not yet created)
Definition: TBranch.cxx:576
Int_t WriteBasket(TBasket *basket, Int_t where)
Definition: TBranch.h:121
TBuffer * fEntryBuffer
! Buffer used to directly pass the content without streaming
Definition: TBranch.h:101
static Int_t fgCount
! branch counter
Definition: TBranch.h:69
void FillLeavesImpl(TBuffer &b)
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:1892
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:1326
virtual void SetOffset(Int_t offset=0)
Definition: TBranch.h:218
Int_t fBasketSize
Initial Size of Basket Buffer.
Definition: TBranch.h:71
void SetCompressionSettings(Int_t settings=1)
Set compression settings.
Definition: TBranch.cxx:2201
virtual void SetEntries(Long64_t entries)
Set the number of entries in this branch.
Definition: TBranch.cxx:2234
TList * fBrowsables
! List of TVirtualBranchBrowsables used for Browse()
Definition: TBranch.h:103
Long64_t GetTotalSize(Option_t *option="") const
Return total number of bytes in the branch (including current buffer)
Definition: TBranch.cxx:1627
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition: TBranch.cxx:1568
const Int_t kIsClone
Definition: TBranch.h:46
FillLeaves_t fFillLeaves
! Pointer to the FillLeaves implementation to use.
Definition: TBranch.h:110
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:83
Manages buffers for branches of a Tree.
Definition: TBasket.h:36
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:1234
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:71
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
Definition: TBranch.cxx:1589
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TBranch for reading/writing baskets.
Definition: TBranch.cxx:488
TTree * GetTree() const
Definition: TBranch.h:187
virtual void KeepCircular(Long64_t maxEntries)
keep a maximum of fMaxEntries in memory
Definition: TBranch.cxx:1701
const Bool_t kFALSE
Definition: RtypesCore.h:92
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:2125
virtual Int_t GetBasketSize() const
Definition: TBranch.h:155
Bool_t fSkipZip
! After being read, the buffer will not be unzipped.
Definition: TBranch.h:105
Int_t fReadBasket
! Current basket number when reading
Definition: TBranch.h:80
virtual void ResetAddress()
Reset the address of the branch.
Definition: TBranch.cxx:2047
void(TBranch::* FillLeaves_t)(TBuffer &b)
Definition: TBranch.h:109
Describe directory structure in memory.
Definition: TDirectory.h:34
EStatusBits
Definition: TObject.h:57
Int_t WriteBasketImpl(TBasket *basket, Int_t where, ROOT::Internal::TBranchIMTHelper *)
Write the current basket to disk and return the number of bytes written to the file.
Definition: TBranch.cxx:2595
int type
Definition: TGX11.cxx:120
Bool_t IsAutoDelete() const
Return kTRUE if an existing object in a TBranchObject must be deleted.
Definition: TBranch.cxx:1681
EDataType
Definition: TDataType.h:28
TTree * fTree
! Pointer to Tree header
Definition: TBranch.h:95
Int_t GetNleaves() const
Definition: TBranch.h:184
TObjArray * GetListOfLeaves()
Definition: TBranch.h:182
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
Definition: TBranch.h:99
const char * GetFileName() const
Definition: TBranch.h:170
TDirectory * GetDirectory() const
Definition: TBranch.h:161
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:2217
typedef void((*Func_t)())
virtual void SetFile(TFile *file=0)
Set file where this branch writes/reads its buffers.
Definition: TBranch.cxx:2259
Int_t GetMaxBaskets() const
Definition: TBranch.h:183
virtual void Refresh(TBranch *b)
Refresh this branch using new information in b This function is called by TTree::Refresh.
Definition: TBranch.cxx:1904
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:1868
Class implementing or helping the various TTree cloning method.
Definition: TTreeCloner.h:38
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
Definition: TBranch.h:93
Long64_t GetFirstEntry() const
Definition: TBranch.h:179
virtual void Reset(Option_t *option="")
Reset a Branch.
Definition: TBranch.cxx:1953
Long64_t fReadEntry
! Current entry number when reading
Definition: TBranch.h:81
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:510
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Definition: TBranch.h:96
virtual Int_t LoadBaskets()
Baskets associated to this branch are forced to be in memory.
Definition: TBranch.cxx:1727
Int_t GetEntryOffsetLen() const
Definition: TBranch.h:164
const char * GetIconName() const
Return icon name depending on type of branch.
Definition: TBranch.cxx:1207
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
Bool_t IsFolder() const
Return kTRUE if more than one leaf or browsables, kFALSE otherwise.
Definition: TBranch.cxx:1689
virtual void ReadBasket(TBuffer &b)
Loop on all leaves of this branch to read Basket buffer.
Definition: TBranch.cxx:1849
Int_t FlushBaskets()
Flush to disk all the baskets of this branch and any of subbranches.
Definition: TBranch.cxx:1025
TObjArray fBranches
-&gt; List of Branches of this branch
Definition: TBranch.h:89
virtual void ResetReadEntry()
Definition: TBranch.h:203
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:1417
A TTree is a list of TBranches.
Definition: TBranch.h:57
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
Definition: TBranch.h:102
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
Definition: TBranch.cxx:1199
Int_t fCompress
Compression level and algorithm.
Definition: TBranch.h:70
TString fFileName
Name of file where buffers are stored (&quot;&quot; if in same file as Tree header)
Definition: TBranch.h:100
const Bool_t kTRUE
Definition: RtypesCore.h:91
Int_t GetCompressionLevel() const
Definition: TBranch.h:237
TBranch * fParent
! Pointer to parent branch.
Definition: TBranch.h:97
static char * skip(char **buf, const char *delimiters)
Definition: civetweb.c:2039
const Int_t n
Definition: legend1.C:16
Int_t GetWriteBasket() const
Definition: TBranch.h:174
Long64_t fFirstEntry
Number of the first entry in this branch.
Definition: TBranch.h:86
char name[80]
Definition: TGX11.cxx:109
void ExpandBasketArrays()
Increase BasketEntry buffer of a minimum of 10 locations and a maximum of 50 per cent of current size...
Definition: TBranch.cxx:722
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
Definition: TBranch.cxx:2332
Int_t GetReadBasket() const
Definition: TBranch.h:172
void ReadLeaves1Impl(TBuffer &b)
Read one leaf without the overhead of a loop.
Definition: TBranch.cxx:1875
static void ResetCount()
Static function resetting fgCount.
Definition: TBranch.cxx:2070
Int_t GetCompressionSettings() const
Definition: TBranch.h:243
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.
Definition: TBranch.cxx:2112
char * fAddress
! Address of 1st leaf (variable or object)
Definition: TBranch.h:98