12 #ifndef ROOT_TBranchElement
13 #define ROOT_TBranchElement
28 #ifndef ROOT_TClassRef
49 namespace TStreamerInfoActions {
class TActionSequence; }
266 Error(
"ValidateAddress",
"We owned an object whose address changed! our ptr: %p new ptr: %p",
267 (
void*)
fObject, (
void*)*((
char**) fAddress));
275 #endif // ROOT_TBranchElement
Describe Streamer information for one class version.
TClassRef fTargetClass
Initialization flag to not endlessly recalculate offsets.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
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 FillLeavesAssociativeCollectionMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
A TFolder object is a collection of objects and folders.
virtual void Print(Option_t *option="") const
Print branch parameters.
TBranchElement * fBranchCount2
TVirtualCollectionProxy * GetCollectionProxy()
Return the collection proxy describing the branch content, if any.
virtual void * GetValuePointer() const
Returns pointer to first data element of this branch.
T GetTypedValue(Int_t i, Int_t len, Bool_t subarr=kFALSE) const
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name 'searchname'.
virtual Int_t GetExpectedType(TClass *&clptr, EDataType &type)
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
virtual TClass * GetTargetClass()
virtual void InitInfo()
Init the streamer info for the branch class, try to compensate for class code unload/reload and schem...
Double_t GetValue(Int_t i, Int_t len, Bool_t subarr=kFALSE) const
TBranchElement * GetBranchCount2() const
char * GetObject() const
Return a pointer to our object.
virtual void Reset(Option_t *option="")
Reset a Branch.
Buffer base class used for serializing objects.
void FillLeavesCollectionMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void FillLeavesCustomStreamer(TBuffer &b)
Write leaves into i/o buffers for this branch.
Bool_t IsMissingCollection() const
Detect a collection written using a zero pointer in old versions of root.
virtual void SetAddress(void *addobj)
Point this branch at an object.
virtual void SetTargetClass(const char *name)
Set the name of the class of the in-memory object into which the data will loaded.
void SetReadActionSequence()
Set the sequence of actions needed to read the data out of the buffer.
void ReadLeavesCollectionSplitVectorPtrMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
void PrintValue(Int_t i) const
Prints values of leaves.
UInt_t fCheckSum
collection interface (if any)
void FillLeavesCollectionSplitVectorPtrMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void SetupAddressesImpl()
If the branch address is not set, we set all addresses starting with the top level parent branch...
TStreamerInfoActions::TActionSequence * fFillActionSequence
Set of actions to be executed to extract the data from the basket.
Bool_t fInit
Place holder for the onfile representation of data members.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
void ReadLeavesClones(TBuffer &b)
Read leaves into i/o buffers for this branch.
void ReadLeavesCustomStreamer(TBuffer &b)
Read leaves into i/o buffers for this branch.
virtual const char * GetClonesName() const
void FillLeavesCollection(TBuffer &b)
Write leaves into i/o buffers for this branch.
TBranchElement * GetBranchCount() const
const char * Data() const
virtual void SetBranchFolder()
void ReadLeavesMemberBranchCount(TBuffer &b)
Read leaves into i/o buffers for this branch.
Int_t fNdata
STL container type.
TVirtualArray * fOnfileObject
Pointer to object at *fAddress.
void SetFillActionSequence()
Set the sequence of actions needed to write the data out from the buffer.
TStreamerInfoActions::TActionSequence * fReadActionSequence
List of the serial number of all the StreamerInfo to be used.
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
void ReadLeavesCollectionSplitPtrMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
void BuildTitle(const char *name)
Set branch and leaf name and title in the case of a container sub-branch.
virtual void ResetDeleteObject()
Release ownership of any allocated objects.
void FillLeavesClones(TBuffer &b)
Write leaves into i/o buffers for this branch.
void FillLeavesClonesMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual void SetBasketSize(Int_t buffsize)
Reset the basket size for all sub-branches of this branch element.
void ReadLeavesMemberCounter(TBuffer &b)
Read leaves into i/o buffers for this branch.
virtual const char * GetParentName() const
Int_t * fBranchOffset
Reference to class definition in fClonesName.
TVirtualCollectionProxy * fCollProxy
virtual Bool_t SetMakeClass(Bool_t decomposeObj=kTRUE)
Set the branch in a mode where the object are decomposed (Also known as MakeClass mode)...
virtual void Browse(TBrowser *b)
Browse the branch content.
void FillLeavesMemberCounter(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void FillLeavesMemberBranchCount(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of a BranchElement and return total number of bytes.
void SetFillLeavesPtr()
Set the FillLeaves pointer to execute the expected operations.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch after a Merge operation (drop data but keep customizations)
virtual void ResetAddress()
Set branch address to zero and free all allocated memory.
void ReadLeavesClonesMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
Bool_t GetMakeClass() const
Return whether this branch is in a mode where the object are decomposed or not (Also known as MakeCla...
TBranchElement & operator=(const TBranchElement &)
void FillLeavesMakeClass(TBuffer &b)
Write leaves into i/o buffers for this branch.
Using a TBrowser one can browse all ROOT objects.
void SetParentClass(TClass *clparent)
virtual Int_t Fill()
Loop on all leaves of this branch to fill the basket buffer.
Small helper class to generically acquire and release iterators.
void ReadLeavesCollection(TBuffer &b)
Read leaves into i/o buffers for this branch.
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch...
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
virtual void SetType(Int_t btype)
TClassRef fParentClass
Reference to current (transient) class definition.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Bool_t IsFolder() const
Return kTRUE if more than one leaf, kFALSE otherwise.
TBranchElement * fBranchCount
Number of data in this branch.
TClass * GetParentClass()
Return a pointer to the parent class of the branch element.
Bool_t TestBit(UInt_t f) const
void SetReadLeavesPtr()
Set the ReadLeaves pointer to execute the expected operations.
virtual Bool_t IsObjectOwner() const
TClass * GetCurrentClass()
Return a pointer to the current type of the data member corresponding to branch element.
void ReadLeavesImpl(TBuffer &b)
Unconfiguration Read Leave function.
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 fCurrentClass
Reference to the target in-memory class.
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
TClassRef fBranchClass
Reference to class definition in fParentName.
Int_t * GetBranchOffset() const
virtual Int_t GetMaximum() const
Return maximum count value of the branchcount if any.
void ValidateAddress() const
virtual TClass * GetClass() const
TStreamerInfo * GetInfoImp() const
Get streamer info for the branch class.
A Branch for the case of an object.
void SetBranchCount(TBranchElement *bre)
Set the branch counter for this branch.
virtual const char * GetTypeName() const
Return type name of element in the branch.
const char * GetIconName() const
Return icon name depending on type of branch element.
virtual void SetClassName(const char *name)
void FillLeavesMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
void SetBranchCount2(TBranchElement *bre)
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
Int_t fBranchID
Sub-Branch offsets with respect to current transient class.
std::vector< Int_t > fIDs
ID number assigned by a TRefTable.
TBranchElement()
Default and I/O constructor.
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
TClassRef fClonesClass
Reference to class definition in fClassName.
Bool_t IsBranchFolder() const
virtual void SetOffset(Int_t offset)
Set offset of the object (to which the data member represented by this branch belongs) inside its con...
void ReadLeavesMakeClass(TBuffer &b)
Read leaves into i/o buffers for this branch.
Bool_t fInitOffsets
Initialization flag for branch assignment.
TClassRef is used to implement a permanent reference to a TClass object.
An array of clone (identical) objects.
Class implementing or helping the various TTree cloning method.
virtual ~TBranchElement()
Destructor.
static void SwitchContainer(TObjArray *)
Modify the container type of the branches.
void FillLeavesCollectionSplitPtrMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual char * GetAddress() const
Get the branch address.
void FillLeavesImpl(TBuffer &b)
Unconfiguration Fill Leave function.
TVirtualCollectionIterators * fWriteIterators
holds the iterators when the branch is of fType==4.
TVirtualCollectionIterators * fIterators
Set of actions to be executed to write the data to the basket.
char * fObject
Pointer to StreamerInfo.
A TTree object has a header with a name and a title.
Int_t GetMakeClass() const
virtual void SetParentName(const char *name)
A TTree is a list of TBranches.
TVirtualCollectionPtrIterators * fPtrIterators
holds the read (non-staging) iterators when the branch is of fType==4 and associative containers...
virtual Bool_t Notify()
This method must be overridden to handle object notification.
void ReadLeavesMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
Int_t GetStreamerType() const
virtual void InitializeOffsets()
Initialize the base class subobjects offsets of our sub-branches and set fOffset if we are a containe...
void ReadLeavesCollectionMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
void ReleaseObject()
Delete any object we may have allocated on a previous call to SetAddress.
char * fAddress
Pointer to parent branch.