ROOT logo
AliRoot » STEER » STEERBASE » AliMergeableCollection

class AliMergeableCollection: public TFolder

Function Members (Methods)

public:
AliMergeableCollection(const char* name = "", const char* title = "")
virtual~AliMergeableCollection()
voidTObject::AbstractMethod(const char* method) const
virtual voidTFolder::Add(TObject* obj)
TFolder*TFolder::AddFolder(const char* name, const char* title, TCollection* collection = 0)
Bool_tAdopt(TObject* obj)
Bool_tAdopt(const char* identifier, TObject* obj)
virtual voidTObject::AppendPad(Option_t* option = "")
Bool_tAttach(AliMergeableCollection* mc, const char* identifier, Bool_t pruneFirstIfAlreadyExists = kFALSE)
virtual voidBrowse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
voidClearMessages()
virtual AliMergeableCollection*Clone(const char* name = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTFolder::Copy(TObject&) const
virtual TIterator*CreateIterator(Bool_t dir = kIterForward) const
virtual TList*CreateListOfKeys(Int_t index) const
virtual TList*CreateListOfObjectNames(const char* identifier) const
virtual voidDelete(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 voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
UInt_tEstimateSize(Bool_t show = kFALSE) 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 voidTNamed::FillBuffer(char*& buffer)
virtual const char*TFolder::FindFullPathName(const char* name) const
virtual const char*TFolder::FindFullPathName(const TObject* obj) const
virtual TObject*FindObject(const char* fullIdentifier) const
virtual TObject*FindObject(const TObject* object) const
virtual TObject*TFolder::FindObjectAny(const char* name) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TStringGetIdentifier(const char* fullIdentifier) const
TStringGetKey(const char* identifier, Int_t index, Bool_t idContainsObjName = kFALSE) const
TCollection*TFolder::GetListOfFolders() const
virtual const char*TNamed::GetName() const
TObject*GetObject(const char* fullIdentifier) const
TObject*GetObject(const char* identifier, const char* objectName) const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
TStringGetObjectName(const char* fullIdentifier) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TObject*GetSum(const char* idPattern) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
TH1*H1(const char* fullIdentifier) const
TH1*H1(const char* identifier, const char* objectName) const
TH2*H2(const char* fullIdentifier) const
TH2*H2(const char* identifier, const char* objectName) const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
TH1*Histo(const char* fullIdentifier) const
TH1*Histo(const char* identifier, const char* objectName) 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
Bool_tIsEmptyObject(TObject* obj) const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTFolder::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tTFolder::IsOwner() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTFolder::ls(Option_t* option = "") constMENU
TMap*Map() const
voidTObject::MayNotUse(const char* method) const
Long64_tMerge(TCollection* list)
static Bool_tMergeObject(TObject* baseObject, TObject* objToAdd)
TStringNormalizeName(const char* identifier, const char* action) const
virtual Bool_tTObject::Notify()
virtual Int_tNumberOfKeys() const
virtual Int_tNumberOfObjects() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
virtual Int_tTFolder::Occurence(const TObject* obj) 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)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
voidPrintMessages(const char* prefix = "") const
TProfile*Prof(const char* fullIdentifier) const
TProfile*Prof(const char* identifier, const char* objectName) const
AliMergeableCollection*Project(const char* identifier) const
Int_tPrune(const char* identifier)
voidPruneEmptyObjects()
virtual Int_tTObject::Read(const char* name)
virtual voidTFolder::RecursiveRemove(TObject* obj)
virtual TObject*Remove(const char* fullIdentifier)
Int_tRemoveByType(const char* typeName)
voidTObject::ResetBit(UInt_t f)
virtual voidTFolder::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
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)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTFolder::SetOwner(Bool_t owner = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidShowEmptyObjects(Bool_t show = kTRUE)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
TObjArray*SortAllIdentifiers() 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
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:
AliMergeableCollection(const AliMergeableCollection& rhs)
TH1*HistoWithAction(const char* identifier, TObject* o, const TString& action) const
Bool_tInternalAdopt(const char* identifier, TObject* obj)
TStringInternalDecode(const char* fullIdentifier, Int_t index) const
TObject*InternalObject(const char* identifier, const char* objectName) const
AliMergeableCollection&operator=(const AliMergeableCollection& rhs)

Data Members

protected:
TCollection*TFolder::fFolderspointer to the list of folders
Bool_tTFolder::fIsOwnertrue if folder own its contained objects
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
TMap*fMap/ map of TMap of THashList* of TObject*...
Int_tfMapVersion/ internal version of map (to avoid custom streamer...)
map<std::string,int>fMessages! log messages
Bool_tfMustShowEmptyObject/ Whether or not to show empty objects with the Print method

Class Charts

Inheritance Chart:
TFolder
AliMergeableCollection

Function documentation

AliMergeableCollection(const char* name = "", const char* title = "")
 Ctor
~AliMergeableCollection()
 dtor. Note that the map is owner
Adopt(TObject* obj)
 Adopt a given object at top level (i.e. no key)
Adopt(const char* identifier, TObject* obj)
 Adopt a given object, and associate it with pair key
Bool_t Attach(AliMergeableCollection* mc, const char* identifier, Bool_t pruneFirstIfAlreadyExists = kFALSE)
 Attach an already existing mergeable collection to this one.
 It is attached at level identifier
 We take ownership of mc
 If identifier is already existing we kill it if pruneFirstIfAlreadyExists is kTRUE
 (and attach mc) otherwise we return kFALSE (and do *not* attach mc)
void Browse(TBrowser* b)
 Create a TFolder structure pointing to our objects, so we
 can be "browsed"
void ClearMessages()
 clear pending messages
CreateIterator(Bool_t dir = kIterForward) const
 Create an iterator (must be deleted by the client)
Clone(const char* name = "") const
 Clone this collection.
 We loose the messages.
Delete(Option_t* option = "")
 Delete all the objects
FindObject(const char* fullIdentifier) const
 Find an object by its full identifier.
FindObject(const TObject* object) const
 Find an object
CreateListOfKeys(Int_t index) const
 Create the list of keys at level index
CreateListOfObjectNames(const char* identifier) const
 Create list of object names for /key1/key2/key...
 Returned list must be deleted by client
GetIdentifier(const char* fullIdentifier) const
 Extract the identifier from the fullIdentifier
GetKey(const char* identifier, Int_t index, Bool_t idContainsObjName = kFALSE) const
 Extract the index element of the key pair from the fullIdentifier
GetObjectName(const char* fullIdentifier) const
 Extract the object name from an identifier
Histo(const char* fullIdentifier) const
 Get histogram key1/key2/.../objectName:action
 action is used for 2D histograms :
 might be px for projection along x-axis
 py for projection along y-axis
 pfx for profile along x-axis
 pfy for profile along y-axis
Histo(const char* identifier, const char* objectName) const
 Get histogram key1/key2/.../objectName:action
 action is used for 2D histograms :
 might be px for projection along x-axis
 py for projection along y-axis
 pfx for profile along x-axis
 pfy for profile along y-axis
HistoWithAction(const char* identifier, TObject* o, const TString& action) const
 Convert o to an histogram if possible, applying a given action if there
H2(const char* fullIdentifier) const
 Short-cut method to grab a 2D histogram
 Will return 0x0 if the object if not a TH2xxx
H2(const char* identifier, const char* objectName) const
 Short-cut method to grab a 2D histogram
 Will return 0x0 if the object if not a TH2xxx
Prof(const char* fullIdentifier) const
 Short-cut method to grab a TProfile histogram
 Will return 0x0 if the object if not a TProfile
Prof(const char* identifier, const char* objectName) const
 Short-cut method to grab a TProfile histogram
 Will return 0x0 if the object if not a TProfile
GetObject(const char* fullIdentifier) const
 Get object key1/key2/.../objectName
 Note that no action is allowed for generic objects (only for histograms,
 see Histo() methods)
GetObject(const char* identifier, const char* objectName) const
 Get object for (identifier,objectName) triplet
TObject* GetSum(const char* idPattern) const
 Sum objects
 The pattern must be in the form:
 /key1_1,key1_2,.../key2_1,key2_2,.../.../objectName_1,objectName_2...
 The logical or between patterns separated by commas is taken
 Exact match is required for keys and objectNames
Bool_t InternalAdopt(const char* identifier, TObject* obj)
 Adopt an obj
InternalDecode(const char* fullIdentifier, Int_t index) const
 Extract the index-th element of the identifier (/key1/key2/.../keyN/objectName)
 object is index=-1 (i.e. last)
InternalObject(const char* identifier, const char* objectName) const
 Get object for (identifier,objectName)
Bool_t IsEmptyObject(TObject* obj) const
 Check if object is empty
 (done only for TH1, so far)
TMap* Map() const
 Wrapper to insure proper key formats (i.e. new vs old)
Merge(TCollection* list)
 Merge a list of AliMergeableCollection objects with this
 Returns the number of merged objects (including this).
Bool_t MergeObject(TObject* baseObject, TObject* objToAdd)
 Add objToAdd to baseObject
TString NormalizeName(const char* identifier, const char* action) const
 Replace / by _ to build a root-compliant histo name
NumberOfObjects() const
 Get the number of objects we hold
NumberOfKeys() const
 Get the number of keys we have
Print(Option_t* option = "") const
 Print all the objects we hold, in a hopefully visually pleasing
 way.

 Option can be used to select given part only, using the schema :
 /*/*/*/*/*
 Where the stars are wilcards for /key1/key2/.../objectName

 if * is used it is assumed to be a wildcard for objectName

 For other selections the full syntax /*/*/*/*/* must be used.

 Use "-" as objectName to disable object's name output

 One might also use /*/*/*/*/:classname syntax to restrict
 output to only those objects matching a given classname pattern

PrintMessages(const char* prefix = "") const
 Print pending messages
EstimateSize(Bool_t show = kFALSE) const
 Estimate the memory (in kilobytes) used by some objects
Int_t Prune(const char* identifier)
 Delete all objects which match the beginning of the identifier
 returns the number of entries removed from the Map()
 (not to be confused with the number of leaf objects removed)

void PruneEmptyObjects()
 Delete the empty objects
 (Implemented for TH1 only)
Project(const char* identifier) const
 To be implemented : would create a new collection starting at /key1/key2/...
Remove(const char* fullIdentifier)
 Remove a given object (given its fullIdentifier=/key1/key2/.../objectName)

 Note that we do *not* remove the /key1/key2/... entry even if there's no
 more object for this triplet.

 Not very efficient. Could be improved ?

Int_t RemoveByType(const char* typeName)
 Remove all the objects in this collection that are of a given type
SortAllIdentifiers() const
 Sort our internal identifiers. Returned array must be deleted.
AliMergeableCollection(const char* name = "", const char* title = "")
void Clear(Option_t* option = "")
{ Delete(option); }
void ShowEmptyObjects(Bool_t show = kTRUE)
 Turn on the display of empty objects for the Print method
AliMergeableCollection& operator=(const AliMergeableCollection& rhs)