3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 // Author: Markus Fasel
15 class THistManager : public TNamed {
18 THistManager(const char *name);
20 void ReleaseOwner() { fIsOwner = kFALSE; };
22 void CreateHistoGroup(const char *groupname, const char *parent = "/");
24 void CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax);
25 void CreateTH1(const char *name, const char *title, int nbins, const double *xbins);
26 void CreateTH1(const char *name, const char *title, const TArrayD &xbins);
27 void CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax);
28 void CreateTH2(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, const double *ybins);
29 void CreateTH2(const char *name, const char *title, const TArrayD &xbins, const TArrayD &ybins);
30 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);
31 void CreateTH3(const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, const double *ybins, int nbinsz, const double *zbins);
32 void CreateTH3(const char *name, const char *title, const TArrayD &xbins, const TArrayD &ybins, const TArrayD &zbins);
33 void CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max);
34 void CreateTHnSparse(const char *name, const char *title, int ndim, const TAxis **axes);
35 void SetObject(TObject * const o, const char *group = "/");
36 void FillTH1(const char *hname, double x, double weight = 1.);
37 void FillTH2(const char *hname, double x, double y, double weight = 1.);
38 void FillTH2(const char *hname, double *point, double weight = 1.);
39 void FillTH3(const char *hname, double x, double y, double z, double weight = 1.);
40 void FillTH3(const char *hname, const double *point, double weight = 1.);
41 void FillTHnSparse(const char *name, const double *x, double weight = 1.);
43 THashList *GetListOfHistograms() { return fHistos; }
44 TObject *FindObject(const char *name) const;
45 virtual TObject *FindObject(const TObject *obj) const;
48 THistManager(const THistManager &);
49 THistManager &operator=(const THistManager &);
50 THashList *FindGroup(const char *dirname) const;
51 void TokenizeFilename(const char *name, const char *delim, std::vector<std::string> &listoftokens) const;
52 const char *basename(const char *path) const;
53 const char *histname(const char *path) const;
55 THashList *fHistos; // List of histograms
56 bool fIsOwner; // Set the ownership
58 ClassDef(THistManager, 1); // Container for histograms