46 const char* binningName,
const char* catTypeName) :
47 RooAbsCategory(
name, title), _inputVar(
"inputVar",
"Input category",this,inputVar), _bname(binningName)
59 RooAbsCategory(other,
name), _inputVar(
"inputVar",this,other._inputVar), _bname(other._bname)
81 for (
Int_t i=0 ; i<nbins ; i++) {
82 string name = catTypeName!=0 ?
Form(
"%s%d",catTypeName,i)
124 os <<
indent <<
"--- RooBinningCategory ---" << endl
125 <<
indent <<
" Maps from " ;
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual const std::map< std::string, RooAbsCategory::value_type >::value_type & defineState(const std::string &label)
Define a new state with given label.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print info about this object to the specified stream.
bool hasIndex(value_type index) const
Check if a state with index index exists.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
Retrive binning configuration with given name or default binning.
virtual Int_t getBin(const char *rangeName=0) const
Class RooBinningCategory provides a real-to-category mapping defined by a series of thresholds.
virtual ~RooBinningCategory()
Destructor.
RooTemplateProxy< RooAbsRealLValue > _inputVar
virtual value_type evaluate() const
Calculate and return the value of the mapping function.
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print info about this threshold category to the specified stream.
void initialize(const char *catTypeName=0)
Iterator over all bins in input variable and define corresponding state labels.
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
const T & arg() const
Return reference to object held in proxy.
virtual const char * GetName() const
Returns name of object.
const char * Data() const