35bool threshListSorter(
const std::pair<double,RooCatType>& lhs,
const std::pair<double,RooCatType>& rhs) {
36 return lhs.first < rhs.first || (lhs.first == rhs.first && lhs.second.getVal() < rhs.second.getVal());
47 const char* defOut,
Int_t defIdx) :
78 if (thresh.first == upperLimit) {
80 <<
") threshold at " << upperLimit <<
" already defined" << endl ;
111 return thresh.second;
133 os << thresh.second.GetName() <<
":<" << thresh.first <<
" " ;
154 os <<
indent <<
"--- RooThresholdCategory ---" << endl
155 <<
indent <<
" Maps from " ;
158 os <<
indent <<
" Threshold list" << endl ;
160 os <<
indent <<
" input < " << thresh.first <<
" --> " ;
163 os <<
indent <<
" Default value is " ;
static void indent(ostringstream &buf, int indent_level)
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
virtual const char * getLabel() const
Return label string of current state.
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.
const RooCatType * defineType(const char *label)
Define a new state with given name.
const RooCatType * lookupType(Int_t index, Bool_t printError=kFALSE) const
Find our type corresponding to the specified index, or return 0 for no match.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
virtual const Text_t * GetName() const
Returns name of object.
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.
Class RooThresholdCategory provides a real-to-category mapping defined by a series of thresholds.
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 writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
const RooCatType * _defCat
Bool_t addThreshold(Double_t upperLimit, const char *catName, Int_t catIdx=-99999)
Insert threshold at value upperLimit.
std::vector< std::pair< double, RooCatType > > _threshList
virtual RooCatType evaluate() const
Calculate and return the value of the mapping function.
virtual const char * GetName() const
Returns name of object.