ROOT logo
AliRoot » PWG » TOOLS » THistManager

class THistManager: public TNamed

Function Members (Methods)

public:
THistManager()
THistManager(const char* name)
virtual~THistManager()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
voidCreateHistoGroup(const char* groupname, const char* parent = "/")
voidCreateTH1(const char* name, const char* title, const TArrayD& xbins)
voidCreateTH1(const char* name, const char* title, int nbins, const double* xbins)
voidCreateTH1(const char* name, const char* title, int nbins, double xmin, double xmax)
voidCreateTH2(const char* name, const char* title, const TArrayD& xbins, const TArrayD& ybins)
voidCreateTH2(const char* name, const char* title, int nbinsx, const double* xbins, int nbinsy, const double* ybins)
voidCreateTH2(const char* name, const char* title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax)
voidCreateTH3(const char* name, const char* title, const TArrayD& xbins, const TArrayD& ybins, const TArrayD& zbins)
voidCreateTH3(const char* name, const char* title, int nbinsx, const double* xbins, int nbinsy, const double* ybins, int nbinsz, const double* zbins)
voidCreateTH3(const char* name, const char* title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax)
voidCreateTHnSparse(const char* name, const char* title, int ndim, const TAxis** axes)
voidCreateTHnSparse(const char* name, const char* title, int ndim, const int* nbins, const double* min, const double* max)
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 voidTNamed::FillBuffer(char*& buffer)
voidFillTH1(const char* hname, double x, double weight = 1.)
voidFillTH2(const char* hname, double* point, double weight = 1.)
voidFillTH2(const char* hname, double x, double y, double weight = 1.)
voidFillTH3(const char* hname, const double* point, double weight = 1.)
voidFillTH3(const char* hname, double x, double y, double z, double weight = 1.)
voidFillTHnSparse(const char* name, const double* x, double weight = 1.)
virtual TObject*FindObject(const char* name) const
virtual TObject*FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
THashList*GetListOfHistograms()
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
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
virtual voidTNamed::ls(Option_t* option = "") 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)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidReleaseOwner()
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)
voidSetObject(TObject *const o, const char* group = "/")
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
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:
THistManager(const THistManager&)
const char*basename(const char* path) const
THashList*FindGroup(const char* dirname) const
const char*histname(const char* path) const
THistManager&operator=(const THistManager&)
voidTokenizeFilename(const char* name, const char* delim, vector<std::string>& listoftokens) const

Data Members

protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
THashList*fHistosList of histograms
boolfIsOwnerSet the ownership

Class Charts

Inheritance Chart:
TNamed
THistManager

Function documentation

THistManager()
	 * Default constructor, only initialising pointers with 0

THistManager(const char* name)
	 * Main constructor, creating also a list for the histograms
	 *
	 * @param name: Name of the object (list named accordingly)

~THistManager()
	 * Destructor, deletes the list of histograms if it is the owner

void CreateHistoGroup(const char* groupname, const char* parent = "/")
	 * Create a new group of histograms within a parent group. Groups are represented as list. The default parent is
	 * always the top list. List name structure accouding to unix paths (i.e. top list /, hirarchies separated by /).
	 *
	 * @param groupname: Name of the new group
	 * @param parent (@default "/"): Name of the parent group
	 * @throw HistManagerException

void CreateTH1(const char* name, const char* title, int nbins, double xmin, double xmax)
	 * Create a new TH1 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param nbins: number of bins
	 * @param xmin: min. value of the range
	 * @param xmax: max. value of the range
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH1(const char* name, const char* title, int nbins, const double* xbins)
	 * Create a new TH1 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param nbins: number of bins
	 * @param xbins: array of bin limits
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH1(const char* name, const char* title, const TArrayD& xbins)
	 * Create a new TH1 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param xbins: array of bin limits (contains also number of bins)
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH2(const char* name, const char* title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax)
	 * Create a new TH2 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param nbinsx: number of bins in x-direction
	 * @param xmin: min. value of the range in x-direction
	 * @param xmax: max. value of the range in x-direction
	 * @param nbinsy: number of bins in y-direction
	 * @param ymin: min. value of the range in y-direction
	 * @param ymax: max. value of the range in y-direction
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH2(const char* name, const char* title, int nbinsx, const double* xbins, int nbinsy, const double* ybins)
	 * Create a new TH2 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param nbinsx: number of bins in x-direction
	 * @param xbins: array of bin limits in x-direction
	 * @param nbinsy: number of bins in y-direction
	 * @param ybins: array of bin limits in y-direction
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH2(const char* name, const char* title, const TArrayD& xbins, const TArrayD& ybins)
	 * Create a new TH2 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param xbins: array of bin limits in x-direction (contains also the number of bins)
	 * @param ybins: array of bin limits in y-direction (contains also the number of bins)
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH3(const char* name, const char* title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax)
	 * Create a new TH3 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param nbinsx: number of bins in x-direction
	 * @param xmin: min. value of the range in x-direction
	 * @param xmax: max. value of the range in x-direction
	 * @param nbinsy: number of bins in y-direction
	 * @param ymin: min. value of the range in y-direction
	 * @param ymax: max. value of the range in y-direction
	 * @param nbinsz: number of bins in z-direction
	 * @param zmin: min. value of the range in z-direction
	 * @param zmax: max. value of the range in z-direction
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH3(const char* name, const char* title, int nbinsx, const double* xbins, int nbinsy, const double* ybins, int nbinsz, const double* zbins)
	 * Create a new TH3 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param nbinsx: number of bins in x-direction
	 * @param xbins: array of bin limits in x-direction
	 * @param nbinsy: number of bins in y-direction
	 * @param ybins: array of bin limits in y-direction
	 * @param nbinsz: number of bins in z-direction
	 * @param zbins: array of bin limits in z-direction
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTH3(const char* name, const char* title, const TArrayD& xbins, const TArrayD& ybins, const TArrayD& zbins)
	 * Create a new TH3 within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param xbins: array of bin limits in x-direction (contains also the number of bins)
	 * @param ybins: array of bin limits in y-direction (contains also the number of bins)
	 * @param zbins: array of bin limits in z-direction (contains also the number of bins)
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTHnSparse(const char* name, const char* title, int ndim, const int* nbins, const double* min, const double* max)
	 * Create a new THnSparse within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param ndim: Number of dimensions
	 * @param nbins: Number of bins per dimension
	 * @param min: min. value of the range for each dimension
	 * @param max: max. value of the range for each dimension
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void CreateTHnSparse(const char* name, const char* title, int ndim, const TAxis** axes)
	 * Create a new THnSparse within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param title: Title of the histogram
	 * @param ndim: Number of dimensions
	 * @param axes: Array of pointers to TAxis for containing the axis definition for each dimension
	 * Raises fatals in case the parent group does not exist or the object is attempted to be duplicated within the group

