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 const char * GetName() const
Returns name of object.
virtual ~RooThresholdCategory()
Destructor.
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'.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
const RooCatType & cat() const
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.
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 TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
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.
virtual const Text_t * GetName() const
Returns name of object.
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.
Class RooThreshEntry is a utility class for RooThresholdCategory.
virtual const char * getLabel() const
Return label string of current state.
virtual RooCatType evaluate() const
do not persist
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.
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...
void Add(TObject *obj)
Add object in sorted list.
const RooAbsReal & arg() const