Logo ROOT   6.12/06
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 #include <memory>
27 
28 #include "TNamed.h"
29 
30 #include "TObjArray.h"
31 
32 #include "TAttFill.h"
33 
34 #include "TDataType.h"
35 
36 #include "ROOT/TIOFeatures.hxx"
37 
38 class TTree;
39 class TBasket;
40 class TLeaf;
41 class TBrowser;
42 class TDirectory;
43 class TFile;
44 class TClonesArray;
45 class TTreeCloner;
46 
47  const Int_t kDoNotProcess = BIT(10); // Active bit for branches
48  const Int_t kIsClone = BIT(11); // to indicate a TBranchClones
49  const Int_t kBranchObject = BIT(12); // branch is a TObject*
50  const Int_t kBranchAny = BIT(17); // branch is an object*
52 
53 namespace ROOT {
54  namespace Internal {
55  class TBranchIMTHelper; ///< A helper class for managing IMT work during TTree:Fill operations.
56  }
57 }
58 
59 class TBranch : public TNamed , public TAttFill {
61 
62 protected:
63  friend class TTreeCloner;
64  friend class TTree;
65 
66  // TBranch status bits
67  enum EStatusBits {
68  kDoNotProcess = ::kDoNotProcess, // Active bit for branches
69  kIsClone = ::kIsClone, // to indicate a TBranchClones
70  kBranchObject = ::kBranchObject, // branch is a TObject*
71  kBranchAny = ::kBranchAny, // branch is an object*
72  // kMapObject = kBranchObject | kBranchAny;
74 
75  kDoNotUseBufferMap = BIT(22) // If set, at least one of the entry in the branch will use the buffer's map of classname and objects.
76  };
77 
78  static Int_t fgCount; ///<! branch counter
79  Int_t fCompress; ///< Compression level and algorithm
80  Int_t fBasketSize; ///< Initial Size of Basket Buffer
81  Int_t fEntryOffsetLen; ///< Initial Length of fEntryOffset table in the basket buffers
82  Int_t fWriteBasket; ///< Last basket number written
83  Long64_t fEntryNumber; ///< Current entry number (last one filled in this branch)
84  TIOFeatures fIOFeatures; ///< IO features for newly-created baskets.
85  Int_t fOffset; ///< Offset of this branch
86  Int_t fMaxBaskets; ///< Maximum number of Baskets so far
87  Int_t fNBaskets; ///<! Number of baskets in memory
88  Int_t fSplitLevel; ///< Branch split level
89  Int_t fNleaves; ///<! Number of leaves
90  Int_t fReadBasket; ///<! Current basket number when reading
91  Long64_t fReadEntry; ///<! Current entry number when reading
92  Long64_t fFirstBasketEntry; ///<! First entry in the current basket.
93  Long64_t fNextBasketEntry; ///<! Next entry that will requires us to go to the next basket
94  TBasket *fCurrentBasket; ///<! Pointer to the current basket.
95  Long64_t fEntries; ///< Number of entries
96  Long64_t fFirstEntry; ///< Number of the first entry in this branch
97  Long64_t fTotBytes; ///< Total number of bytes in all leaves before compression
98  Long64_t fZipBytes; ///< Total number of bytes in all leaves after compression
99  TObjArray fBranches; ///< -> List of Branches of this branch
100  TObjArray fLeaves; ///< -> List of leaves of this branch
101  TObjArray fBaskets; ///< -> List of baskets of this branch
102  Int_t *fBasketBytes; ///<[fMaxBaskets] Length of baskets on file
103  Long64_t *fBasketEntry; ///<[fMaxBaskets] Table of first entry in each basket
104  Long64_t *fBasketSeek; ///<[fMaxBaskets] Addresses of baskets on file
105  TTree *fTree; ///<! Pointer to Tree header
106  TBranch *fMother; ///<! Pointer to top-level parent branch in the tree.
107  TBranch *fParent; ///<! Pointer to parent branch.
108  char *fAddress; ///<! Address of 1st leaf (variable or object)
109  TDirectory *fDirectory; ///<! Pointer to directory where this branch buffers are stored
110  TString fFileName; ///< Name of file where buffers are stored ("" if in same file as Tree header)
111  TBuffer *fEntryBuffer; ///<! Buffer used to directly pass the content without streaming
112  TBuffer *fTransientBuffer; ///<! Pointer to the current transient buffer.
113  TList *fBrowsables; ///<! List of TVirtualBranchBrowsables used for Browse()
114 
115  Bool_t fSkipZip; ///<! After being read, the buffer will not be unzipped.
116 
118  ReadLeaves_t fReadLeaves; ///<! Pointer to the ReadLeaves implementation to use.
120  FillLeaves_t fFillLeaves; ///<! Pointer to the FillLeaves implementation to use.
121  void ReadLeavesImpl(TBuffer &b);
122  void ReadLeaves0Impl(TBuffer &b);
123  void ReadLeaves1Impl(TBuffer &b);
124  void ReadLeaves2Impl(TBuffer &b);
125  void FillLeavesImpl(TBuffer &b);
126 
128  void Init(const char *name, const char *leaflist, Int_t compress);
129 
132  Int_t WriteBasket(TBasket* basket, Int_t where) { return WriteBasketImpl(basket, where, nullptr); }
133 
134  TString GetRealFileName() const;
135 
136 private:
137  Int_t FillEntryBuffer(TBasket* basket,TBuffer* buf, Int_t& lnew);
139  TBranch(const TBranch&) = delete; // not implemented
140  TBranch& operator=(const TBranch&) = delete; // not implemented
141 
142 public:
143  TBranch();
144  TBranch(TTree *tree, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
145  TBranch(TBranch *parent, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
146  virtual ~TBranch();
147 
148  virtual void AddBasket(TBasket &b, Bool_t ondisk, Long64_t startEntry);
149  virtual void AddLastBasket(Long64_t startEntry);
150  virtual void Browse(TBrowser *b);
151  virtual void DeleteBaskets(Option_t* option="");
152  virtual void DropBaskets(Option_t *option = "");
153  void ExpandBasketArrays();
154  Int_t Fill() { return FillImpl(nullptr); }
156  virtual TBranch *FindBranch(const char *name);
157  virtual TLeaf *FindLeaf(const char *name);
159  Int_t FlushOneBasket(UInt_t which);
160 
161  virtual char *GetAddress() const {return fAddress;}
162  TBasket *GetBasket(Int_t basket);
163  Int_t *GetBasketBytes() const {return fBasketBytes;}
165  virtual Long64_t GetBasketSeek(Int_t basket) const;
166  virtual Int_t GetBasketSize() const {return fBasketSize;}
167  virtual TList *GetBrowsables();
168  virtual const char* GetClassName() const;
170  Int_t GetCompressionLevel() const;
172  TDirectory *GetDirectory() const {return fDirectory;}
173  virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0);
174  virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n);
176  Int_t GetEvent(Long64_t entry=0) {return GetEntry(entry);}
177  const char *GetIconName() const;
178  virtual Int_t GetExpectedType(TClass *&clptr,EDataType &type);
179  virtual TLeaf *GetLeaf(const char *name) const;
180  virtual TFile *GetFile(Int_t mode=0);
181  const char *GetFileName() const {return fFileName.Data();}
182  Int_t GetOffset() const {return fOffset;}
183  Int_t GetReadBasket() const {return fReadBasket;}
184  Long64_t GetReadEntry() const {return fReadEntry;}
186  Long64_t GetTotalSize(Option_t *option="") const;
187  Long64_t GetTotBytes(Option_t *option="") const;
188  Long64_t GetZipBytes(Option_t *option="") const;
190  Long64_t GetFirstEntry() const {return fFirstEntry; }
191  TIOFeatures GetIOFeatures() const;
195  Int_t GetMaxBaskets() const {return fMaxBaskets;}
196  Int_t GetNleaves() const {return fNleaves;}
197  Int_t GetSplitLevel() const {return fSplitLevel;}
198  Long64_t GetEntries() const {return fEntries;}
199  TTree *GetTree() const {return fTree;}
200  virtual Int_t GetRow(Int_t row);
201  virtual Bool_t GetMakeClass() const;
202  TBranch *GetMother() const;
203  TBranch *GetSubBranch(const TBranch *br) const;
205  Bool_t IsAutoDelete() const;
206  Bool_t IsFolder() const;
207  virtual void KeepCircular(Long64_t maxEntries);
208  virtual Int_t LoadBaskets();
209  virtual void Print(Option_t *option="") const;
210  virtual void ReadBasket(TBuffer &b);
211  virtual void Refresh(TBranch *b);
212  virtual void Reset(Option_t *option="");
213  virtual void ResetAfterMerge(TFileMergeInfo *);
214  virtual void ResetAddress();
215  virtual void ResetReadEntry() {fReadEntry = -1;}
216  virtual void SetAddress(void *add);
217  virtual void SetObject(void *objadd);
218  virtual void SetAutoDelete(Bool_t autodel=kTRUE);
219  virtual void SetBasketSize(Int_t buffsize);
220  virtual void SetBufferAddress(TBuffer *entryBuffer);
221  void SetCompressionAlgorithm(Int_t algorithm=0);
222  void SetCompressionLevel(Int_t level=1);
223  void SetCompressionSettings(Int_t settings=1);
224  virtual void SetEntries(Long64_t entries);
225  virtual void SetEntryOffsetLen(Int_t len, Bool_t updateSubBranches = kFALSE);
226  virtual void SetFirstEntry( Long64_t entry );
227  virtual void SetFile(TFile *file=0);
228  virtual void SetFile(const char *filename);
229  void SetIOFeatures(TIOFeatures &features) {fIOFeatures = features;}
230  virtual Bool_t SetMakeClass(Bool_t decomposeObj = kTRUE);
231  virtual void SetOffset(Int_t offset=0) {fOffset=offset;}
232  virtual void SetStatus(Bool_t status=1);
233  virtual void SetTree(TTree *tree) { fTree = tree;}
234  virtual void SetupAddresses();
235  virtual void UpdateAddress() {;}
236  virtual void UpdateFile();
237 
238  static void ResetCount();
239 
240  ClassDef(TBranch, 13); // Branch descriptor
241 };
242 
243 //______________________________________________________________________________
245 {
246  return (fCompress < 0) ? -1 : fCompress / 100;
247 }
248 
249 //______________________________________________________________________________
251 {
252  return (fCompress < 0) ? -1 : fCompress % 100;
253 }
254 
255 //______________________________________________________________________________
257 {
258  return (fCompress < 0) ? -1 : fCompress;
259 }
260 
261 #endif
virtual void UpdateAddress()
Definition: TBranch.h:235
void Init(const char *name, const char *leaflist, Int_t compress)
Definition: TBranch.cxx:278
Int_t fNBaskets
! Number of baskets in memory
Definition: TBranch.h:87
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
Definition: TBranch.cxx:1209
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:2233
An array of TObjects.
Definition: TObjArray.h:37
Long64_t * GetBasketEntry() const
Definition: TBranch.h:164
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:758
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Definition: TBranch.cxx:2784
virtual void SetAddress(void *add)
Set address of this branch.
Definition: TBranch.cxx:2170
Int_t GetSplitLevel() const
Definition: TBranch.h:197
Int_t fOffset
Offset of this branch.
Definition: TBranch.h:85
long long Long64_t
Definition: RtypesCore.h:69
virtual Int_t GetBasketSize() const
Definition: TBranch.h:166
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
TObjArray * GetListOfBaskets()
Definition: TBranch.h:192
virtual ~TBranch()
Destructor.
Definition: TBranch.cxx:422
Long64_t fEntries
Number of entries.
Definition: TBranch.h:95
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:1076
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:1416
Int_t GetCompressionLevel() const
Definition: TBranch.h:250
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:1748
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Definition: TBranch.h:98
ReadLeaves_t fReadLeaves
! Pointer to the ReadLeaves implementation to use.
Definition: TBranch.h:118
Int_t FillEntryBuffer(TBasket *basket, TBuffer *buf, Int_t &lnew)
Copy the data from fEntryBuffer into the current basket.
Definition: TBranch.cxx:830
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
Definition: TBranch.cxx:1673
const Int_t kMapObject
Definition: TBranch.h:51
#define BIT(n)
Definition: Rtypes.h:78
void SetCompressionAlgorithm(Int_t algorithm=0)
Set compression algorithm.
Definition: TBranch.cxx:2251
virtual void DropBaskets(Option_t *option="")
Loop on all branch baskets.
Definition: TBranch.cxx:659
virtual void SetStatus(Bool_t status=1)
Set branch status to Process or DoNotProcess.
Definition: TBranch.cxx:2435
void ReadLeaves2Impl(TBuffer &b)
Read two leaves without the overhead of a loop.
Definition: TBranch.cxx:1975
virtual void SetFirstEntry(Long64_t entry)
set the first entry number (case of TBranchSTL)
Definition: TBranch.cxx:2759
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
void SetCompressionLevel(Int_t level=1)
Set compression level.
Definition: TBranch.cxx:2271
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name &#39;searchname&#39;.
Definition: TBranch.cxx:975
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
Bool_t IsFolder() const
Return kTRUE if more than one leaf or browsables, kFALSE otherwise.
Definition: TBranch.cxx:1781
TBasket * fCurrentBasket
! Pointer to the current basket.
Definition: TBranch.h:94
const Int_t kBranchObject
Definition: TBranch.h:49
TDirectory * GetDirectory() const
Definition: TBranch.h:172
Int_t GetOffset() const
Definition: TBranch.h:182
TObjArray fBaskets
-> List of baskets of this branch
Definition: TBranch.h:101
Basic string class.
Definition: TString.h:125
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TBasket * GetFreshCluster()
Drops the cluster two behind the current cluster and returns a fresh basket by either reusing or crea...
Definition: TBranch.cxx:1514
Int_t fNleaves
! Number of leaves
Definition: TBranch.h:89
Int_t GetCompressionAlgorithm() const
Definition: TBranch.h:244
TIOFeatures provides the end-user with the ability to change the IO behavior of data written via a TT...
Definition: TIOFeatures.hxx:62
TString GetRealFileName() const
Get real file name.
Definition: TBranch.cxx:1592
TObjArray fLeaves
-> List of leaves of this branch
Definition: TBranch.h:100
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
Definition: TBranch.h:104
virtual void DeleteBaskets(Option_t *option="")
Loop on all branch baskets.
Definition: TBranch.cxx:628
Int_t GetEntryOffsetLen() const
Definition: TBranch.h:175
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:1633
void SetSkipZip(Bool_t skip=kTRUE)
Definition: TBranch.h:127
TBasket * GetFreshBasket()
Return a fresh basket by either resusing an existing basket that needs to be drop (according to TTree...
Definition: TBranch.cxx:1470
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch...
Definition: TBranch.cxx:2774
Long64_t fFirstBasketEntry
! First entry in the current basket.
Definition: TBranch.h:92
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
Definition: TBranch.h:102
virtual TList * GetBrowsables()
Returns (and, if 0, creates) browsable objects for this branch See TVirtualBranchBrowsable::FillListO...
Definition: TBranch.cxx:1197
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
Definition: TBranch.h:83
virtual void SetTree(TTree *tree)
Definition: TBranch.h:233
const Int_t kBranchAny
Definition: TBranch.h:50
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:1730
Int_t fWriteBasket
Last basket number written.
Definition: TBranch.h:82
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
Definition: TBranch.h:97
Fill Area Attributes class.
Definition: TAttFill.h:19
Int_t * GetBasketBytes() const
Definition: TBranch.h:163
#define ClassDef(name, id)
Definition: Rtypes.h:320
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:601
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Definition: TBranch.cxx:1579
void ReadLeavesImpl(TBuffer &b)
Loop on all leaves of this branch to read Basket buffer.
Definition: TBranch.cxx:1949
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:2415
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
Definition: TBranch.cxx:929
Bool_t IsAutoDelete() const
Return kTRUE if an existing object in a TBranchObject must be deleted.
Definition: TBranch.cxx:1773
const Int_t kDoNotProcess
Definition: TBranch.h:47
TObjArray * GetListOfBranches()
Definition: TBranch.h:193
TBasket * GetBasket(Int_t basket)
Return pointer to basket basketnumber in this Branch.
Definition: TBranch.cxx:1117
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition: TBranch.h:86
Long64_t GetEntryNumber() const
Definition: TBranch.h:189
Int_t fSplitLevel
Branch split level.
Definition: TBranch.h:88
TBranch & operator=(const TBranch &)=delete
TBranch()
Default constructor. Used for I/O by default.
Definition: TBranch.cxx:78
A doubly linked list.
Definition: TList.h:44
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition: TBranch.cxx:2086
Int_t Fill()
Definition: TBranch.h:154
const char * GetIconName() const
Return icon name depending on type of branch.
Definition: TBranch.cxx:1217
Int_t GetEvent(Long64_t entry=0)
Definition: TBranch.h:176
Int_t GetCompressionSettings() const
Definition: TBranch.h:256
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
void(TBranch::* ReadLeaves_t)(TBuffer &b)
Definition: TBranch.h:117
virtual void AddLastBasket(Long64_t startEntry)
Add the start entry of the write basket (not yet created)
Definition: TBranch.cxx:581
Int_t WriteBasket(TBasket *basket, Int_t where)
Definition: TBranch.h:132
TBuffer * fEntryBuffer
! Buffer used to directly pass the content without streaming
Definition: TBranch.h:111
Int_t GetReadBasket() const
Definition: TBranch.h:183
static Int_t fgCount
! branch counter
Definition: TBranch.h:78
void FillLeavesImpl(TBuffer &b)
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:1984
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:1344
virtual void SetOffset(Int_t offset=0)
Definition: TBranch.h:231
Int_t fBasketSize
Initial Size of Basket Buffer.
Definition: TBranch.h:80
void SetCompressionSettings(Int_t settings=1)
Set compression settings.
Definition: TBranch.cxx:2293
virtual void SetEntries(Long64_t entries)
Set the number of entries in this branch.
Definition: TBranch.cxx:2326
TList * fBrowsables
! List of TVirtualBranchBrowsables used for Browse()
Definition: TBranch.h:113
Long64_t GetFirstEntry() const
Definition: TBranch.h:190
Int_t GetWriteBasket() const
Definition: TBranch.h:185
const Int_t kIsClone
Definition: TBranch.h:48
FillLeaves_t fFillLeaves
! Pointer to the FillLeaves implementation to use.
Definition: TBranch.h:120
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:93
Manages buffers for branches of a Tree.
Definition: TBasket.h:34
Int_t GetMaxBaskets() const
Definition: TBranch.h:195
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:1244
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
const char * GetFileName() const
Definition: TBranch.h:181
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TBranch for reading/writing baskets.
Definition: TBranch.cxx:493
void SetIOFeatures(TIOFeatures &features)
Definition: TBranch.h:229
virtual void KeepCircular(Long64_t maxEntries)
keep a maximum of fMaxEntries in memory
Definition: TBranch.cxx:1793
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
Definition: TBranch.cxx:1187
const Bool_t kFALSE
Definition: RtypesCore.h:88
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:2217
ROOT::TIOFeatures TIOFeatures
Definition: TBranch.h:60
Bool_t fSkipZip
! After being read, the buffer will not be unzipped.
Definition: TBranch.h:115
Int_t fReadBasket
! Current basket number when reading
Definition: TBranch.h:90
virtual void ResetAddress()
Reset the address of the branch.
Definition: TBranch.cxx:2139
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:2687
TIOFeatures GetIOFeatures() const
Returns the IO settings currently in use for this branch.
Definition: TBranch.cxx:1765
EDataType
Definition: TDataType.h:28
TTree * fTree
! Pointer to Tree header
Definition: TBranch.h:105
TObjArray * GetListOfLeaves()
Definition: TBranch.h:194
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
Definition: TBranch.h:109
Long64_t GetTotalSize(Option_t *option="") const
Return total number of bytes in the branch (including current buffer)
Definition: TBranch.cxx:1711
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:2309
typedef void((*Func_t)())
virtual void SetFile(TFile *file=0)
Set file where this branch writes/reads its buffers.
Definition: TBranch.cxx:2351
virtual void Refresh(TBranch *b)
Refresh this branch using new information in b This function is called by TTree::Refresh.
Definition: TBranch.cxx:1996
Long64_t GetEntries() const
Definition: TBranch.h:198
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:1960
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:103
Definition: file.py:1
virtual void Reset(Option_t *option="")
Reset a Branch.
Definition: TBranch.cxx:2045
TIOFeatures fIOFeatures
IO features for newly-created baskets.
Definition: TBranch.h:84
void(TBranch::* FillLeaves_t)(TBuffer &b)
Definition: TBranch.h:119
Long64_t fReadEntry
! Current entry number when reading
Definition: TBranch.h:91
Long64_t GetReadEntry() const
Definition: TBranch.h:184
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:515
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Definition: TBranch.h:106
virtual Int_t LoadBaskets()
Baskets associated to this branch are forced to be in memory.
Definition: TBranch.cxx:1819
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:1642
TTree * GetTree() const
Definition: TBranch.h:199
Definition: tree.py:1
virtual char * GetAddress() const
Definition: TBranch.h:161
A TTree object has a header with a name and a title.
Definition: TTree.h:70
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition: TBranch.h:81
virtual void ReadBasket(TBuffer &b)
Loop on all leaves of this branch to read Basket buffer.
Definition: TBranch.cxx:1941
Int_t FlushBaskets()
Flush to disk all the baskets of this branch and any of subbranches.
Definition: TBranch.cxx:1030
TObjArray fBranches
-> List of Branches of this branch
Definition: TBranch.h:99
virtual void ResetReadEntry()
Definition: TBranch.h:215
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:1435
A TTree is a list of TBranches.
Definition: TBranch.h:59
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
Definition: TBranch.h:112
Int_t fCompress
Compression level and algorithm.
Definition: TBranch.h:79
virtual void Print(Option_t *option="") const
Print TBranch parameters.
Definition: TBranch.cxx:1848
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Definition: TBranch.h:110
const Bool_t kTRUE
Definition: RtypesCore.h:87
TBranch * fParent
! Pointer to parent branch.
Definition: TBranch.h:107
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:96
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition: TBranch.cxx:1652
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:727
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
Definition: TBranch.cxx:2424
void ReadLeaves1Impl(TBuffer &b)
Read one leaf without the overhead of a loop.
Definition: TBranch.cxx:1967
static void ResetCount()
Static function resetting fgCount.
Definition: TBranch.cxx:2162
Int_t GetNleaves() const
Definition: TBranch.h:196
const char * Data() const
Definition: TString.h:345
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.
Definition: TBranch.cxx:2204
char * fAddress
! Address of 1st leaf (variable or object)
Definition: TBranch.h:108