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

FloatFunBinning Class Reference

#include <FloatFunBinning.h>

Inheritance diagram for FloatFunBinning:

Inheritance graph
[legend]
Collaboration diagram for FloatFunBinning:

Collaboration graph
[legend]
List of all members.

Detailed Description

A class to get a concrete BinningFun subclass from a FloatFun.

The class FloatFunBinning can be used to generate a BinningFun in an easy way from a FloatFun, which delivers the value (e.g., t) that is used for binning, and some strings that are used to construct the name and title strings.

Author: Jenny Böhme, Benno List

Date
2005/08/23 12:05:43
Author
blist

Changelog:

Definition at line 31 of file FloatFunBinning.h.

Public Member Functions

 FloatFunBinning (const FloatFunPoR &fun_, int nbins_, double xlow_, double xhigh_, const char *varname_)
 Create an equidistant binning.

 FloatFunBinning (const FloatFunPoR &fun_, int nbins_, const float binedges_[], const char *varname_)
 Create an nonequidistant binning taking floats.

 FloatFunBinning (const FloatFunPoR &fun_, int nbins_, const double binedges_[], const char *varname_)
 Create an nonequidistant binning taking doubles.

 FloatFunBinning (const FloatFunPoR &fun_, const Binning &binning_, const char *varname_)
 Create a binning from a Binning object.

virtual int operator() () const
 Returns a bin number between -1 and getNBins()-1.

virtual const char * getBinName (int i) const
 Returns a name string.

virtual const char * getBinTitle (int i) const
 Returns a title string.

virtual const FillIteratorgetIterator () const
 Returns pointer to iterator, if any.


Protected Member Functions

virtual ~FloatFunBinning ()
 Protected destructor to ensure creation on the heap.


Protected Attributes

const FloatFunfun
 The FloatFun object defining the quantity used for binning.

char * varname
 The variable name.

int varnamelength
 The length of the variable name.


Private Member Functions

void initvarname (const char *varname_)
 FloatFunBinning (const FloatFunBinning &)
 Private copy constructor, left unimplemented: No copying!

FloatFunBinningoperator= (const FloatFunBinning &)
 Private assignment operator, left unimplemented: No assignment!


Constructor & Destructor Documentation

FloatFunBinning::FloatFunBinning const FloatFunPoR fun_,
int  nbins_,
double  xlow_,
double  xhigh_,
const char *  varname_
 

Create an equidistant binning.

The binning will have nbins_ bins between xlow and xhigh.

Parameters:
fun_  The FloatFun object defining the quantity used for binning
nbins_  The number of bins
xlow_  The lowest bin edge
xhigh_  The highest bin edge
varname_  The variable name

Definition at line 43 of file FloatFunBinning.C.

FloatFunBinning::FloatFunBinning const FloatFunPoR fun_,
int  nbins_,
const float  binedges_[],
const char *  varname_
 

Create an nonequidistant binning taking floats.

The binning will have nbins_ bins with binedges given by binedges_. binedges_[i] and binedges_[i+1] are the lower and upper edges of bin i. It is assumed that the binedge values are monotonically increasing.

Parameters:
fun_  The FloatFun object defining the quantity used for binning
nbins_  The number of bins
binedges_  An array with binedges
varname_  The variable name

Definition at line 57 of file FloatFunBinning.C.

FloatFunBinning::FloatFunBinning const FloatFunPoR fun_,
int  nbins_,
const double  binedges_[],
const char *  varname_
 

Create an nonequidistant binning taking doubles.

The binning will have nbins_ bins with binedges given by binedges_. binedges_[i] and binedges_[i+1] are the lower and upper edges of bin i. It is assumed that the binedge values are monotonically increasing.

Parameters:
fun_  The FloatFun object defining the quantity used for binning
nbins_  The number of bins
binedges_  An array with binedges
varname_  The variable name

Definition at line 71 of file FloatFunBinning.C.

FloatFunBinning::FloatFunBinning const FloatFunPoR fun_,
const Binning &  binning_,
const char *  varname_
 

Create a binning from a Binning object.

Parameters:
fun_  The FloatFun object defining the quantity used for binning
binning_  The binning
varname_  The variable name

Definition at line 85 of file FloatFunBinning.C.


Member Function Documentation

const char * FloatFunBinning::getBinName int  i  )  const [virtual]
 

Returns a name string.

The name string MAY, and MUST, be destroyed by the user! The name will be (in perl notation) "$varname$bin"

Parameters:
i  The bin number

Implements BinningFun.

Definition at line 133 of file FloatFunBinning.C.

const char * FloatFunBinning::getBinTitle int  i  )  const [virtual]
 

Returns a title string.

The name string MAY, and MUST, be destroyed by the user! The title will be (in perl notation) "$lower_edge < $varname < $higher_edge"

Parameters:
i  The bin number

Implements BinningFun.

Definition at line 116 of file FloatFunBinning.C.

References varname, and varnamelength.


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