53 Init(tree,
nullptr,
name,classname,addobj,basketsize,splitlevel,compress,isptrptr);
62 Init(
nullptr,parent,
name,classname,addobj,basketsize,splitlevel,compress,isptrptr);
70 if (tree==
nullptr && parent!=
nullptr) tree = parent->
GetTree();
78 Error(
"TBranchObject",
"Cannot find class:%s", classname);
89 char** apointer = (
char**) addobj;
98 tree->BuildStreamerInfo(cl, obj);
108 if ((compress == -1) && tree->GetDirectory()) {
109 TFile* bfile = tree->GetDirectory()->GetFile();
114 if (basketsize < 100) {
134 tree->GetListOfLeaves()->Add(leaf);
179 for (
Int_t i = 0; i < nbranches; ++i) {
220 for (
Int_t i = 0; i < nbranches; ++i) {
223 nb = branch->
GetEntry(entry, getall);
244 expectedClass =
nullptr;
248 Error(
"GetExpectedType",
"Did not find any leaves in %s",
GetName());
262 if (nbranches >= 1) {
268 return browsables && browsables->
GetSize();
280 Printf(
"*............................................................................*");
281 for (
Int_t i = 0; i < nbranches; ++i) {
303 for (
Int_t i = 0; i < nbranches; ++i) {
316 for (
Int_t i = 0; i < nbranches; ++i) {
346 char** ppointer = (
char**) add;
356 for (
Int_t i = 0; i < nbranches; ++i) {
363 if (ppointer && !obj) {
364 obj = (
char*) cl->
New();
376 Error(
"SetAddress",
"Pointer to TClonesArray is null");
393 char* fullname =
new char[200];
398 if (bname[strlen(bname)-1] ==
'.') {
402 char* pointer =
nullptr;
412 const char* rdname = rd->
GetName();
430 snprintf(fullname,200,
"%s%s", bname, &rdname[1]);
432 snprintf(fullname,200,
"%s", &rdname[1]);
444 snprintf(fullname,200,
"%s%s", bname, &rdname[0]);
446 snprintf(fullname,200,
"%s", &rdname[0]);
453 snprintf(fullname,200,
"%s%s", bname, &rdname[0]);
455 snprintf(fullname,200,
"%s", &rdname[0]);
461 if (fullname[
cursor] !=
'*') {
462 fullname[pos++] = fullname[
cursor];
465 fullname[pos] =
'\0';
472 snprintf(fullname,200,
"%s%s", bname, &rdname[1]);
474 snprintf(fullname,200,
"%s", &rdname[1]);
482 snprintf(fullname,200,
"%s%s", bname, &rdname[0]);
484 snprintf(fullname,200,
"%s", &rdname[0]);
522 for (
Int_t i=0;i<nbranches;i++) {
536 for (
Int_t i = 0; i < nbranches; ++i) {
578 const char* motherFileName = treeFileName;
579 if (mother && (mother !=
this)) {
617 void** ppointer = (
void**)
fAddress;
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.
const char * GetFileName() const
Long64_t fReadEntry
! Current entry number when reading
void Print(Option_t *option="") const override
Print TBranch parameters.
virtual void SetAddress(void *add)
Set address of this branch.
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.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
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 IsTObject() const
Return kTRUE is the class inherits from TObject.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
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.
TClass * GetClass() const
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
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.
virtual Int_t WriteTObject(const TObject *obj, const char *name=nullptr, Option_t *="", Int_t=0)
Write an object with proper type checking.
virtual TFile * GetFile() const
virtual Bool_t IsWritable() const
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Int_t GetCompressionSettings() const
A TLeaf for a general object derived from TObject.
TClass * GetClass() const
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void SetAddress(void *add=nullptr)
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 * GetName() const override
Returns name of object.
TDataMember * GetDataMember() const
Long_t GetThisOffset() const
const char * Data() const
A TTree represents a columnar dataset.
TDirectory * GetDirectory() const