AliPhysics  vAN-20150427 (e6e7aad)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
EMCalTriggerPtAnalysis::AliEMCalHistoContainer Class Reference

Container class for histograms for the high- \( p_{t} \) charged particle analysis. More...

#include <AliEMCalHistoContainer.h>

Inheritance diagram for EMCalTriggerPtAnalysis::AliEMCalHistoContainer:

Public Member Functions

 AliEMCalHistoContainer ()
 
 AliEMCalHistoContainer (const char *name)
 
 ~AliEMCalHistoContainer ()
 
void ReleaseOwner ()
 
void CreateHistoGroup (const char *groupname, const char *parent="/") throw (HistoContainerContentException)
 
void CreateTH1 (const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="") throw (HistoContainerContentException)
 
void CreateTH1 (const char *name, const char *title, int nbins, const double *xbins, Option_t *opt="") throw (HistoContainerContentException)
 
void CreateTH1 (const char *name, const char *title, const TArrayD &xbins, Option_t *opt="") throw (HistoContainerContentException)
 
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)
 
void CreateTH2 (const char *name, const char *title, int nbinsx, const double *xbins, int nbinsy, const double *ybins, Option_t *opt="") throw (HistoContainerContentException)
 
void CreateTH2 (const char *name, const char *title, const TArrayD &xbins, const TArrayD &ybins, Option_t *opt="") throw (HistoContainerContentException)
 
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)
 
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)
 
void CreateTH3 (const char *name, const char *title, const TArrayD &xbins, const TArrayD &ybins, const TArrayD &zbins, Option_t *opt="") throw (HistoContainerContentException)
 
void CreateTHnSparse (const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="") throw (HistoContainerContentException)
 
void CreateTHnSparse (const char *name, const char *title, int ndim, const TAxis **axes, Option_t *opt="") throw (HistoContainerContentException)
 
void SetObject (TObject *const o, const char *group="/") throw (HistoContainerContentException)
 
void FillTH1 (const char *hname, double x, double weight=1.) throw (HistoContainerContentException)
 
void FillTH2 (const char *hname, double x, double y, double weight=1.) throw (HistoContainerContentException)
 
void FillTH2 (const char *hname, double *point, double weight=1.) throw (HistoContainerContentException)
 
void FillTH3 (const char *hname, double x, double y, double z, double weight=1.) throw (HistoContainerContentException)
 
void FillTH3 (const char *hname, const double *point, double weight=1.) throw (HistoContainerContentException)
 
void FillTHnSparse (const char *name, const double *x, double weight=1.) throw (HistoContainerContentException)
 
THashList * GetListOfHistograms ()
 
virtual TObject * FindObject (const char *name) const
 
virtual TObject * FindObject (const TObject *obj) const
 

Private Member Functions

 AliEMCalHistoContainer (const AliEMCalHistoContainer &)
 
AliEMCalHistoContaineroperator= (const AliEMCalHistoContainer &)
 
THashList * FindGroup (const char *dirname) const
 
void TokenizeFilename (const char *name, const char *delim, std::vector< std::string > &listoftokens) const
 
const char * basename (const char *path) const
 
const char * histname (const char *path) const
 

Private Attributes

THashList * fHistos
 List of histograms. More...
 
bool fIsOwner
 Set the ownership. More...
 

Detailed Description

Container class for histograms for the high- \( p_{t} \) charged particle analysis.

Container class for histogram objects. Currenly can handle TH1 TH2 TH3 THnSparse Histograms can be stored in groups. For this the parent group is included inside the histogram name, i.e. /base/inheriting/histogram. In case just the histogram name is given, it is assumed that the histogram is stored at the top level.

Definition at line 156 of file AliEMCalHistoContainer.h.

Constructor & Destructor Documentation

EMCalTriggerPtAnalysis::AliEMCalHistoContainer::AliEMCalHistoContainer ( )

Default constructor, only initialising pointers with 0

Definition at line 40 of file AliEMCalHistoContainer.cxx.

EMCalTriggerPtAnalysis::AliEMCalHistoContainer::AliEMCalHistoContainer ( const char *  name)

Main constructor, creating also a list for the histograms

Parameters
nameName of the object (list named accordingly)

Definition at line 52 of file AliEMCalHistoContainer.cxx.

EMCalTriggerPtAnalysis::AliEMCalHistoContainer::~AliEMCalHistoContainer ( )

Destructor, deletes the list of histograms if it is the owner

Definition at line 65 of file AliEMCalHistoContainer.cxx.

EMCalTriggerPtAnalysis::AliEMCalHistoContainer::AliEMCalHistoContainer ( const AliEMCalHistoContainer )
private

Member Function Documentation

const char * EMCalTriggerPtAnalysis::AliEMCalHistoContainer::basename ( const char *  path) const
private

Helper function extracting the basename from a given histogram path.

Parameters
pathhistogram path
Returns
basename extracted

Definition at line 602 of file AliEMCalHistoContainer.cxx.

Referenced by FindObject().

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateHistoGroup ( const char *  groupname,
const char *  parent = "/" 
)
throw (HistoContainerContentException
)

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 /).

