ROOT logo
ROOT » TREE » TREE » TBranchRef

class TBranchRef: public TBranch

A branch containing and managing a TRefTable for TRef autoloading.
It loads the TBranch containing a referenced object when requested
by TRef::GetObject(), so the reference can be resolved. The
information which branch to load is stored by TRefTable. Once a
TBranch has read the TBranchRef's current entry it will not be told
to re-read, in case the use has changed objects read from the

Note that this does NOT allow for autoloading of references spanning
different entries. The TBranchRef's current entry has to correspond
to the entry of the TBranch containing the referenced object.

The TRef cannot be stored in a top-level branch which is a
TBranchObject for the auto-loading to work. E.g. you cannot store
the TRefs in TObjArray, and create a top-level branch storing this

Function Members (Methods)

TBranchRef(TTree* tree)
voidTObject::AbstractMethod(const char* method) const
virtual voidTBranch::AddBasket(TBasket& b, Bool_t ondisk, Long64_t startEntry)
virtual voidTBranch::AddLastBasket(Long64_t startEntry)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTBranch::Browse(TBrowser* b)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
static TClass*TBranch::Class()
static TClass*TAttFill::Class()
static TClass*TNamed::Class()
static TClass*TObject::Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
virtual voidTNamed::Clear(Option_t* option = "")
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Int_tTObject::Compare(const TObject* obj) const
voidTAttFill::Copy(TAttFill& attfill) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidTBranch::DeleteBaskets(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTBranch::DropBaskets(Option_t* option = "")
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual Int_tFill()
virtual Int_tTBranch::Fill()
virtual voidTNamed::FillBuffer(char*& buffer)
virtual voidFillLeaves(TBuffer& b)
virtual voidTBranch::FillLeaves(TBuffer& b)
virtual TBranch*TBranch::FindBranch(const char* name)
virtual TLeaf*TBranch::FindLeaf(const char* name)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tTBranch::FlushOneBasket(UInt_t which)
virtual char*TBranch::GetAddress() const
TBasket*TBranch::GetBasket(Int_t basket)
Int_t*TBranch::GetBasketBytes() const
Long64_t*TBranch::GetBasketEntry() const
virtual Long64_tTBranch::GetBasketSeek(Int_t basket) const
virtual Int_tTBranch::GetBasketSize() const
virtual TList*TBranch::GetBrowsables()
virtual const char*TBranch::GetClassName() const
virtual Int_tTBranch::GetCompressionLevel() const
TDirectory*TBranch::GetDirectory() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Long64_tTBranch::GetEntries() const
virtual Int_tTBranch::GetEntry(Long64_t entry = 0, Int_t getall = 0)
virtual Int_tTBranch::GetEntryExport(Long64_t entry, Int_t getall, TClonesArray* list, Int_t n)
Long64_tTBranch::GetEntryNumber() const
Int_tTBranch::GetEntryOffsetLen() const
Int_tTBranch::GetEvent(Long64_t entry = 0)
virtual TFile*TBranch::GetFile(Int_t mode = 0)
const char*TBranch::GetFileName() const
virtual Color_tTAttFill::GetFillColor() const
virtual Style_tTAttFill::GetFillStyle() const
Long64_tTBranch::GetFirstEntry() const
virtual const char*TBranch::GetIconName() const
virtual const char*TObject::GetIconName() const
virtual TLeaf*TBranch::GetLeaf(const char* name) const
Int_tTBranch::GetMaxBaskets() const
TBranch*TBranch::GetMother() const
virtual const char*TNamed::GetName() const
virtual const char*TObject::GetName() const
Int_tTBranch::GetNleaves() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
Int_tTBranch::GetOffset() const
virtual Option_t*TObject::GetOption() const
Int_tTBranch::GetReadBasket() const
Long64_tTBranch::GetReadEntry() const
TRefTable*GetRefTable() const
virtual Int_tTBranch::GetRow(Int_t row)
Int_tTBranch::GetSplitLevel() const
TBranch*TBranch::GetSubBranch(const TBranch* br) const
virtual const char*TNamed::GetTitle() const
virtual const char*TObject::GetTitle() const
Long64_tTBranch::GetTotalSize(Option_t* option = "") const
Long64_tTBranch::GetTotBytes(Option_t* option = "") const
TTree*TBranch::GetTree() const
virtual UInt_tTObject::GetUniqueID() const
Int_tTBranch::GetWriteBasket() const
Long64_tTBranch::GetZipBytes(Option_t* option = "") const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual TClass*TBranch::IsA() const
virtual TClass*TAttFill::IsA() const
virtual TClass*TNamed::IsA() const
virtual TClass*TObject::IsA() const
Bool_tTBranch::IsAutoDelete() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTBranch::IsFolder() const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTObject::IsSortable() const
virtual Bool_tTAttFill::IsTransparent() const
Bool_tTObject::IsZombie() const
virtual voidTBranch::KeepCircular(Long64_t maxEntries)
virtual Int_tTBranch::LoadBaskets()
virtual voidTNamed::ls(Option_t* option = "") const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTAttFill::Modify()
virtual Bool_tNotify()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::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)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual voidTBranch::Print(Option_t* option = "") const
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTBranch::ReadBasket(TBuffer& b)
virtual voidReadLeaves(TBuffer& b)
virtual voidTBranch::ReadLeaves(TBuffer& b)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTBranch::Refresh(TBranch* b)
virtual voidReset(Option_t* option = "")
virtual voidTBranch::Reset(Option_t* option = "")
virtual voidTBranch::ResetAddress()
virtual voidTAttFill::ResetAttFill(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
static voidTBranch::ResetCount()
virtual voidTBranch::ResetReadEntry()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001)
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
virtual voidTBranch::SetAddress(void* add)
virtual voidTBranch::SetAutoDelete(Bool_t autodel = kTRUE)
virtual voidTBranch::SetBasketSize(Int_t buffsize)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTBranch::SetBufferAddress(TBuffer* entryBuffer)
virtual voidTBranch::SetCompressionLevel(Int_t level = 1)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTBranch::SetEntries(Long64_t entries)
virtual voidTBranch::SetEntryOffsetLen(Int_t len)
virtual voidTBranch::SetFile(TFile* file = 0)
virtual voidTBranch::SetFile(const char* filename)
virtual voidTAttFill::SetFillAttributes()MENU
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTBranch::SetFirstEntry(Long64_t entry)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
virtual voidTBranch::SetObject(void* objadd)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTBranch::SetOffset(Int_t offset = 0)
virtual Int_tSetParent(const TObject* obj, const Int_t branchID)
virtual voidSetReadEntry(Long64_t entry)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTBranch::SetTree(TTree* tree)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTBranch::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTAttFill::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTNamed::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
virtual voidTBranch::Streamer(TBuffer& b)
virtual voidTAttFill::Streamer(TBuffer& b)
virtual voidTNamed::Streamer(TBuffer& b)
virtual voidTObject::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTBranch::StreamerNVirtual(TBuffer& b)
voidTAttFill::StreamerNVirtual(TBuffer& b)
voidTNamed::StreamerNVirtual(TBuffer& b)
voidTObject::StreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTBranch::UpdateAddress()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
TStringTBranch::GetRealFileName() const
voidTBranch::Init(const char* name, const char* leaflist, Int_t compress)
voidTBranch::SetSkipZip(Bool_t skip = kTRUE)
Int_tTBranch::WriteBasket(TBasket* basket, Int_t where)

