ROOT logo
AliRoot » PWG » MUON » AliHistogramCollection

class AliHistogramCollection: public TNamed

Function Members (Methods)

public:
AliHistogramCollection(const char* name = "", const char* title = "")
virtual~AliHistogramCollection()
voidTObject::AbstractMethod(const char* method) const
Bool_tAdopt(TH1* histo)
Bool_tAdopt(const char* keyA, TH1* histo)
Bool_tAdopt(const char* keyA, const char* keyB, TH1* histo)
Bool_tAdopt(const char* keyA, const char* keyB, const char* keyC, TH1* histo)
Bool_tAdopt(const char* keyA, const char* keyB, const char* keyC, const char* keyD, TH1* histo)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
voidClearMessages()
virtual AliHistogramCollection*Clone(const char* name = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
AliMergeableCollection*Convert() const
virtual voidTNamed::Copy(TObject& named) const
virtual TIterator*CreateIterator(Bool_t dir = kIterForward) const
virtual TList*CreateListOfHistogramNames(const char* keyA, const char* keyB = "", const char* keyC = "", const char* keyD = "") const
virtual TList*CreateListOfKeysA() const
virtual TList*CreateListOfKeysB() const
virtual TList*CreateListOfKeysC() const
virtual TList*CreateListOfKeysD() 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 TObject*FindObject(const char* identifier) const
virtual TObject*FindObject(const TObject* key) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::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*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
TH1*Histo(const char* identifier) const
TH1*Histo(const char* keyA, const char* histoname) const
TH1*Histo(const char* keyA, const char* keyB, const char* histoname) const
TH1*Histo(const char* keyA, const char* keyB, const char* keyC, const char* histoname) const
TH1*Histo(const char* keyA, const char* keyB, const char* keyC, const char* keyD, const char* histoname) const
TStringHistoName(const char* identifier) 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_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
TStringKeyA(const char* identifier) const
TStringKeyB(const char* identifier) const
TStringKeyC(const char* identifier) const
TStringKeyD(const char* identifier) const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
Long64_tMerge(TCollection* list)
virtual Bool_tTObject::Notify()
virtual Int_tNumberOfHistograms() const
virtual Int_tNumberOfKeys() const
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)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
voidPrintMessages(const char* prefix = "") const
AliHistogramCollection*Project(const char* keyA, const char* keyB = "", const char* keyC = "", const char* keyD = "") const
voidPruneEmptyHistograms()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual TObject*Remove(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 = "")
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 voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidShowEmptyHistograms(Bool_t show = kTRUE)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() 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:
AliHistogramCollection(const AliHistogramCollection& rhs)
TList*CreateListOfKeys(Int_t index) const
Bool_tHistoSameAxis(TH1* h0, TH1* h1) const
Bool_tInternalAdopt(const char* identifier, TH1* histo)
TStringInternalDecode(const char* identifier, Int_t index) const
TH1*InternalHisto(const char* identifier, const char* histoname) const
TMap*Map() const
TStringNormalizeName(const char* identifier, const char* action) const
AliHistogramCollection&operator=(const AliHistogramCollection& rhs)
TObjArray*SortAllIdentifiers() const

Data Members

protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
TMap*fMapmap of TMap of THashList* of TH1*...
Int_tfMapVersioninternal version of map (to avoid custom streamer...)
map<std::string,int>fMessages! log messages
Bool_tfMustShowEmptyHistogramWhether or not to show empty histograms with the Print method

Class Charts

Inheritance Chart:
TNamed
AliHistogramCollection

Function documentation

AliHistogramCollection(const char* name = "", const char* title = "")
 Ctor
~AliHistogramCollection()
 dtor. Note that the map is owner
Adopt(TH1* histo)
 Adopt a given histogram at top level (i.e. no key)
Adopt(const char* keyA, TH1* histo)
 Adopt a given histogram, and associate it with pair (keyA)
Adopt(const char* keyA, const char* keyB, TH1* histo)
 Adopt a given histogram, and associate it with pair (keyA,keyB)
Adopt(const char* keyA, const char* keyB, const char* keyC, TH1* histo)
 Adopt a given histogram, and associate it with pair (keyA,keyB,keyC)
Adopt(const char* keyA, const char* keyB, const char* keyC, const char* keyD, TH1* histo)
 Adopt a given histogram, and associate it with pair (keyA,keyB,keyC,keyD)
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 histograms
FindObject(const char* identifier) const
 Find an object by its full identifier.
