107 if (&other==
this)
return *this ;
110 if (index == std::numeric_limits<value_type>::min()) {
112 <<
GetName() <<
"', but such a label is not defined." << std::endl;
169 const auto it = std::next(theStateNames.begin(), ordinal);
182 if (ibin<0 || ibin>=
numBins(rangeName)) {
184 <<
" is out of range (0," <<
numBins(rangeName)-1 <<
")" << endl ;
190 " for setting bins in categories." << std::endl;
191 throw std::logic_error(
"Ranges not implemented for setting bins in categories.");
196 assert(
type.second != std::numeric_limits<value_type>::min());
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
virtual Bool_t inRange(const char *) const
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
virtual bool setIndex(value_type index, bool printError=true)=0
Change category state by specifying the index code of the desired state.
void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value from given source and raise dirty flag.
virtual void randomize(const char *rangeName=0)
Randomize current value.
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set category to i-th fit bin, which is the i-th registered state.
bool setOrdinal(unsigned int index)
Set our state to our nth defined type.
virtual bool setLabel(const char *label, Bool_t printError=kTRUE)=0
Change category state by specifying a state name.
virtual ~RooAbsCategoryLValue()
Destructor.
RooAbsArg & operator=(int index)
Assignment operator from integer index number.
virtual Int_t numBins(const char *rangeName) const
Return the number of fit bins ( = number of types )
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValueDirty=kTRUE)
Copy the cached value from given source and raise dirty flag.
virtual bool isValid() const
WVE (08/21/01) Probably obsolete now.
virtual const char * getCurrentLabel() const
Return label string of current state.
const std::map< std::string, value_type >::value_type & getOrdinal(unsigned int n) const
Return name and index of the nth defined state.
Int_t numTypes(const char *=0) const
Return number of types defined (in range named rangeName if rangeName!=0)
std::vector< std::string > _insertionOrder
Map state names to index numbers. Make sure state names are updated in recomputeShape().
const std::map< std::string, value_type > & stateNames() const
Access the map of state names to index numbers.
value_type lookupIndex(const std::string &stateName) const
Find the index number corresponding to the state name.
Abstract base class for objects that are lvalues, i.e.
static UInt_t integer(UInt_t max, TRandom *generator=randomGenerator())
Return an integer uniformly distributed from [0,n-1].
virtual const char * GetName() const
Returns name of object.
static constexpr double second