50 const
char* defOut,
Int_t defIdx) :
51 RooAbsCategory(name, title), _inputVar("inputVar","Input category",this,inputVar)
53 _defCat = (
RooCatType*) defineType(defOut,defIdx) ;
54 _threshIter = _threshList.MakeIterator() ;
63 RooAbsCategory(other,name), _inputVar(
"inputVar",this,other._inputVar)
99 if (te->
thresh() == upperLimit) {
101 <<
") threshold at " << upperLimit <<
" already defined" << endl ;
110 if (catIdx==-99999) {
133 if (_inputVar<te->thresh())
return te->
cat() ;
178 os << indent <<
"--- RooThresholdCategory ---" << endl
179 << indent <<
" Maps from " ;
182 os << indent <<
" Threshold list" << endl ;
186 os << indent <<
" input < " << te->
thresh() <<
" --> " ;
189 os << indent <<
" Default value is " ;
virtual ~RooThresholdCategory()
Destructor.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
ClassImp(RooThresholdCategory) RooThresholdCategory
Constructor with input function to be mapped and name and index of default output state of unmapped v...
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, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
const RooAbsReal & arg() const
void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
Class RooThresholdCategory provides a real-to-category mapping defined by a series of thresholds...
RooCatType is an auxilary class for RooAbsCategory and defines a a single category 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.
virtual RooCatType evaluate() const
do not persist
Bool_t addThreshold(Double_t upperLimit, const char *catName, Int_t catIdx=-99999)
Insert threshold at value upperLimit.
const RooCatType * defineType(const char *label)
Define a new state with given name.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
Class RooThreshEntry is a utility class for RooThresholdCategory.
virtual const char * GetName() const
Returns name of object.
static void indent(ostringstream &buf, int indent_level)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual TObject * Next()=0
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 TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
const RooCatType & cat() const
virtual const Text_t * GetName() const
Returns name of object.
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.
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.