#include <FloatFunBinning.h>
Inheritance diagram for FloatFunBinning:
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
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 FillIterator * | getIterator () const |
Returns pointer to iterator, if any. | |
Protected Member Functions | |
virtual | ~FloatFunBinning () |
Protected destructor to ensure creation on the heap. | |
Protected Attributes | |
const FloatFun * | fun |
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! | |
FloatFunBinning & | operator= (const FloatFunBinning &) |
Private assignment operator, left unimplemented: No assignment! |
|
Create an equidistant binning. The binning will have nbins_ bins between xlow and xhigh.
Definition at line 43 of file FloatFunBinning.C. |
|
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.
Definition at line 57 of file FloatFunBinning.C. |
|
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.
Definition at line 71 of file FloatFunBinning.C. |
|
Create a binning from a Binning object.
Definition at line 85 of file FloatFunBinning.C. |
|
Returns a name string. The name string MAY, and MUST, be destroyed by the user! The name will be (in perl notation) "$varname$bin"
Implements BinningFun. Definition at line 133 of file FloatFunBinning.C. |
|
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"
Implements BinningFun. Definition at line 116 of file FloatFunBinning.C. References varname, and varnamelength. |