Data Members

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_tTBranch::fBasketSizeInitial Size of Basket Buffer
TObjArrayTBranch::fBaskets-> List of baskets of this branch
TObjArrayTBranch::fBranches-> List of Branches of this branch
TList*TBranch::fBrowsables! List of TVirtualBranchBrowsables used for Browse()
Int_tTBranch::fCompress(=1 branch is compressed, 0 otherwise)
TDirectory*TBranch::fDirectory! Pointer to directory where this branch buffers are stored
Long64_tTBranch::fEntriesNumber of entries
TBuffer*TBranch::fEntryBuffer! Buffer used to directly pass the content without streaming
Long64_tTBranch::fEntryNumberCurrent entry number (last one filled in this branch)
Int_tTBranch::fEntryOffsetLenInitial Length of fEntryOffset table in the basket buffers
TStringTBranch::fFileNameName of file where buffers are stored ("" if in same file as Tree header)
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
Long64_tTBranch::fFirstEntryNumber of the first entry in this branch
TObjArrayTBranch::fLeaves-> List of leaves of this branch
Int_tTBranch::fMaxBasketsMaximum number of Baskets so far
TBranch*TBranch::fMother! Pointer to top-level parent branch in the tree.
Int_tTBranch::fNBasketRAM! Number of baskets in fBasketRAM
TStringTNamed::fNameobject identifier
Int_tTBranch::fNleaves! Number of leaves
Int_tTBranch::fOffsetOffset of this branch
TBranch*TBranch::fParent! Pointer to parent branch.
Int_tTBranch::fReadBasket! Current basket number when reading
Long64_tTBranch::fReadEntry! Current entry number when reading
TRefTable*fRefTablepointer to the TRefTable
Bool_tTBranch::fSkipZip!After being read, the buffer will not be unziped.
Int_tTBranch::fSplitLevelBranch split level
TStringTNamed::fTitleobject title
Long64_tTBranch::fTotBytesTotal number of bytes in all leaves before compression
TTree*TBranch::fTree! Pointer to Tree header
Int_tTBranch::fWriteBasketLast basket number written
Long64_tTBranch::fZipBytesTotal number of bytes in all leaves after compression
static Int_tTBranch::fgCount! branch counter

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

 Default constructor.
TBranchRef(TTree* tree)
 Main constructor called by TTree::BranchRef.
 Typical destructor.
void Clear(Option_t* option = "")
 Clear entries in the TRefTable.
Int_t Fill()
 Fill the branch basket with the referenced objects parent numbers.
void FillLeaves(TBuffer& b)
 This function called by TBranch::Fill overloads TBranch::FillLeaves.
Bool_t Notify()
 This function is called by TRefTable::Notify, itself called by
 The function reads the branch containing the object referenced
 by the TRef.
void Print(Option_t* option = "") const
 Print the TRefTable branch.
void ReadLeaves(TBuffer& b)
 This function called by TBranch::GetEntry overloads TBranch::ReadLeaves.
void Reset(Option_t* option = "")
    Existing buffers are deleted
    Entries, max and min are reset
    TRefTable is cleared.
Int_t SetParent(const TObject* obj, const Int_t branchID)
 -- Set the current parent branch.

 This function is called by TBranchElement::GetEntry()
 and TBranchElement::Fill() when reading or writing
 branches that may contain referenced objects.

TRefTable * GetRefTable() const
{return fRefTable;}
void SetReadEntry(Long64_t entry)
{fReadEntry = entry;}