70 if (tree==
nullptr && parent!=
nullptr) tree = parent->
GetTree();
78 Error(
"TBranchObject",
"Cannot find class:%s", classname);
98 tree->BuildStreamerInfo(cl, obj);
108 if ((
compress == -1) && tree->GetDirectory()) {
109 TFile*
bfile = tree->GetDirectory()->GetFile();
134 tree->GetListOfLeaves()->Add(
leaf);
248 Error(
"GetExpectedType",
"Did not find any leaves in %s",
GetName());
280 Printf(
"*............................................................................*");
342 leaf->SetAddress(add);
364 obj = (
char*) cl->
New();
376 Error(
"SetAddress",
"Pointer to TClonesArray is null");
381 clm->BuildRealData();
382 clm->GetStreamerInfo();
393 char* fullname =
new char[200];
398 if (bname[
strlen(bname)-1] ==
'.') {
402 char* pointer =
nullptr;
461 if (fullname[
cursor] !=
'*') {
462 fullname[pos++] = fullname[
cursor];
465 fullname[pos] =
'\0';
468 if (!
clobj->IsTObject()) {
490 branch->SetAddress(pointer);
547 if (
R__b.IsReading()) {
567 if (!
dirsav->IsWritable()) {
583 dirsav->WriteTObject(
this);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
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 index
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
A helper class for managing IMT work during TTree:Fill operations.
A Branch for the case of an object.
void SetAddress(void *addobj) override
Set address of this branch.
void ResetAfterMerge(TFileMergeInfo *) override
Reset a Branch after a Merge operation (drop data but keep customizations)
TObject * fOldObject
!Pointer to old object
bool IsFolder() const override
Return TRUE if more than one leaf or if fBrowsables, FALSE otherwise.
void SetupAddresses() override
– If the branch address is not set, we set all addresses starting with the top level parent branch.
Int_t GetExpectedType(TClass *&clptr, EDataType &type) override
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
void UpdateAddress() override
Update branch addresses if a new object was created.
void Init(TTree *tree, TBranch *parent, const char *name, const char *classname, void *addobj, Int_t basketsize, Int_t splitlevel, Int_t compress, bool isptrptr)
Initialization routine (run from the constructor so do not make this function virtual)
void SetAutoDelete(bool autodel=true) override
Set the AutoDelete bit.
void Streamer(TBuffer &) override
Stream an object of class TBranchObject.
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
Read all branches of a BranchObject and return total number of bytes.
TString fClassName
Class name of referenced object.
~TBranchObject() override
Destructor for a BranchObject.
TBranchObject()
Default constructor for BranchObject.
void Print(Option_t *option="") const override
Print TBranch parameters.
Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *) override
Loop on all leaves of this branch to fill Basket buffer.
void SetBasketSize(Int_t buffsize) override
Reset basket size for all subbranches of this branch.
void Reset(Option_t *option="") override
Reset a branch.
void Browse(TBrowser *b) override
Browse the branch content.
A TTree is a list of TBranches.
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Int_t fMaxBaskets
Maximum number of Baskets so far.
@ kDoNotProcess
Active bit for branches.
TObjArray fLeaves
-> List of leaves of this branch
char * fAddress
! Address of 1st leaf (variable or object)
virtual TList * GetBrowsables()
Returns (and, if 0, creates) browsable objects for this branch See TVirtualBranchBrowsable::FillListO...
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Long64_t fReadEntry
! Current entry number when reading
void Print(Option_t *option="") const override
Print TBranch parameters.
virtual void SetAutoDelete(bool autodel=true)
Set the automatic delete bit.
Int_t fNleaves
! Number of leaves
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
TObjArray fBranches
-> List of Branches of this branch
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
TBranch * fMother
! Pointer to top-level parent branch in the tree.
TBranch * fParent
! Pointer to parent branch.
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
TObjArray * GetListOfLeaves()
Int_t fBasketSize
Initial Size of Basket Buffer.
virtual void Reset(Option_t *option="")
Reset a Branch.
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Int_t fCompress
Compression level and algorithm.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
Long64_t fEntries
Number of entries.
TTree * fTree
! Pointer to Tree header
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
TList * GetListOfRealData() const
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
An array of clone (identical) objects.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
All ROOT classes may have RTTI (run time type identification) support added.
Bool_t IsPersistent() const
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
const char * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
Basic data type descriptor (datatype information is obtained from CINT).
Describe directory structure in memory.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
A TLeaf for a general object derived from TObject.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Int_t GetEntriesFast() const
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Add(TObject *obj) override
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
The TRealData class manages the effective list of all data members for a given class.
const char * Data() const
A TTree represents a columnar dataset.
TDirectory * GetDirectory() const