Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TBranchElement.h
Go to the documentation of this file.
1// @(#)root/tree:$Id$
2// Author: Rene Brun 14/01/2001
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_TBranchElement
13#define ROOT_TBranchElement
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TBranchElement //
19// //
20// A Branch for the case of an object. //
21//////////////////////////////////////////////////////////////////////////
22
23
24#include "TBranch.h"
25
26#include "TClassRef.h"
27
28#include "TTree.h"
29
30class TFolder;
31class TStreamerInfo;
35class TVirtualArray;
36
38
39class TBranchElement : public TBranch {
40
41// Friends
42 friend class TTreeCloner;
43 friend class TLeafElement;
44
45/// Types
46protected:
49 kDeleteObject = BIT(16), ///< We are the owner of fObject.
50 kCache = BIT(18), ///< Need to pushd/pop fOnfileObject.
51 kOwnOnfileObj = BIT(19), ///< We are the owner of fOnfileObject.
52 kAddressSet = BIT(20), ///< The addressing set have been called for this branch
53 kMakeClass = BIT(21), ///< This branch has been switched to using the MakeClass Mode
54 kDecomposedObj = BIT(21) ///< More explicit alias for kMakeClass.
55 };
56
57
58// Data Members
59protected:
60 TString fClassName; ///< Class name of referenced object
61 TString fParentName; ///< Name of parent class
62 TString fClonesName; ///< Name of class in TClonesArray (if any)
63 TVirtualCollectionProxy *fCollProxy; ///<! collection interface (if any)
64 UInt_t fCheckSum; ///< CheckSum of class
65 Version_t fClassVersion; ///< Version number of class
66 Int_t fID; ///< element serial number in fInfo
67 Int_t fType; ///< Branch type
68 ///<
69 ///< Note on fType values:
70 ///< * -1 unsplit object with custom streamer at time of writing
71 ///< * 0 unsplit object with default streamer at time of writing
72 ///< OR simple data member of split object (fID==-1 for the former)
73 ///< * 1 base class of a split object.
74 ///< * 2 class typed data member of a split object
75 ///< * 3 branch count of a split TClonesArray
76 ///< * 31 data member of the content of a split TClonesArray
77 ///< * 4 branch count of a split STL Collection.
78 ///< * 41 data member of the content of a split STL collection
79 Int_t fStreamerType; ///< branch streamer type
80 Int_t fMaximum; ///< Maximum entries for a TClonesArray or variable array
81 Int_t fSTLtype; ///<! STL container type
82 Int_t fNdata; ///<! Number of data in this branch
83 TBranchElement *fBranchCount; ///< pointer to primary branchcount branch
84 TBranchElement *fBranchCount2; ///< pointer to secondary branchcount branch
85 TStreamerInfo *fInfo; ///<! Pointer to StreamerInfo
86 char *fObject; ///<! Pointer to object at *fAddress
87 TVirtualArray *fOnfileObject; ///<! Place holder for the onfile representation of data members.
88 Bool_t fInit : 1; ///<! Initialization flag for branch assignment
89 Bool_t fInInitInfo : 1;///<! True during the 2nd part of InitInfo (cut recursion).
90 Bool_t fInitOffsets: 1;///<! Initialization flag to not endlessly recalculate offsets
91 TClassRef fTargetClass; ///<! Reference to the target in-memory class
92 TClassRef fCurrentClass; ///<! Reference to current (transient) class definition
93 TClassRef fParentClass; ///<! Reference to class definition in fParentName
94 TClassRef fBranchClass; ///<! Reference to class definition in fClassName
95 TClassRef fClonesClass; ///<! Reference to class definition in fClonesName
96 Int_t *fBranchOffset; ///<! Sub-Branch offsets with respect to current transient class
97 Int_t fBranchID; ///<! ID number assigned by a TRefTable.
98 TStreamerInfoActions::TIDs fNewIDs; ///<! Nested List of the serial number of all the StreamerInfo to be used.
99 TStreamerInfoActions::TActionSequence *fReadActionSequence; ///<! Set of actions to be executed to extract the data from the basket.
100 TStreamerInfoActions::TActionSequence *fFillActionSequence; ///<! Set of actions to be executed to write the data to the basket.
101 TVirtualCollectionIterators *fIterators; ///<! holds the iterators when the branch is of fType==4.
102 TVirtualCollectionIterators *fWriteIterators; ///<! holds the read (non-staging) iterators when the branch is of fType==4 and associative containers.
103 TVirtualCollectionPtrIterators *fPtrIterators; ///<! holds the iterators when the branch is of fType==4 and it is a split collection of pointers.
104
105// Not implemented
106private:
109
110 static void SwitchContainer(TObjArray *);
111
112// Implementation use only functions.
113protected:
114 void BuildTitle(const char* name);
115 virtual void InitializeOffsets();
116 virtual void InitInfo();
118 TStreamerInfo *FindOnfileInfo(TClass *valueClass, const TObjArray &branches) const;
119 TClass *GetParentClass(); // Class referenced by fParentName
120 TStreamerInfo *GetInfoImp() const;
121 void ReleaseObject();
122 void SetupInfo();
125 Int_t Unroll(const char* name, TClass* cltop, TClass* cl, char* ptr, Int_t basketsize, Int_t splitlevel, Int_t btype);
126 inline void ValidateAddress() const;
127
128 void Init(TTree *tree, TBranch *parent, const char* name, TStreamerInfo* sinfo, Int_t id, char* pointer, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t btype = 0);
129 void Init(TTree *tree, TBranch *parent, const char* name, TClonesArray* clones, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = ROOT::RCompressionSetting::EAlgorithm::kInherit);
130 void Init(TTree *tree, TBranch *parent, const char* name, TVirtualCollectionProxy* cont, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = ROOT::RCompressionSetting::EAlgorithm::kInherit);
131
133 void ReadLeavesImpl(TBuffer& b);
145 void SetReadLeavesPtr();
147 void SetupAddressesImpl();
148 void SetAddressImpl(void *addr, Bool_t implied) override;
149
150 void FillLeavesImpl(TBuffer& b);
163 void SetFillLeavesPtr();
165
166// Public Interface.
167public:
169 TBranchElement(TTree *tree, const char* name, TStreamerInfo* sinfo, Int_t id, char* pointer, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t btype = 0);
170 TBranchElement(TTree *tree, const char* name, TClonesArray* clones, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = ROOT::RCompressionSetting::EAlgorithm::kInherit);
171 TBranchElement(TTree *tree, const char* name, TVirtualCollectionProxy* cont, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = ROOT::RCompressionSetting::EAlgorithm::kInherit);
172 TBranchElement(TBranch *parent, const char* name, TStreamerInfo* sinfo, Int_t id, char* pointer, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t btype = 0);
173 TBranchElement(TBranch *parent, const char* name, TClonesArray* clones, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = ROOT::RCompressionSetting::EAlgorithm::kInherit);
174 TBranchElement(TBranch *parent, const char* name, TVirtualCollectionProxy* cont, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = ROOT::RCompressionSetting::EAlgorithm::kInherit);
175
176 virtual ~TBranchElement();
177
178 void Browse(TBrowser* b) override;
179 TBranch *FindBranch(const char *name) override;
180 TLeaf *FindLeaf(const char *name) override;
181 char *GetAddress() const override;
186 const char *GetClassName() const override { return fClassName.Data(); }
187 virtual TClass *GetClass() const { return fBranchClass; }
188 virtual const char *GetClonesName() const { return fClonesName.Data(); }
190 TClass *GetCurrentClass(); // Class referenced by transient description
191 Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0) override;
192 Int_t GetExpectedType(TClass *&clptr,EDataType &type) override;
193 TString GetFullName() const override;
194 const char *GetIconName() const override;
195 Int_t GetID() const { return fID; }
196 TStreamerInfo *GetInfo() const;
197 Bool_t GetMakeClass() const override;
198 char *GetObject() const;
200 virtual const char *GetParentName() const { return fParentName.Data(); }
201 virtual Int_t GetMaximum() const;
202 Int_t GetNdata() const { return fNdata; }
203 Int_t GetType() const { return fType; }
205 virtual TClass *GetTargetClass() { return fTargetClass; }
206 virtual const char *GetTypeName() const;
207 Double_t GetValue(Int_t i, Int_t len, Bool_t subarr = kFALSE) const { return GetTypedValue<Double_t>(i, len, subarr); }
208 template<typename T > T GetTypedValue(Int_t i, Int_t len, Bool_t subarr = kFALSE) const;
209 virtual void *GetValuePointer() const;
212 Bool_t IsFolder() const override;
213 virtual Bool_t IsObjectOwner() const { return TestBit(kDeleteObject); }
214 Bool_t Notify() override { if (fAddress) { ResetAddress(); } return 1; }
215 void Print(Option_t* option = "") const override;
216 void PrintValue(Int_t i) const;
217 void Reset(Option_t* option = "") override;
218 void ResetAfterMerge(TFileMergeInfo *) override;
219 void ResetAddress() override;
220 virtual void ResetDeleteObject();
221 virtual void ResetInitInfo(bool recurse);
222 void SetAddress(void* addobj) override;
223 Bool_t SetMakeClass(Bool_t decomposeObj = kTRUE) override;
224 void SetObject(void *objadd) override;
225 void SetBasketSize(Int_t buffsize) override;
227 virtual void SetClassName(const char* name) { fClassName = name; }
228 void SetOffset(Int_t offset) override;
229 virtual void SetMissing();
230 inline void SetParentClass(TClass* clparent);
231 virtual void SetParentName(const char* name) { fParentName = name; }
232 virtual void SetTargetClass(const char *name);
233 void SetupAddresses() override;
234 virtual void SetType(Int_t btype) { fType = btype; }
235 void UpdateFile() override;
236 void Unroll(const char *name, TClass *cl, TStreamerInfo *sinfo, char* objptr, Int_t bufsize, Int_t splitlevel);
237
240 kBaseClassNode = 1, // -- We are a base class element.
241 // Note: This does not include an STL container class which is
242 // being used as a base class because the streamer element
243 // in that case is not the base streamer element it is the
244 // STL streamer element.
249 kSTLMemberNode = 41
250 };
251
252private:
254
255 ClassDefOverride(TBranchElement,10) // Branch in case of an object
256};
257
259{
260 fParentClass = clparent;
261 fParentName = clparent ? clparent->GetName() : "";
262}
263
265{
266 // Check to see if the user changed the object pointer without telling us.
267
268 if (fID < 0) {
269 // We are a top-level branch.
270 if (!fTree->GetMakeClass() && fAddress && (*((char**) fAddress) != fObject)) {
271 // The semantics of fAddress and fObject are violated.
272 // Assume the user changed the pointer on us.
273 // Note: The cast is here because we want to be able to
274 // be called from the constant get functions.
275
276 // FIXME: Disable the check/warning TTree until we add a missing interface.
277 if (TestBit(kDeleteObject)) {
278 // This should never happen!
279 Error("ValidateAddress", "We owned an object whose address changed! our ptr: %p new ptr: %p",
280 (void*)fObject, (void*)*((char**) fAddress));
281 const_cast<TBranchElement*>(this)->ResetBit(kDeleteObject);
282 }
283 const_cast<TBranchElement*>(this)->SetAddress(fAddress);
284 }
285 }
286}
287
288#endif // ROOT_TBranchElement
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
short Version_t
Definition RtypesCore.h:65
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
long long Long64_t
Definition RtypesCore.h:80
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
EDataType
Definition TDataType.h:28
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
Definition TGX11.cxx:110
A helper class for managing IMT work during TTree:Fill operations.
A Branch for the case of an object.
void ReadLeavesClonesMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
Bool_t fInit
! Initialization flag for branch assignment
void SetActionSequence(TClass *originalClass, TStreamerInfo *localInfo, TStreamerInfoActions::TActionSequence::SequenceGetter_t create, TStreamerInfoActions::TActionSequence *&actionSequence)
Set the sequence of actions needed to read the data out of the buffer.
char * fObject
! Pointer to object at *fAddress
TBranchElement * GetBranchCount() const
TStreamerInfo * fInfo
! Pointer to StreamerInfo
Int_t fSTLtype
! STL container type
void ReadLeavesCustomStreamer(TBuffer &b)
Read leaves into i/o buffers for this branch.
void Reset(Option_t *option="") override
Reset a Branch.
virtual void SetBranchFolder()
void SetParentClass(TClass *clparent)
TBranchElement * fBranchCount2
pointer to secondary branchcount branch
Int_t fNdata
! Number of data in this branch
Int_t GetClassVersion()
void SetOffset(Int_t offset) override
Set offset of the object (to which the data member represented by this branch belongs) inside its con...
void FillLeavesCollectionMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
TString fClassName
Class name of referenced object.
Bool_t SetMakeClass(Bool_t decomposeObj=kTRUE) override
Set the branch in a mode where the object are decomposed (Also known as MakeClass mode).
TStreamerInfoActions::TActionSequence * fFillActionSequence
! Set of actions to be executed to write the data to the basket.
void Print(Option_t *option="") const override
Print TBranch parameters.
Bool_t fInInitInfo
! True during the 2nd part of InitInfo (cut recursion).
Int_t GetID() const
Int_t * GetBranchOffset() const
void SetAddressImpl(void *addr, Bool_t implied) override
See TBranchElement::SetAddress.
const char * GetClassName() const override
Return the name of the user class whose content is stored in this branch, if any.
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
void ReadLeavesCollection(TBuffer &b)
Read leaves into i/o buffers for this branch.
void SetupAddresses() override
If the branch address is not set, we set all addresses starting with the top level parent branch.
Bool_t Notify() override
This method must be overridden to handle object notification.
void ResetAddress() override
Set branch address to zero and free all allocated memory.
virtual void SetType(Int_t btype)
void FillLeavesMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void SetBranchCount(TBranchElement *bre)
Set the branch counter for this branch.
static void SwitchContainer(TObjArray *)
Modify the container type of the branches.
void SetReadActionSequence()
Set the sequence of actions needed to read the data out of the buffer.
Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *) override
Loop on all leaves of this branch to fill the basket buffer.
TVirtualCollectionProxy * GetCollectionProxy()
Return the collection proxy describing the branch content, if any.
@ kOwnOnfileObj
We are the owner of fOnfileObject.
@ kAddressSet
The addressing set have been called for this branch.
@ kDecomposedObj
More explicit alias for kMakeClass.
@ kDeleteObject
We are the owner of fObject.
@ kCache
Need to pushd/pop fOnfileObject.
@ kMakeClass
This branch has been switched to using the MakeClass Mode.
void SetupAddressesImpl()
If the branch address is not set, we set all addresses starting with the top level parent branch.
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
Read all branches of a BranchElement and return total number of bytes.
virtual Bool_t IsObjectOwner() const
TClassRef fParentClass
! Reference to class definition in fParentName
void BuildTitle(const char *name)
Set branch and leaf name and title in the case of a container sub-branch.
virtual Int_t GetMaximum() const
Return maximum count value of the branchcount if any.
TString fParentName
Name of parent class.
Bool_t IsBranchFolder() const
void ReadLeavesCollectionSplitPtrMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
Double_t GetValue(Int_t i, Int_t len, Bool_t subarr=kFALSE) const
TClassRef fBranchClass
! Reference to class definition in fClassName
TStreamerInfoActions::TIDs fNewIDs
! Nested List of the serial number of all the StreamerInfo to be used.
Int_t GetStreamerType() const
TClass * GetCurrentClass()
Return a pointer to the current type of the data member corresponding to branch element.
UInt_t fCheckSum
CheckSum of class.
void ResetAfterMerge(TFileMergeInfo *) override
Reset a Branch after a Merge operation (drop data but keep customizations)
TStreamerInfoActions::TActionSequence * fReadActionSequence
! Set of actions to be executed to extract the data from the basket.
void FillLeavesClones(TBuffer &b)
Write leaves into i/o buffers for this branch.
TBranchElement * GetBranchCount2() const
void ReadLeavesMemberBranchCount(TBuffer &b)
Read leaves into i/o buffers for this branch.
void SetReadLeavesPtr()
Set the ReadLeaves pointer to execute the expected operations.
Int_t Unroll(const char *name, TClass *cltop, TClass *cl, char *ptr, Int_t basketsize, Int_t splitlevel, Int_t btype)
Split class cl into sub-branches of this branch.
void FillLeavesMakeClass(TBuffer &b)
Write leaves into i/o buffers for this branch.
void FillLeavesCollectionSplitVectorPtrMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void FillLeavesCollection(TBuffer &b)
Write leaves into i/o buffers for this branch.
Int_t fID
element serial number in fInfo
char * GetAddress() const override
Get the branch address.
Bool_t IsMissingCollection() const
Detect a collection written using a zero pointer in old versions of root.
void FillLeavesMemberCounter(TBuffer &b)
Write leaves into i/o buffers for this branch.
void SetBranchCount2(TBranchElement *bre)
void FillLeavesCollectionSplitPtrMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void SetAddress(void *addobj) override
Point this branch at an object.
TStreamerInfo * GetInfoImp() const
Get streamer info for the branch class.
virtual void SetTargetClass(const char *name)
Set the name of the class of the in-memory object into which the data will loaded.
virtual void ResetDeleteObject()
Release ownership of any allocated objects.
virtual const char * GetParentName() const
void ValidateAddress() const
TVirtualArray * GetOnfileObject() const
TVirtualCollectionIterators * fWriteIterators
! holds the read (non-staging) iterators when the branch is of fType==4 and associative containers.
void PrintValue(Int_t i) const
Prints values of leaves.
TVirtualArray * fOnfileObject
! Place holder for the onfile representation of data members.
void SetBasketSize(Int_t buffsize) override
Reset the basket size for all sub-branches of this branch element.
virtual const char * GetTypeName() const
Return type name of element in the branch.
virtual TClass * GetTargetClass()
void FillLeavesAssociativeCollectionMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void Init(TTree *tree, TBranch *parent, const char *name, TStreamerInfo *sinfo, Int_t id, char *pointer, Int_t basketsize=32000, Int_t splitlevel=0, Int_t btype=0)
Init when the branch object is not a TClonesArray nor an STL container.
TClassRef fClonesClass
! Reference to class definition in fClonesName
virtual void * GetValuePointer() const
Returns pointer to first data element of this branch.
void ReadLeavesImpl(TBuffer &b)
Unconfiguration Read Leave function.
virtual void SetClassName(const char *name)
void SetupInfo()
Set the value of fInfo.
void FillLeavesImpl(TBuffer &b)
Unconfiguration Fill Leave function.
void FillLeavesClonesMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
TClassRef fCurrentClass
! Reference to current (transient) class definition
char * GetObject() const
Return a pointer to our object.
void UpdateFile() override
Refresh the value of fDirectory (i.e.
TStreamerInfo * FindOnfileInfo(TClass *valueClass, const TObjArray &branches) const
void ReadLeavesClones(TBuffer &b)
Read leaves into i/o buffers for this branch.
Int_t * fBranchOffset
! Sub-Branch offsets with respect to current transient class
Int_t fType
Branch type.
virtual void ResetInitInfo(bool recurse)
Reset offset and StreamerInfo information from this branch.
TString GetFullName() const override
Return the 'full' name of the branch.
void ReadLeavesMakeClass(TBuffer &b)
Read leaves into i/o buffers for this branch.
TBranchElement()
Default and I/O constructor.
void FillLeavesCustomStreamer(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual const char * GetClonesName() const
virtual TClass * GetClass() const
Int_t fMaximum
Maximum entries for a TClonesArray or variable array.
T GetTypedValue(Int_t i, Int_t len, Bool_t subarr=kFALSE) const
void ReadLeavesMemberCounter(TBuffer &b)
Read leaves into i/o buffers for this branch.
Int_t fBranchID
! ID number assigned by a TRefTable.
TLeaf * FindLeaf(const char *name) override
Find the leaf corresponding to the name 'searchname'.
TVirtualCollectionIterators * fIterators
! holds the iterators when the branch is of fType==4.
void ReleaseObject()
Delete any object we may have allocated on a previous call to SetAddress.
TClassRef fTargetClass
! Reference to the target in-memory class
Bool_t IsFolder() const override
Return kTRUE if more than one leaf, kFALSE otherwise.
void Browse(TBrowser *b) override
Browse the branch content.
void FillLeavesMemberBranchCount(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual void SetMissing()
Set offset of the object (to which the data member represented by this branch belongs) inside its con...
TString fClonesName
Name of class in TClonesArray (if any)
TBranchElement * fBranchCount
pointer to primary branchcount branch
Int_t GetType() const
void ReadLeavesMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
virtual ~TBranchElement()
Destructor.
Bool_t fInitOffsets
! Initialization flag to not endlessly recalculate offsets
virtual void SetParentName(const char *name)
Version_t fClassVersion
Version number of class.
TVirtualCollectionPtrIterators * fPtrIterators
! holds the iterators when the branch is of fType==4 and it is a split collection of pointers.
TBranchElement(const TBranchElement &)=delete
TBranch * FindBranch(const char *name) override
Find the immediate sub-branch with passed name.
virtual void InitInfo()
Init the streamer info for the branch class, try to compensate for class code unload/reload and schem...
Bool_t GetMakeClass() const override
Return whether this branch is in a mode where the object are decomposed or not (Also known as MakeCla...
virtual void InitializeOffsets()
Initialize the base class subobjects offsets of our sub-branches and set fOffset if we are a containe...
const char * GetIconName() const override
Return icon name depending on type of branch element.
TBranchElement & operator=(const TBranchElement &)=delete
TClass * GetParentClass()
Return a pointer to the parent class of the branch element.
Int_t GetNdata() const
Int_t GetExpectedType(TClass *&clptr, EDataType &type) override
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
TVirtualCollectionProxy * fCollProxy
! collection interface (if any)
void SetFillActionSequence()
Set the sequence of actions needed to write the data out from the buffer.
void SetObject(void *objadd) override
Set object this branch is pointing to.
Int_t fStreamerType
branch streamer type
void ReadLeavesCollectionSplitVectorPtrMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
void SetFillLeavesPtr()
Set the FillLeaves pointer to execute the expected operations.
void ReadLeavesCollectionMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
A TTree is a list of TBranches.
Definition TBranch.h:89
char * fAddress
! Address of 1st leaf (variable or object)
Definition TBranch.h:143
TTree * fTree
! Pointer to Tree header
Definition TBranch.h:140
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
Buffer base class used for serializing objects.
Definition TBuffer.h:43
TClassRef is used to implement a permanent reference to a TClass object.
Definition TClassRef.h:28
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
An array of clone (identical) objects.
<div class="legacybox"><h2>Legacy Code</h2> TFolder is a legacy interface: there will be no bug fixes...
Definition TFolder.h:30
A TLeaf for the general case when using the branches created via a TStreamerInfo (i....
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition TLeaf.h:57
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
An array of TObjects.
Definition TObjArray.h:31
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:201
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:774
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:970
void ResetBit(UInt_t f)
Definition TObject.h:200
SequencePtr(*)(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *originalClass) SequenceGetter_t
Describes a persistent version of a class.
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380
Class implementing or helping the various TTree cloning method.
Definition TTreeCloner.h:31
A TTree represents a columnar dataset.
Definition TTree.h:79
Int_t GetMakeClass() const
Definition TTree.h:492
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
Small helper class to generically acquire and release iterators.
std::vector< TIDNode > TIDs
Definition tree.py:1
@ kInherit
Some objects use this value to denote that the compression algorithm should be inherited from the par...
Definition Compression.h:86