void SetObject(TObject *const o, const char* group = "/")
	 * Set a new group into the container into the parent group
	 *
	 * @param o: the object ot be included
	 * Raises fatals in case the parent group is not found, the object is attempted to be duplicated in the group, or the type of
	 * the object is not a histogram type

void FillTH1(const char* hname, double x, double weight = 1.)
	 * Fill a 1D histogram within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param x: x-coordinate
	 * @param weight (@default 1): optional weight of the entry
	 * Raises fatals in case the parent group is not found or the histogram is not found in the parent group

void FillTH2(const char* hname, double x, double y, double weight = 1.)
	 * Fill a 2D histogram within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param x: x-coordinate
	 * @param y: y-coordinate
	 * @param weight (@default 1): optional weight of the entry
	 * Raises fatals in case the parent group is not found or the histogram is not found in the parent group

void FillTH2(const char* hname, double* point, double weight = 1.)
	 * Fill a 2D histogram within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param point: coordinates of the data
	 * @param weight (@default 1): optional weight of the entry
	 * Raises fatals in case the parent group is not found or the histogram is not found in the parent group

void FillTH3(const char* hname, double x, double y, double z, double weight = 1.)
	 * Fill a 3D histogram within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param x: x-coordinate
	 * @param y: y-coordinate
	 * @param z: z-coordinate
	 * @param weight (@default 1): optional weight of the entry
	 * Raises fatals in case the parent group is not found or the histogram is not found in the parent group

void FillTH3(const char* hname, const double* point, double weight = 1.)
	 * Fill a 3D histogram within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param point: 3D-coordinate of the point
	 * @param weight (@default 1): optional weight of the entry
	 * Raises fatals in case the parent group is not found or the histogram is not found in the parent group

void FillTHnSparse(const char* name, const double* x, double weight = 1.)
	 * Fill a  nD histogram within the container. The histogram name also contains the parent group(s) according to the common
	 * group notation.
	 *
	 * @param name: Name of the histogram
	 * @param x: coordinates of the data
	 * @param weight (@default 1): optional weight of the entry
	 * Raises fatals in case the parent group is not found or the histogram is not found in the parent group

TObject * FindObject(const char* name) const
	 * Find an object inside the container. The object can also be within a
	 * histogram group. For this the name has to follow the common notation
	 *
	 * @param name: Name of the object to find inside the container
	 * @return: pointer to the object (NULL if not found)

TObject* FindObject(const TObject* obj) const
	 * Find and object inside the container. The object name is expected to contain the
	 * full path of the histogram object, including parent groups
	 *
	 * @param obj: the object to find
	 * @return: pointer to the object (NULL if not found)

THashList * FindGroup(const char* dirname) const
	 * Find histogram group. Name is using common notation
	 *
	 * @param dirname: Path of the group (treat empty path as top node
	 * @return: TList of objects (NULL if group does not exist)

void TokenizeFilename(const char* name, const char* delim, vector<std::string>& listoftokens) const
	 * Tokenizes a string. Results are stored inside the vector listoftokens
	 *
	 * @ param name: string to be tokenised
	 * @ param delim: delimiter string
	 * @ param listoftokens: list of tokens (C++ strings)

const char * basename(const char* path) const
	 * Helper function extracting the basename from a given histogram path.
	 *
	 * @param path: histogram path
	 * @return: basename extracted

const char * histname(const char* path) const
	 * Helper function extracting the histogram name from a given histogram path.
	 *
	 * @param path: histogram path
	 * @return: basename extracted

THistManager()
void ReleaseOwner()
THashList * GetListOfHistograms()
{ return fHistos; }
THistManager & operator=(const THistManager& )