12 #ifndef ALIEMCALHISTOCONTAINER_H
13 #define ALIEMCALHISTOCONTAINER_H
35 namespace EMCalTriggerPtAnalysis {
79 if(hgroup)
fGroup = hgroup;
93 virtual const char *
what()
const throw() {
113 std::stringstream msgbuilder;
116 msgbuilder <<
"Histogram " <<
fHistname <<
" not found in";
117 if(strlen(
fGroup.c_str())) msgbuilder <<
" group " <<
fGroup;
118 else msgbuilder <<
" the list of histograms.";
121 msgbuilder <<
"Object " << fHistname <<
" is of wrong type.";
124 msgbuilder <<
"Histogram " << fHistname <<
" already exists in";
125 if(strlen(fGroup.c_str())) msgbuilder <<
" group " <<
fGroup;
126 else msgbuilder <<
" the list of histograms.";
129 msgbuilder <<
"Group " << fGroup <<
" not found.";
165 void CreateTH1(const
char *name, const
char *
title,
int nbins,
double xmin,
double xmax, Option_t *opt = "") throw(HistoContainerContentException);
166 void CreateTH1(const
char *name, const
char *title,
int nbins, const
double *xbins, Option_t *opt = "") throw(HistoContainerContentException);
167 void CreateTH1(const
char *name, const
char *title, const TArrayD &xbins, Option_t *opt = "") throw(HistoContainerContentException);
168 void CreateTH2(const
char *name, const
char *title,
int nbinsx,
double xmin,
double xmax,
int nbinsy,
double ymin,
double ymax, Option_t *opt = "") throw(HistoContainerContentException);
169 void CreateTH2(const
char *name, const
char *title,
int nbinsx, const
double *xbins,
int nbinsy, const
double *ybins, Option_t *opt = "") throw(HistoContainerContentException);
170 void CreateTH2(const
char *name, const
char *title, const TArrayD &xbins, const TArrayD &ybins, Option_t *opt = "") throw(HistoContainerContentException);
171 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, Option_t *opt = "") throw (HistoContainerContentException);
172 void CreateTH3(const
char *name, const
char *title,
int nbinsx, const
double *xbins,
int nbinsy, const
double *ybins,
int nbinsz, const
double *zbins, Option_t *opt = "") throw (HistoContainerContentException);
173 void CreateTH3(const
char *name, const
char *title, const TArrayD &xbins, const TArrayD &ybins, const TArrayD &zbins, Option_t *opt = "") throw(HistoContainerContentException);
174 void CreateTHnSparse(const
char *name, const
char *title,
int ndim, const
int *nbins, const
double *min, const
double *max, Option_t *opt = "") throw(HistoContainerContentException);
175 void CreateTHnSparse(const
char *name, const
char *title,
int ndim, const TAxis **axes, Option_t *opt = "") throw(HistoContainerContentException);
176 void CreateTProfile(const
char *name, const
char *title,
int nbinsX,
double xmin,
double xmax, Option_t *opt = "") throw(HistoContainerContentException);
177 void CreateTProfile(const
char *name, const
char *title,
int nbinsX, const
double *xbins, Option_t *opt = "") throw(HistoContainerContentException);
178 void CreateTProfile(const
char *name, const
char *title, const TArrayD &xbins, Option_t *opt = "") throw(HistoContainerContentException);
179 void SetObject(TObject * const o, const
char *group = "/") throw(HistoContainerContentException);
180 void FillTH1(const
char *hname,
double x,
double weight = 1.) throw(HistoContainerContentException);
181 void FillTH2(const
char *hname,
double x,
double y,
double weight = 1.) throw(HistoContainerContentException);
182 void FillTH2(const
char *hname,
double *point,
double weight = 1.) throw(HistoContainerContentException);
183 void FillTH3(const
char *hname,
double x,
double y,
double z,
double weight = 1.) throw(HistoContainerContentException);
184 void FillTH3(const
char *hname, const
double *point,
double weight = 1.) throw(HistoContainerContentException);
185 void FillTHnSparse(const
char *name, const
double *x,
double weight = 1.) throw(HistoContainerContentException);
186 void FillProfile(const
char *name,
double x,
double y,
double weight = 1.) throw(HistoContainerContentException);
193 virtual TObject *
FindObject(
const char *name)
const;
194 virtual TObject *
FindObject(
const TObject *obj)
const;
199 THashList *
FindGroup(
const char *dirname)
const;
200 void TokenizeFilename(
const char *name,
const char *delim, std::vector<std::string> &listoftokens)
const;
201 const char *
basename(
const char *path)
const;
202 const char *
histname(
const char *path)
const;
AliEMCalHistoContainer & operator=(const AliEMCalHistoContainer &)
~AliEMCalHistoContainer()
std::string fHistname
Name of the histogram producing the exception.
void FillTH2(const char *hname, double x, double y, double weight=1.)
ExceptionType_t
Definition of exception types thrown by the histogram container.
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, Option_t *opt="")
void SetObject(TObject *const o, const char *group="/")
THashList * GetListOfHistograms()
void CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Container class for histograms for the high- charged particle analysis.
void FillTHnSparse(const char *name, const double *x, double weight=1.)
void FillTH3(const char *hname, double x, double y, double z, double weight=1.)
Group error (not existing or duplicated)
std::string fErrorMessage
container for the error message produced in the what function
Exception thrown by the histogram container in case of problems.
ExceptionType_t GetExceptionType() const
virtual TObject * FindObject(const char *name) const
Histogram with name duplicated.
void CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
ExceptionType_t fExceptionType
type of the exception
THashList * fHistos
List of histograms.
std::string fGroup
Group of objects producing the exception.
void CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
const char * basename(const char *path) const
bool fIsOwner
Set the ownership.
void CreateTProfile(const char *name, const char *title, int nbinsX, double xmin, double xmax, Option_t *opt="")
void TokenizeFilename(const char *name, const char *delim, std::vector< std::string > &listoftokens) const
const char * GetErrorHistogramName() const
Histogram with name not found in the container.
const char * histname(const char *path) const
THashList * FindGroup(const char *dirname) const
virtual ~HistoContainerContentException()
void FillTH1(const char *hname, double x, double weight=1.)
void CreateHistoGroup(const char *groupname, const char *parent="/")
HistoContainerContentException(const char *histname, const char *hgroup, ExceptionType_t etype)
virtual const char * what() const
void CreateErrorMessage()
void FillProfile(const char *name, double x, double y, double weight=1.)