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

SFHProf Class Reference

#include <SFHProf.h>

Inheritance diagram for SFHProf:

Inheritance graph
[legend]
Collaboration diagram for SFHProf:

Collaboration graph
[legend]
List of all members.

Detailed Description

A self-filling 1-dimensional TProfile histogram.

A self-filling SFHProf object is a TProfile that registers itself in a ROList histogram list when it is created. It has a Fill() method that fills one or several entries into the histogram. It uses FloatFun and BaseCut objects to know what to fill, and possibly FillIterator objects in the case that several entries are to be made in one Fill() call.

Author: Jenny Böhme, Benno List

Changelog:

Definition at line 47 of file SFHProf.h.

Public Member Functions

 SFHProf (const char *name, const char *title, Int_t nbinsx, Axis_t xlow, Axis_t xup, Option_t *option, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with equidistant binning.

 SFHProf (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 &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with equidistant binning and limited y range.

 SFHProf (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Option_t *option, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with non-equidistant binning, taking float bin edges.

 SFHProf (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Option_t *option, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with non-equidistant binning, taking double bin edges.

 SFHProf (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Axis_t ylow, Axis_t yup, Option_t *option, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with non-equidistant binning and limited y range.

 SFHProf (const char *name, const char *title, const Binning &binning, Option_t *option, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with Binning object.

 SFHProf (const char *name, const char *title, const Binning &binning, Axis_t ylow, Axis_t yup, Option_t *option, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0)
 Constructor with Binning object and limited y range.

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.


Protected 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)
 Function object.


Protected 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


Private Member Functions

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

SFHProfoperator= (const SFHProf &source)
 Private assignment operator, left unimplemented: No assignment!


Constructor & Destructor Documentation

SFHProf::SFHProf const char *  name,
const char *  title,
Int_t  nbinsx,
Axis_t  xlow,
Axis_t  xup,
Option_t *  option,
const ROListPoR hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with equidistant binning.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
nbinsx  Number of x bins (as for TProfile)
xlow  Lower x edge (as for TProfile)
xup  Upper x edge (as for TProfile)
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 36 of file SFHProf.C.

References checkIterators().

SFHProf::SFHProf 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 hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with equidistant binning and limited y range.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
nbinsx  Number of x bins (as for TProfile)
xlow  Lower x edge (as for TProfile)
xup  Upper x edge (as for TProfile)
ylow  Minimum y value (as for TProfile)
yup  Maximum y value (as for TProfile)
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 56 of file SFHProf.C.

References checkIterators().

SFHProf::SFHProf const char *  name,
const char *  title,
Int_t  nbinsx,
const Float_t *  xbins,
Option_t *  option,
const ROListPoR hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with non-equidistant binning, taking float bin edges.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
nbinsx  Number of x bins (as for TProfile)
xbins  Bin edges in x (as for TProfile)
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 77 of file SFHProf.C.

References checkIterators().

SFHProf::SFHProf const char *  name,
const char *  title,
Int_t  nbinsx,
const Double_t *  xbins,
Option_t *  option,
const ROListPoR hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with non-equidistant binning, taking double bin edges.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
nbinsx  Number of x bins (as for TProfile)
xbins  Bin edges in x (as for TProfile)
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 96 of file SFHProf.C.

References checkIterators().

SFHProf::SFHProf const char *  name,
const char *  title,
Int_t  nbinsx,
const Double_t *  xbins,
Axis_t  ylow,
Axis_t  yup,
Option_t *  option,
const ROListPoR hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with non-equidistant binning and limited y range.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
nbinsx  Number of x bins (as for TProfile)
xbins  Bin edges in x (as for TProfile)
ylow  Minimum y value (as for TProfile)
yup  Maximum y value (as for TProfile)
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 115 of file SFHProf.C.

References checkIterators().

SFHProf::SFHProf const char *  name,
const char *  title,
const Binning &  binning,
Option_t *  option,
const ROListPoR hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with Binning object.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
binning  Defines the histogram binning
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 135 of file SFHProf.C.

References checkIterators().

SFHProf::SFHProf const char *  name,
const char *  title,
const Binning &  binning,
Axis_t  ylow,
Axis_t  yup,
Option_t *  option,
const ROListPoR hhl,
const FloatFunPoR xfun_,
const FloatFunPoR yfun_,
const BaseCutPoR cut_ = 0,
const FloatFunPoR wfun_ = 0,
const FillIteratorPoR iter_ = 0
 

Constructor with Binning object and limited y range.

Parameters:
name  Histogran short name (as for TProfile)
title  Histogram title (as for TProfile)
binning  Defines the histogram binning
ylow  Minimum y value (as for TProfile)
yup  Maximum y value (as for TProfile)
option  Option string (as for TProfile)
hhl  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)
iter_  optional Iterator object for more than 1 entry per Fill() call

Definition at line 155 of file SFHProf.C.

References checkIterators().


Member Function Documentation

void SFHProf::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 xfun object to get the abscissa, yfun to obtain the ordinate, and the wfun object to obtain the weight.

Optionally, the iter object serves as iterator.

Implements SFO.

Definition at line 179 of file SFHProf.C.

References cut, iter, FillIterator::next(), FillIterator::reset(), wfun, xfun, and yfun.

void SFHProf::checkIterators const char *  name  )  [protected]
 

Checks consistency of iterators.

Parameters:
name  The histogram name

Definition at line 236 of file SFHProf.C.

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

Referenced by SFHProf().

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

Checks consistency of iterators of two function objects.

Function object 2

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

Definition at line 192 of file SFHProf.C.

Referenced by checkIterators().

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

Function object.

Parameters:
name  The histogram name
funname  Name of function object

Definition at line 206 of file SFHProf.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:13 2006 for SFH by doxygen 1.3.2