Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

SFMatrixOfHProf Class Reference

#include <SFMatrixOfHProf.h>

Inheritance diagram for SFMatrixOfHProf:

Inheritance graph
[legend]
Collaboration diagram for SFMatrixOfHProf:

Collaboration graph
[legend]
List of all members.

Detailed Description

A self-filling, 2-dimensional collection of profile histograms that have the same axis.

A SFMatrixOfHProf contains a set of 1-dimensional THProfile histograms; these histograms are (normally) all created by the constructor. The histograms share the same axis binning, and their names and titles are created using two BinningFun objects that at the same time define the number of histograms.

The histogram names will a concatenation of the name given by the user, and the bin names given by the BinningFun objects. The same applies to the title.

A SFMatrixOfHProf is a convenient tool to create a large set of histograms at the same time.

Functions exist to add, multiply, and divide sets of histograms. These operations are performed on pairs of corresponding histograms, if possible.

A SFMatrixOfHProf is a self-filling set of histograms, NOT a set of self-filling histograms (which is a SFROList). This means that instead of calling a Fill() of each histogram, the SFMatrixOfHProf object uses the BinningFun objects to determine which of the histograms gets an entry, and then makes the entry in just that histogram.

Author: Jenny Böhme, Benno List

Date
2005/06/14 11:59:05
Author
blist

Changelog:

Definition at line 60 of file SFMatrixOfHProf.h.