Parameters
groupnameName of the new group
parent( "/") Name of the parent group
Exceptions
HistoContainerContentException

Definition at line 77 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH1 ( const char *  name,
const char *  title,
int  nbins,
double  xmin,
double  xmax,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH1 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
nbinsnumber of bins
xminmin. value of the range
xmaxmax. value of the range
Exceptions
HistoContainerContentException

Definition at line 96 of file AliEMCalHistoContainer.cxx.

Referenced by EMCalTriggerPtAnalysis::AliEMCalTriggerEventCounterAnalysisComponent::CreateHistos().

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH1 ( const char *  name,
const char *  title,
int  nbins,
const double *  xbins,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH1 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
nbinsnumber of bins
xbinsarray of bin limits
Exceptions
HistoContainerContentException

Definition at line 121 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH1 ( const char *  name,
const char *  title,
const TArrayD &  xbins,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH1 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
xbinsarray of bin limits (contains also number of bins)
Exceptions
HistoContainerContentException

Definition at line 145 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH2 ( const char *  name,
const char *  title,
int  nbinsx,
double  xmin,
double  xmax,
int  nbinsy,
double  ymin,
double  ymax,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH2 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
nbinsxnumber of bins in x-direction
xminmin. value of the range in x-direction
xmaxmax. value of the range in x-direction
nbinsynumber of bins in y-direction
yminmin. value of the range in y-direction
ymaxmax. value of the range in y-direction
Exceptions
HistoContainerContentException

Definition at line 174 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH2 ( const char *  name,
const char *  title,
int  nbinsx,
const double *  xbins,
int  nbinsy,
const double *  ybins,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH2 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
nbinsxnumber of bins in x-direction
xbinsarray of bin limits in x-direction
nbinsynumber of bins in y-direction
ybinsarray of bin limits in y-direction
Exceptions
HistoContainerContentException

Definition at line 202 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH2 ( const char *  name,
const char *  title,
const TArrayD &  xbins,
const TArrayD &  ybins,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH2 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
xbinsarray of bin limits in x-direction (contains also the number of bins)
ybinsarray of bin limits in y-direction (contains also the number of bins)
Exceptions
HistoContainerContentException

Definition at line 228 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::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
)

Create a new TH3 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nbinsxnumber of bins in x-direction
xminmin. value of the range in x-direction
xmaxmax. value of the range in x-direction
nbinsynumber of bins in y-direction
yminmin. value of the range in y-direction
ymaxmax. value of the range in y-direction
nbinsznumber of bins in z-direction
zminmin. value of the range in z-direction
zmaxmax. value of the range in z-direction
Exceptions
HistoContainerContentException

Definition at line 258 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::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
)

Create a new TH3 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
nbinsxnumber of bins in x-direction
xbinsarray of bin limits in x-direction
nbinsynumber of bins in y-direction
ybinsarray of bin limits in y-direction
nbinsznumber of bins in z-direction
zbinsarray of bin limits in z-direction
Exceptions
HistoContainerContentException

Definition at line 288 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTH3 ( const char *  name,
const char *  title,
const TArrayD &  xbins,
const TArrayD &  ybins,
const TArrayD &  zbins,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new TH3 within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
xbinsarray of bin limits in x-direction (contains also the number of bins)
ybinsarray of bin limits in y-direction (contains also the number of bins)
zbinsarray of bin limits in z-direction (contains also the number of bins)
Exceptions
HistoContainerContentException

Definition at line 315 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTHnSparse ( const char *  name,
const char *  title,
int  ndim,
const int *  nbins,
const double *  min,
const double *  max,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new THnSparse within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
ndimNumber of dimensions
nbinsNumber of bins per dimension
minmin. value of the range for each dimension
maxmax. value of the range for each dimension
Exceptions
HistoContainerContentException

Definition at line 343 of file AliEMCalHistoContainer.cxx.

Referenced by EMCalTriggerPtAnalysis::AliEMCalTriggerEventCounterAnalysisComponent::CreateHistos(), EMCalTriggerPtAnalysis::AliEMCalTriggerPatchAnalysisComponent::CreateHistos(), EMCalTriggerPtAnalysis::AliEMCalTriggerClusterAnalysisComponent::CreateHistos(), EMCalTriggerPtAnalysis::AliEMCalTriggerMCJetAnalysisComponent::CreateHistos(), EMCalTriggerPtAnalysis::AliEMCalTriggerRecTrackAnalysisComponent::CreateHistos(), and EMCalTriggerPtAnalysis::AliEMCalTriggerRecJetAnalysisComponent::CreateHistos().

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::CreateTHnSparse ( const char *  name,
const char *  title,
int  ndim,
const TAxis **  axes,
Option_t *  opt = "" 
)
throw (HistoContainerContentException
)

Create a new THnSparse within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
titleTitle of the histogram
ndimNumber of dimensions
axesArray of pointers to TAxis for containing the axis definition for each dimension
Exceptions
HistoContainerContentException

Definition at line 369 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FillTH1 ( const char *  name,
double  x,
double  weight = 1. 
)
throw (HistoContainerContentException
)

Fill a 1D histogram within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
xx-coordinate
weightoptional weight of the entry (default 1)
Exceptions
HistoContainerContentException

Definition at line 419 of file AliEMCalHistoContainer.cxx.

Referenced by EMCalTriggerPtAnalysis::AliEMCalTriggerEventCounterAnalysisComponent::Process().

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FillTH2 ( const char *  name,
double  x,
double  y,
double  weight = 1. 
)
throw (HistoContainerContentException
)

Fill a 2D histogram within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
xx-coordinate
yy-coordinate
weightoptional weight of the entry (default 1)
Exceptions
HistoContainerContentException

Definition at line 440 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FillTH2 ( const char *  name,
double *  point,
double  weight = 1. 
)
throw (HistoContainerContentException
)

Fill a 2D histogram within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
pointcoordinates of the data
weightoptional weight of the entry (default 1)
Exceptions
HistoContainerContentException

Definition at line 460 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FillTH3 ( const char *  name,
double  x,
double  y,
double  z,
double  weight = 1. 
)
throw (HistoContainerContentException
)

Fill a 3D histogram within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
xx-coordinate
yy-coordinate
zz-coordinate
weightoptional weight of the entry (default 1)
Exceptions
HistoContainerContentException

Definition at line 482 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FillTH3 ( const char *  name,
const double *  point,
double  weight = 1. 
)
throw (HistoContainerContentException
)

Fill a 3D histogram within the container. The histogram name also contains the parent group(s) according to the common group notation.

Parameters
nameName of the histogram
point3D-coordinate (x,y,z) of the point to be filled
weightoptional weight of the entry (default 1)
Exceptions
HistoContainerContentException

Definition at line 501 of file AliEMCalHistoContainer.cxx.

THashList * EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FindGroup ( const char *  dirname) const
private

Find histogram group. Name is using common notation

Parameters
dirnamePath of the group (treat empty path as top node
Returns
TList of objects (NULL if group does not exist)

Definition at line 566 of file AliEMCalHistoContainer.cxx.

Referenced by FindObject().

TObject * EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FindObject ( const char *  name) const
virtual

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

Parameters
nameName of the object to find inside the container
Returns
pointer to the object (NULL if not found)

Definition at line 539 of file AliEMCalHistoContainer.cxx.

TObject * EMCalTriggerPtAnalysis::AliEMCalHistoContainer::FindObject ( const TObject *  obj) const
virtual

Find and object inside the container. The object name is expected to contain the full path of the histogram object, including parent groups

Parameters
objthe object to find
Returns
pointer to the object (NULL if not found)

Definition at line 553 of file AliEMCalHistoContainer.cxx.

THashList* EMCalTriggerPtAnalysis::AliEMCalHistoContainer::GetListOfHistograms ( )
inline

Get the list of histograms

Returns
The list of histograms

Definition at line 188 of file AliEMCalHistoContainer.h.

Referenced by EMCalTriggerPtAnalysis::AliEMCalTriggerTracksAnalysisComponent::GetHistList().

const char * EMCalTriggerPtAnalysis::AliEMCalHistoContainer::histname ( const char *  path) const
private

Helper function extracting the histogram name from a given histogram path.

Parameters
pathhistogram path
Returns
basename extracted

Definition at line 615 of file AliEMCalHistoContainer.cxx.

Referenced by FindObject().

AliEMCalHistoContainer& EMCalTriggerPtAnalysis::AliEMCalHistoContainer::operator= ( const AliEMCalHistoContainer )
private
void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::ReleaseOwner ( )
inline
void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::SetObject ( TObject *const  o,
const char *  group = "/" 
)
throw (HistoContainerContentException
)

Set a new group into the container into the parent group

Parameters
othe object ot be included

Definition at line 399 of file AliEMCalHistoContainer.cxx.

void EMCalTriggerPtAnalysis::AliEMCalHistoContainer::TokenizeFilename ( const char *  name,
const char *  delim,
std::vector< std::string > &  listoftokens 
) const
private

Tokenizes a string. Results are stored inside the vector listoftokens

Parameters
namestring to be tokenised
delimdelimiter string
listoftokenslist of tokens (C++ strings)

Definition at line 585 of file AliEMCalHistoContainer.cxx.

Referenced by FindGroup().

Member Data Documentation

THashList* EMCalTriggerPtAnalysis::AliEMCalHistoContainer::fHistos
private

List of histograms.

Definition at line 200 of file AliEMCalHistoContainer.h.

Referenced by AliEMCalHistoContainer(), FindGroup(), GetListOfHistograms(), and ~AliEMCalHistoContainer().

bool EMCalTriggerPtAnalysis::AliEMCalHistoContainer::fIsOwner
private

Set the ownership.

Definition at line 201 of file AliEMCalHistoContainer.h.

Referenced by ReleaseOwner(), and ~AliEMCalHistoContainer().


The documentation for this class was generated from the following files: