41 const char* binningName,
const char* catTypeName) :
42 RooAbsCategory(
name, title), _inputVar(
"inputVar",
"Input category",this,inputVar), _bname(binningName)
53 RooAbsCategory(other,
name), _inputVar(
"inputVar",this,other._inputVar), _bname(other._bname)
63 for (
Int_t i=0 ; i<nbins ; i++) {
64 std::string
name = catTypeName!=
nullptr ?
Form(
"%s%d",catTypeName,i)
106 os <<
indent <<
"--- RooBinningCategory ---" << std::endl
107 <<
indent <<
" Maps from " ;
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
A space to attach TBranches.
virtual const std::map< std::string, RooAbsCategory::value_type >::value_type & defineState(const std::string &label)
Define a new state with given label.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Print info about this object to the specified stream.
bool hasIndex(value_type index) const
Check if a state with index index exists.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Provides a real-to-category mapping defined by a series of thresholds.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Printing interface (human readable)
value_type evaluate() const override
Calculate and return the value of the mapping function.
TString _bname
Name of the binning specification to be used to perform the mapping.
RooTemplateProxy< RooAbsRealLValue > _inputVar
Input variable that is mapped.
void initialize(const char *catTypeName=nullptr)
Iterator over all bins in input variable and define corresponding state labels.
RooBinningCategory()=default
const char * GetName() const override
Returns name of object.
const char * Data() const