ROOT logo
AliRoot » MUON » AliMUONTreeManager

class AliMUONTreeManager: public TObject

 \class AliMUONTreeManager

 Helper class to handle the relationships TTree<->MUON data containers

 The general way of dealing with I/O for MUON is a two stage process :

 1) first get a TTree pointer using the AliLoader mechanism (this is AliRoot
    general)

 2) connect that TTree to a MUON (virtual) data container using
    the container's Connect(TTree&) method (this is MUON specific)

 This class helps implementing stage 2 in the relevant store implementations

 \see AliMUONVStore

 Basically, the relationship Tree<->Store is possible because
 the TreeManager, when creating branches, uses the UserInfo part of the
 TTree to store the relationship branch -> MUON store classname.

 \author Laurent Aphecetche, Subatech

Function Members (Methods)

public:
AliMUONTreeManager()
AliMUONTreeManager(const AliMUONTreeManager&)
virtual~AliMUONTreeManager()
voidTObject::AbstractMethod(const char* method) const
voidAddClassName(TTree& tree, const char* pattern, const char* className) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
TObject*CreateObject(const TTree& tree, const char* detail) const
virtual voidTObject::Delete(Option_t* option = "")MENU
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 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 TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
voidGetEvent(TTree& tree, Int_t event) const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
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 Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
Bool_tMakeBranch(TTree& tree, const char* storeClassName, const char* branchClassName, const char* branchName, void* address, Int_t bufferSize = 4000, Int_t splitLevel = 99) const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
AliMUONTreeManager&operator=(const AliMUONTreeManager&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
Bool_tSetAddress(TTree& tree, const char* branchName, void* address) const
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
voidShowStatus(TTree& tree) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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
voidUpdateBranchStatuses(TTree& tree, const char* pattern) const
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
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
TStringDefaultClassName(const char* treename, const char* pattern) const
TStringGetClassName(const TTree& tree, const char* pattern, Bool_t makeDefault) const

Data Members

Class Charts

Inheritance Chart:
TObject
AliMUONTreeManager

Function documentation

AliMUONTreeManager()
 Default ctor
~AliMUONTreeManager()
 Dtor
GetEvent(TTree& tree, Int_t event) const
 Equivalent to tree.GetEvent(event) is NDEBUG is not defined,
 otherwise insure that selected branches have a non-zero address
 (the contrary indicating we'll get a memory leak when reading the
 tree).
ShowStatus(TTree& tree) const
 Show main branches status and address
AddClassName(TTree& tree, const char* pattern, const char* className) const
 Adds a association (pattern,className) to the UserInfo() of tree
 It is mandatory to use this method in MakeBranches(), as this is the key
 to get an automatic container creation from a tree.
MakeBranch(TTree& tree, const char* storeClassName, const char* branchClassName, const char* branchName, void* address, Int_t bufferSize = 4000, Int_t splitLevel = 99) const
 Create a branch in the tree
SetAddress(TTree& tree, const char* branchName, void* address) const
 Set the address for one branch
CreateObject(const TTree& tree, const char* detail) const
 Object creation from tree, using
 the (pattern,className) pairs stored in the UserInfo() of TTree.
UpdateBranchStatuses(TTree& tree, const char* pattern) const
 Loop over tree branches and set their status if their name matches
 the pattern :
 - zero if branch address is null and
 - one otherwise
 This will avoid memory leak, if we set the address to only part
 of the branches before doing a tree.GetEvent(i)

 WARNING : this is a time consuming operation, as we loop over branches
 at least twice (one here, and the TTree::SetBranchStatus is itself
 a loop). So use only when necessary.

GetClassName(const TTree& tree, const char* pattern, Bool_t makeDefault) const
 Find out, using the TTree::UserInfo, the classname corresponding to
 pattern.
 If makeDefault=true and we cannot find the pattern in the UserInfo,
 we return DefaultClassName(pattern)

DefaultClassName(const char* treename, const char* pattern) const
 For backward compatibility only. Decides, based on the tree name and a
 pattern, which store class should be used.
AliMUONTreeManager()