FindObject(const TObject* key) const
 Find an object
AliMergeableCollection* Convert() const
 Convert this into a mergeable collection so it can receive objects
 that are not histograms
CreateListOfKeysA() const
 Create list of keys at level "A" (/A/B/C/D/histoname)
 Must be delete by client
CreateListOfKeysB() const
 Create list of keys at level "B" (/A/B/C/D/histoname)
 Must be delete by client
CreateListOfKeysC() const
 Create list of keys at level "C" (/A/B/C/D/histoname)
 Must be delete by client
CreateListOfKeysD() const
 Create list of keys at level "D" (/A/B/C/D/histoname)
 Must be delete by client
CreateListOfHistogramNames(const char* keyA, const char* keyB = "", const char* keyC = "", const char* keyD = "") const
 Create list of histogram names for /keyA/keyB/keyC/KeyD
 Returned list must be deleted by client
CreateListOfKeys(Int_t index) const
 Create the list of keys at level index
Histo(const char* keyA, const char* histoname) const
 Get histo for (keyA,histoname) triplet
Histo(const char* keyA, const char* keyB, const char* histoname) const
 Get histo for (keyA,keyB,histoname) triplet
Histo(const char* keyA, const char* keyB, const char* keyC, const char* histoname) const
 Get histo for (keyA,keyB,keyC,histoname) quad
Histo(const char* keyA, const char* keyB, const char* keyC, const char* keyD, const char* histoname) const
 Get histo for (keyA,keyB,keyC,histoname) quad
HistoName(const char* identifier) const
 Extract the histogram name from an identifier
Bool_t InternalAdopt(const char* identifier, TH1* histo)
 Adopt an histogram
Histo(const char* identifier) const
 Get histogram keyA/keyB/keyC/keyD/histoname:action
InternalDecode(const char* identifier, Int_t index) const
 Extract the index-th element of the identifier (/keyA/keyB/keyC/keyD/histoname)
 keyA is index=0
 keyB is index=1
 keyC is index=2
 keyD is index=3
 histo is index=-1 (i.e. last)
InternalHisto(const char* identifier, const char* histoname) const
 Get histo for (identifier,histoname)
KeyA(const char* identifier) const
 Extract the first element of the key pair from an identifier
KeyB(const char* identifier) const
 Extract the second element (if present)
KeyC(const char* identifier) const
 Extract the 3rd element (if present)
KeyD(const char* identifier) const
 Extract the 4th element (if present)
TMap* Map() const
 Wrapper to insure proper key formats (i.e. new vs old)
Merge(TCollection* list)
 Merge a list of AliHistogramCollection objects with this
 Returns the number of merged objects (including this).
TString NormalizeName(const char* identifier, const char* action) const
 Replace / by _ to build a root-compliant histo name
NumberOfHistograms() const
 Get the number of histograms we hold
NumberOfKeys() const
 Get the number of keys we have
Print(Option_t* option = "") const
 Print all the histograms 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 /keyA/keyB/keyC/KeyD/histoname

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

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

 Use "-" as histoname to disable histogram's name output
PrintMessages(const char* prefix = "") const
 Print pending messages
EstimateSize(Bool_t show = kFALSE) const
 Estimate the memory (in bytes) used by our histograms
void PruneEmptyHistograms()
 Delete the empty histograms
Project(const char* keyA, const char* keyB = "", const char* keyC = "", const char* keyD = "") const
 Create a new collection starting at keyA/keyB/keyC/keyD
 Histograms are *copied*
Remove(TObject* obj)
 Remove a given histogram (given its key=full identifier=/keyA/keyB/keyC/keyD/histoname)

 Note that we do *not* remove the /keyA/keyB/keyC/keyD entry even if there's no
 more histogram for this triplet.

 Not very efficient. Could be improved ?

Bool_t HistoSameAxis(TH1* h0, TH1* h1) const
 shameless copy from TProofPlayerRemote::HistoSameAxis

 Return kTRUE is the histograms 'h0' and 'h1' have the same binning and ranges
 on the axis (i.e. if they can be just Add-ed for merging).
SortAllIdentifiers() const
 Sort our internal identifiers. Returned array must be deleted.
AliHistogramCollection(const char* name = "", const char* title = "")
void Clear(Option_t* option = "")
{ Delete(option); }
void ShowEmptyHistograms(Bool_t show = kTRUE)
 Turn on the display of empty histograms for the Print method
AliHistogramCollection& operator=(const AliHistogramCollection& rhs)