TBranchElement A Branch for the case of an object
TBranchElement() | |
TBranchElement(TTree* tree, const char* name, TClonesArray* clones, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = -1) | |
TBranchElement(TTree* tree, const char* name, TVirtualCollectionProxy* cont, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = -1) | |
TBranchElement(TBranch* parent, const char* name, TClonesArray* clones, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = -1) | |
TBranchElement(TBranch* parent, const char* name, TVirtualCollectionProxy* cont, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = -1) | |
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) | |
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) | |
virtual | ~TBranchElement() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TBranch::AddBasket(TBasket& b, Bool_t ondisk, Long64_t startEntry) |
virtual void | TBranch::AddLastBasket(Long64_t startEntry) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual void | TBranch::DeleteBaskets(Option_t* option = "") |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TBranch::DropBaskets(Option_t* option = "") |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
void | TBranch::ExpandBasketArrays() |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual Int_t | Fill() |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual void | FillLeaves(TBuffer& b) |
virtual TBranch* | FindBranch(const char* name) |
virtual TLeaf* | FindLeaf(const char* name) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
Int_t | TBranch::FlushBaskets() |
Int_t | TBranch::FlushOneBasket(UInt_t which) |
virtual char* | GetAddress() const |
TBasket* | TBranch::GetBasket(Int_t basket) |
Int_t* | TBranch::GetBasketBytes() const |
Long64_t* | TBranch::GetBasketEntry() const |
virtual Long64_t | TBranch::GetBasketSeek(Int_t basket) const |
virtual Int_t | TBranch::GetBasketSize() const |
TBranchElement* | GetBranchCount() const |
TBranchElement* | GetBranchCount2() const |
Int_t* | GetBranchOffset() const |
virtual TList* | TBranch::GetBrowsables() |
UInt_t | GetCheckSum() |
virtual const char* | GetClassName() const |
virtual const char* | GetClonesName() const |
TVirtualCollectionProxy* | GetCollectionProxy() |
virtual Int_t | TBranch::GetCompressionLevel() const |
TDirectory* | TBranch::GetDirectory() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
Long64_t | TBranch::GetEntries() const |
virtual Int_t | GetEntry(Long64_t entry = 0, Int_t getall = 0) |
virtual Int_t | TBranch::GetEntryExport(Long64_t entry, Int_t getall, TClonesArray* list, Int_t n) |
Long64_t | TBranch::GetEntryNumber() const |
Int_t | TBranch::GetEntryOffsetLen() const |
Int_t | TBranch::GetEvent(Long64_t entry = 0) |
virtual TFile* | TBranch::GetFile(Int_t mode = 0) |
const char* | TBranch::GetFileName() const |
virtual Color_t | TAttFill::GetFillColor() const |
virtual Style_t | TAttFill::GetFillStyle() const |
Long64_t | TBranch::GetFirstEntry() const |
virtual const char* | GetIconName() const |
Int_t | GetID() const |
TStreamerInfo* | GetInfo() const |
virtual TLeaf* | TBranch::GetLeaf(const char* name) const |
TObjArray* | TBranch::GetListOfBaskets() |
TObjArray* | TBranch::GetListOfBranches() |
TObjArray* | TBranch::GetListOfLeaves() |
Int_t | TBranch::GetMaxBaskets() const |
virtual Int_t | GetMaximum() const |
TBranch* | TBranch::GetMother() const |
virtual const char* | TNamed::GetName() const |
Int_t | GetNdata() const |
Int_t | TBranch::GetNleaves() const |
char* | GetObject() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
Int_t | TBranch::GetOffset() const |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | GetParentName() const |
Int_t | TBranch::GetReadBasket() const |
Long64_t | TBranch::GetReadEntry() const |
virtual Int_t | TBranch::GetRow(Int_t row) |
Int_t | TBranch::GetSplitLevel() const |
Int_t | GetStreamerType() const |
TBranch* | TBranch::GetSubBranch(const TBranch* br) const |
virtual const char* | TNamed::GetTitle() const |
Long64_t | TBranch::GetTotalSize(Option_t* option = "") const |
Long64_t | TBranch::GetTotBytes(Option_t* option = "") const |
TTree* | TBranch::GetTree() const |
Int_t | GetType() const |
virtual const char* | GetTypeName() const |
virtual UInt_t | TObject::GetUniqueID() const |
Double_t | GetValue(Int_t i, Int_t len, Bool_t subarr = kFALSE) const |
virtual void* | GetValuePointer() const |
Int_t | TBranch::GetWriteBasket() const |
Long64_t | TBranch::GetZipBytes(Option_t* option = "") const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
Bool_t | TBranch::IsAutoDelete() const |
Bool_t | IsBranchFolder() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | IsFolder() const |
virtual Bool_t | IsObjectOwner() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
virtual Bool_t | TAttFill::IsTransparent() const |
Bool_t | TObject::IsZombie() const |
virtual void | TBranch::KeepCircular(Long64_t maxEntries) |
virtual Int_t | TBranch::LoadBaskets() |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual void | TAttFill::Modify() |
virtual Bool_t | Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* option = "") const |
void | PrintValue(Int_t i) const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TBranch::ReadBasket(TBuffer& b) |
virtual void | ReadLeaves(TBuffer& b) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
virtual void | TBranch::Refresh(TBranch* b) |
virtual void | Reset(Option_t* option = "") |
virtual void | ResetAddress() |
virtual void | TAttFill::ResetAttFill(Option_t* option = "") |
void | TObject::ResetBit(UInt_t f) |
static void | TBranch::ResetCount() |
virtual void | ResetDeleteObject() |
virtual void | TBranch::ResetReadEntry() |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001) |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
virtual void | SetAddress(void* addobj) |
virtual void | TBranch::SetAutoDelete(Bool_t autodel = kTRUE) |
virtual void | SetBasketSize(Int_t buffsize) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | SetBranchFolder() |
virtual void | TBranch::SetBufferAddress(TBuffer* entryBuffer) |
virtual void | SetClassName(const char* name) |
virtual void | TBranch::SetCompressionLevel(Int_t level = 1) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | TBranch::SetEntries(Long64_t entries) |
virtual void | TBranch::SetEntryOffsetLen(Int_t len) |
virtual void | TBranch::SetFile(TFile* file = 0) |
virtual void | TBranch::SetFile(const char* filename) |
virtual void | TAttFill::SetFillAttributes()MENU |
virtual void | TAttFill::SetFillColor(Color_t fcolor) |
virtual void | TAttFill::SetFillStyle(Style_t fstyle) |
virtual void | TBranch::SetFirstEntry(Long64_t entry) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
virtual void | SetObject(void* objadd) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TBranch::SetOffset(Int_t offset = 0) |
void | SetParentClass(TClass* clparent) |
virtual void | SetParentName(const char* name) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TBranch::SetTree(TTree* tree) |
virtual void | SetType(Int_t btype) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | SetupAddresses() |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TBranch::UpdateAddress() |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | BuildTitle(const char* name) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
TClass* | GetCurrentClass() |
TClass* | GetParentClass() |
void | Init(TTree* tree, TBranch* parent, const char* name, TClonesArray* clones, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = -1) |
void | Init(TTree* tree, TBranch* parent, const char* name, TVirtualCollectionProxy* cont, Int_t basketsize = 32000, Int_t splitlevel = 0, Int_t compress = -1) |
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) |
virtual void | InitializeOffsets() |
virtual void | InitInfo() |
Bool_t | IsMissingCollection() const |
void | TObject::MakeZombie() |
void | ReleaseObject() |
void | SetBranchCount(TBranchElement* bre) |
void | SetBranchCount2(TBranchElement* bre) |
void | TBranch::SetSkipZip(Bool_t skip = kTRUE) |
Int_t | Unroll(const char* name, TClass* cltop, TClass* cl, char* ptr, Int_t basketsize, Int_t splitlevel, Int_t btype) |
void | ValidateAddress() const |
Int_t | TBranch::WriteBasket(TBasket* basket, Int_t where) |
TBranchElement(const TBranchElement&) | |
TBranchElement& | operator=(const TBranchElement&) |
enum { | kBranchFolder | |
kDeleteObject | ||
}; | ||
enum TBranch::[unnamed] { | kAutoDelete | |
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
char* | TBranch::fAddress | ! Address of 1st leaf (variable or object) |
Int_t* | TBranch::fBasketBytes | [fMaxBaskets] Lenght of baskets on file |
Long64_t* | TBranch::fBasketEntry | [fMaxBaskets] Table of first entry in eack basket |
Int_t* | TBranch::fBasketRAM | ! [fNBasketRAM] table of basket numbers in memory |
Long64_t* | TBranch::fBasketSeek | [fMaxBaskets] Addresses of baskets on file |
Int_t | TBranch::fBasketSize | Initial Size of Basket Buffer |
TObjArray | TBranch::fBaskets | -> List of baskets of this branch |
TClassRef | fBranchClass | ! Reference to class definition in fClassName |
TBranchElement* | fBranchCount | pointer to primary branchcount branch |
TBranchElement* | fBranchCount2 | pointer to secondary branchcount branch |
Int_t | fBranchID | ! ID number assigned by a TRefTable. |
Int_t* | fBranchOffset | ! Sub-Branch offsets with respect to current transient class |
TObjArray | TBranch::fBranches | -> List of Branches of this branch |
TList* | TBranch::fBrowsables | ! List of TVirtualBranchBrowsables used for Browse() |
UInt_t | fCheckSum | CheckSum of class |
TString | fClassName | Class name of referenced object |
Int_t | fClassVersion | Version number of class |
TString | fClonesName | Name of class in TClonesArray (if any) |
TVirtualCollectionProxy* | fCollProxy | ! collection interface (if any) |
Int_t | TBranch::fCompress | (=1 branch is compressed, 0 otherwise) |
TClassRef | fCurrentClass | ! Reference to current (transient) class definition |
TDirectory* | TBranch::fDirectory | ! Pointer to directory where this branch buffers are stored |
Long64_t | TBranch::fEntries | Number of entries |
TBuffer* | TBranch::fEntryBuffer | ! Buffer used to directly pass the content without streaming |
Long64_t | TBranch::fEntryNumber | Current entry number (last one filled in this branch) |
Int_t | TBranch::fEntryOffsetLen | Initial Length of fEntryOffset table in the basket buffers |
TString | TBranch::fFileName | Name of file where buffers are stored ("" if in same file as Tree header) |
Color_t | TAttFill::fFillColor | fill area color |
Style_t | TAttFill::fFillStyle | fill area style |
Long64_t | TBranch::fFirstEntry | Number of the first entry in this branch |
Int_t | fID | element serial number in fInfo |
TStreamerInfo* | fInfo | ! Pointer to StreamerInfo |
Bool_t | fInit | ! Initialization flag for branch assignment |
Bool_t | fInitOffsets | ! Initialization flag to not endlessly recalculate offsets |
TObjArray | TBranch::fLeaves | -> List of leaves of this branch |
Int_t | TBranch::fMaxBaskets | Maximum number of Baskets so far |
Int_t | fMaximum | Maximum entries for a TClonesArray or variable array |
TBranch* | TBranch::fMother | ! Pointer to top-level parent branch in the tree. |
Int_t | TBranch::fNBasketRAM | ! Number of baskets in fBasketRAM |
TString | TNamed::fName | object identifier |
Int_t | fNdata | ! Number of data in this branch |
Int_t | TBranch::fNleaves | ! Number of leaves |
char* | fObject | ! Pointer to object at *fAddress |
Int_t | TBranch::fOffset | Offset of this branch |
TBranch* | TBranch::fParent | ! Pointer to parent branch. |
TClassRef | fParentClass | ! Reference to class definition in fParentName |
TString | fParentName | Name of parent class |
Int_t | TBranch::fReadBasket | ! Current basket number when reading |
Long64_t | TBranch::fReadEntry | ! Current entry number when reading |
Int_t | fSTLtype | ! STL container type |
Bool_t | TBranch::fSkipZip | !After being read, the buffer will not be unziped. |
Int_t | TBranch::fSplitLevel | Branch split level |
Int_t | fStreamerType | branch streamer type |
TString | TNamed::fTitle | object title |
Long64_t | TBranch::fTotBytes | Total number of bytes in all leaves before compression |
TTree* | TBranch::fTree | ! Pointer to Tree header |
Int_t | fType | branch type |
Int_t | TBranch::fWriteBasket | Last basket number written |
Long64_t | TBranch::fZipBytes | Total number of bytes in all leaves after compression |
static Int_t | TBranch::fgCount | ! branch counter |
FIXME: What if the streamer info is optimized here? -- Constructor when the branch object is not a TClonesArray nor an STL container. If splitlevel > 0 this branch in turn is split into sub-branches.
FIXME: What if the streamer info is optimized here? -- Constructor when the branch object is not a TClonesArray nor an STL container. If splitlevel > 0 this branch in turn is split into sub-branches.
-- Init when the branch object is not a TClonesArray nor an STL container. If splitlevel > 0 this branch in turn is split into sub-branches.
FIXME: Bad, the streamer info will be optimized here. -- Constructor when the branch object is a TClonesArray. If splitlevel > 0 this branch in turn is split into sub branches.
FIXME: Bad, the streamer info will be optimized here. -- Constructor when the branch object is a TClonesArray. If splitlevel > 0 this branch in turn is split into sub branches.
-- Init when the branch object is a TClonesArray. If splitlevel > 0 this branch in turn is split into sub branches.
-- Constructor when the branch object is an STL collection. If splitlevel > 0 this branch in turn is split into sub branches.
-- Constructor when the branch object is an STL collection. If splitlevel > 0 this branch in turn is split into sub branches.
-- Init when the branch object is an STL collection. If splitlevel > 0 this branch in turn is split into sub branches.
-- Set branch and leaf name and title in the case of a container sub-branch.
-- Loop on all leaves of this branch to fill the basket buffer. The function returns the number of bytes committed to the individual branches. If a write error occurs, the number of bytes returned is -1. If no data are written, because, e.g., the branch is disabled, the number of bytes returned is 0. Note: We not not use any member functions from TLeafElement!
-- Fill a buffer from the leaves of this branch. Note: We do not use any member functions from TLeafElement! Except in the MakeClass case of a TClonesArray sub-branch.
-- Get the branch address. If we are *not* owned by a MakeClass() tree: If we are a top-level branch, return a pointer to the pointer to our object. If we are *not* a top-level branch, return a pointer to our object. If we are owned by a MakeClass() tree: Return a pointer to our object.
-- Init the streamer info for the branch class, try to compensate for class code unload/reload and schema evolution.
-- Return the collection proxy describing the branch content, if any.
-- Return a pointer to the current type of the data member corresponding to branch element.
-- Read all branches of a BranchElement and return total number of bytes. If entry = 0, then use current entry number + 1. If entry < 0, then reset entry number to 0. Returns the number of bytes read from the input buffer. If entry does not exist, then returns 0. If an I/O error occurs, then returns -1. See IMPORTANT REMARKS in TTree::GetEntry.
-- Returns the branch value. If the leaf is an array, j is the index in the array. If leaf is an array inside a TClonesArray, len should be the length of the array. If subarr is true, then len is actually the index within the sub-array.
-- Returns pointer to first data element of this branch. Currently used only for members of type character.
-- Initialize the base class subobjects offsets of our sub-branches and set fOffset if we are a container sub-branch. Note: The offsets are zero for data members so that when SetAddress recursively sets their address, they will get the same address as their containing class because i/o is based on streamer info offsets from the addresss of the containing class. Offsets are non-zero for base-class sub-branches that are not the leftmost direct base class. They are laid out in memory sequentially and only the leftmost direct base class has the same address as the derived class. The streamer offsets need to be added to the address of the base class subobject which is not the same as the address of the derived class for the non-leftmost direct base classes.
-- Detect a collection written using a zero pointer in old versions of root. In versions of ROOT older than 4.00/03, if a collection (TClonesArray or STL container) was split but the pointer to the collection was zeroed out, nothing was saved. Hence there is no __easy__ way to detect the case. In newer versions, a zero is written so that a 'missing' collection appears to be an empty collection.
-- Reset a Branch. Existing i/o buffers are deleted. Entries, max and min are reset.
-- Release ownership of any allocated objects. Note: This interface was added so that clone trees could be told they do not own the allocated objects.
-- Point this branch at an object. For a sub-branch, addr is a pointer to the branch object. For a top-level branch the meaning of addr is as follows: If addr is zero, then we allocate a branch object internally and the branch is the owner of the allocated object, not the caller. However the caller may obtain a pointer to the branch object with GetObject(). Example: branch->SetAddress(0); Event* event = branch->GetObject(); ... Do some work. If addr is not zero, but the pointer addr points at is zero, then we allocate a branch object and set the passed pointer to point at the allocated object. The caller owns the allocated object and is responsible for deleting it when it is no longer needed. Example: Event* event = 0; branch->SetAddress(&event); ... Do some work. delete event; event = 0; If addr is not zero and the pointer addr points at is also not zero, then the caller has allocated a branch object and is asking us to use it. The caller owns it and must delete it when it is no longer needed. Example: Event* event = new Event(); branch->SetAddress(&event); ... Do some work. delete event; event = 0; These rules affect users of TTree::Branch(), TTree::SetBranchAddress(), and TChain::SetBranchAddress() as well because those routines call this one. An example of a tree with branches with objects allocated and owned by us: TFile* f1 = new TFile("myfile_original.root"); TTree* t1 = (TTree*) f->Get("MyTree"); TFile* f2 = new TFile("myfile_copy.root", "recreate"); TTree* t2 = t1->Clone(0); for (Int_t i = 0; i < 10; ++i) { t1->GetEntry(i); t2->Fill(); } t2->Write() delete f2; f2 = 0; delete f1; f1 = 0; An example of a branch with an object allocated by us, but owned by the caller: TFile* f = new TFile("myfile.root", "recreate"); TTree* t = new TTree("t", "A test tree.") Event* event = 0; TBranchElement* br = t->Branch("event.", &event); for (Int_t i = 0; i < 10; ++i) { ... Fill event with meaningful data in some way. t->Fill(); } t->Write(); delete event; event = 0; delete f; f = 0; Notice that the only difference between this example and the following example is that the event pointer is zero when the branch is created. An example of a branch with an object allocated and owned by the caller: TFile* f = new TFile("myfile.root", "recreate"); TTree* t = new TTree("t", "A test tree.") Event* event = new Event(); TBranchElement* br = t->Branch("event.", &event); for (Int_t i = 0; i < 10; ++i) { ... Fill event with meaningful data in some way. t->Fill(); } t->Write(); delete event; event = 0; delete f; f = 0;
-- Reset the basket size for all sub-branches of this branch element.
-- Split class cl into sub-branches of this branch. Create a sub-branch of this branch for each non-empty, non-abstract base class of cl (unless we are a sub-branch of a TClonesArray or an STL container, in which case we do *not* create a sub-branch), and for each non-split data member of cl. Note: We do *not* create sub-branches for base classes of cl if we are a sub-branch of a TClonesArray or an STL container. Note: We do *not* create sub-branches for data members which have a class type and which we are splitting. Note: The above rules imply that the branch heirarchy increases in depth only for base classes of cl (unless we are inside of a TClonesArray or STL container, in which case the depth does *not* increase, the base class is elided) and for TClonesArray or STL container data members (which have one additional level of sub-branches). The only other way the depth increases is when the top-level branch has a split class data member, in that case the constructor will create a sub-branch for it. In other words, the interior nodes of the branch tree are all either: base class nodes; split class nodes which are direct sub-branches of top-level nodes (created by TClass::Bronch usually); or TClonesArray or STL container master nodes. Note: The exception to the above is for the top-level branches, Tree::Bronch creates nodes for everything in that case, except for a TObject base class of a class which has the can ignore tobject streamer flag set.