Public Member Functions

 SFMatrixOfHProf (const char *name_, const char *title_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for an empty set of histograms.

 SFMatrixOfHProf (const char *name_, const char *title_, Int_t nbinsx, Axis_t xlow, Axis_t xup, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms with equidistant axis binning.

 SFMatrixOfHProf (const char *name_, const char *title_, Int_t nbinsx, Axis_t xlow, Axis_t xup, Axis_t ylow_, Axis_t yup_, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms with equidistant axis binning.

 SFMatrixOfHProf (const char *name_, const char *title_, Int_t nbinsx, const Double_t *xbins, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

 SFMatrixOfHProf (const char *name_, const char *title_, Int_t nbinsx, const Double_t *xbins, Axis_t ylow_, Axis_t yup_, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

 SFMatrixOfHProf (const char *name_, const char *title_, Int_t nbinsx, const Float_t *xbins, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms with non-equidistant axis binning, taking floats.

 SFMatrixOfHProf (const char *name_, const char *title_, Int_t nbinsx, const Float_t *xbins, Axis_t ylow_, Axis_t yup_, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms with non-equidistant axis binning, taking floats.

 SFMatrixOfHProf (const char *name_, const char *title_, const Binning &axisbinning_, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms taking a Binning object.

 SFMatrixOfHProf (const char *name_, const char *title_, const Binning &axisbinning_, Axis_t ylow_, Axis_t yup_, Option_t *option_, const ROListPoR &rol, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, const FillIteratorPoR &iter_=0)
 Constructor for a set of histograms taking a Binning object.

virtual ~SFMatrixOfHProf ()
 Virtual destructor.

virtual void Fill ()
 The Self-filler method.

FloatFungetXFun () const
 Returns a pointer to the abscissa function object.

FloatFungetYFun () const
 Returns a pointer to the ordinate function object.

BaseCutgetCut () const
 Returns a pointer to the cut function object.

FloatFungetWFun () const
 Returns a pointer to the weight function object.

FillIteratorgetIter () const
 Returns a pointer to the iterator object.


Private Member Functions

void checkIterators (const char *name)
 Checks consistency of iterators.

template<class Fun1, class Fun2> void checkTwoIterators (const char *name, const char *fun1name, Fun1 *fun1, const char *fun2name, Fun2 *fun2)
 Checks consistency of iterators of two function objects.

template<class Fun> void checkOneIterator (const char *name, const char *funname, Fun *fun)
 Checks consistency of iterator of function object with FillIterator.

 SFMatrixOfHProf (const SFMatrixOfHProf &source)
 Private copy constructor, left unimplemented: No copying!

SFMatrixOfHProfoperator= (const SFMatrixOfHProf &source)
 Private assignment, left unimplemented: No assignment!


Private Attributes

FloatFunxfun
 Function object defining abscissa (what to plot on x).

FloatFunyfun
 Function object defining ordinate (what to plot on y).

BaseCutcut
 optional Function object defining a cut (0 means: no cut)

FloatFunwfun
 optional Function object defining weight (0 means: weight 1)

FillIteratoriter
 optional Iterator object for more than 1 entry per Fill() call


Constructor & Destructor Documentation

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for an empty set of histograms.

Parameters:
name_  Common histogram name
title_  Common histogram title
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 40 of file SFMatrixOfHProf.C.

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
Int_t  nbinsx,
Axis_t  xlow,
Axis_t  xup,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms with equidistant axis binning.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TProfile)
xlow  Lower edge (as for TProfile)
xup  Upper edge (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 55 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
Int_t  nbinsx,
Axis_t  xlow,
Axis_t  xup,
Axis_t  ylow_,
Axis_t  yup_,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms with equidistant axis binning.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TProfile)
xlow  Lower edge (as for TProfile)
xup  Upper edge (as for TProfile)
ylow_  Minimum y value (as for TProfile)
yup_  Maximum y value (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 75 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Double_t *  xbins,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TProfile)
xbins  Bin edges (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 97 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Double_t *  xbins,
Axis_t  ylow_,
Axis_t  yup_,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TProfile)
xbins  Bin edges (as for TProfile)
ylow_  Minimum y value (as for TProfile)
yup_  Maximum y value (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 116 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Float_t *  xbins,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms with non-equidistant axis binning, taking floats.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TProfile)
xbins  Bin edges (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 137 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Float_t *  xbins,
Axis_t  ylow_,
Axis_t  yup_,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms with non-equidistant axis binning, taking floats.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TProfile)
xbins  Bin edges (as for TProfile)
ylow_  Minimum y value (as for TProfile)
yup_  Maximum y value (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 156 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
const Binning &  axisbinning_,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms taking a Binning object.

Parameters:
name_  Common histogram name
title_  Common histogram title
axisbinning_  Defines the histogram binning
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 177 of file SFMatrixOfHProf.C.

References checkIterators().

SFMatrixOfHProf::SFMatrixOfHProf const char *  name_,
const char *  title_,
const Binning &  axisbinning_,
Axis_t  ylow_,
Axis_t  yup_,
Option_t *  option_,
const ROListPoR rol,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_,
const FloatFunPoR wfun_,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
const FillIteratorPoR iter_ = 0
 

Constructor for a set of histograms taking a Binning object.

Parameters:
name_  Common histogram name
title_  Common histogram title
axisbinning_  Defines the histogram binning
ylow_  Minimum y value (as for TProfile)
yup_  Maximum y value (as for TProfile)
option_  Option string (as for TProfile)
rol  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot on x)
yfun_  Function object defining ordinate (what to plot on y)
cut_  optional Function object defining a cut (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 195 of file SFMatrixOfHProf.C.

References checkIterators().


Member Function Documentation

void SFMatrixOfHProf::Fill  )  [virtual]
 

The Self-filler method.

Fill() evaluates the cut object to see whether an event fulfills the cut defined by the cut object, then evaluates the BinningFun object to see into which histogram to make an entry, then evaluates the xfun object to get the abscissa and the wfun object to obtain the weight. Optionally, the iter object serves as iterator.

Implements SFO.

Definition at line 220 of file SFMatrixOfHProf.C.

References cut, SetOfH::getBinning(), MatrixOfH::getBinNumber(), ROList::getEntries(), ROList::getEntry(), ROList::IndexType, BinningFun::isExclusive(), iter, FillIterator::next(), FillIterator::reset(), wfun, xfun, and yfun.

void SFMatrixOfHProf::checkIterators const char *  name  )  [private]
 

Checks consistency of iterators.

Parameters:
name  The histogram name

Definition at line 372 of file SFMatrixOfHProf.C.

References checkOneIterator(), checkTwoIterators(), cut, SetOfH::getBinning(), wfun, xfun, and yfun.

Referenced by SFMatrixOfHProf().

template<class Fun1, class Fun2>
void SFMatrixOfHProf::checkTwoIterators const char *  name,
const char *  fun1name,
Fun1 *  fun1,
const char *  fun2name,
Fun2 *  fun2
[private]
 

Checks consistency of iterators of two function objects.

Parameters:
name  The histogram name
fun1name  Name of function object 1
fun1  Function object 1
fun2name  Name of function object 2
fun2  Function object 2

Definition at line 328 of file SFMatrixOfHProf.C.

Referenced by checkIterators().

template<class Fun>
void SFMatrixOfHProf::checkOneIterator const char *  name,
const char *  funname,
Fun *  fun
[private]
 

Checks consistency of iterator of function object with FillIterator.

Parameters:
name  The histogram name
funname  Name of function object
fun  Function object

Definition at line 342 of file SFMatrixOfHProf.C.

References NamedO::getName(), and iter.

Referenced by checkIterators().


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 12:55:16 2006 for SFH by doxygen 1.3.2