91 if (&other==
this)
return *this ;
94 if (
index == std::numeric_limits<value_type>::min()) {
95 coutE(ObjectHandling) <<
"Trying to assign the label '" << other.
getCurrentLabel() <<
"' to category'"
96 <<
GetName() <<
"', but such a label is not defined." << std::endl;
153 const auto it = std::next(theStateNames.begin(), ordinal);
166 if (ibin<0 || ibin>=
numBins(rangeName)) {
167 coutE(InputArguments) <<
"RooAbsCategoryLValue::setBin(" <<
GetName() <<
") ERROR: bin index " << ibin
168 <<
" is out of range (0," <<
numBins(rangeName)-1 <<
")" << std::endl;
173 coutF(InputArguments) <<
"RooAbsCategoryLValue::setBin(" <<
GetName() <<
") ERROR: ranges not implemented"
174 " for setting bins in categories." << std::endl;
175 throw std::logic_error(
"Ranges not implemented for setting bins in categories.");
180 assert(val != std::numeric_limits<value_type>::min());
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
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 inRange(const char *) const
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
void randomize(const char *rangeName=nullptr) override
Randomize current value.
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 valueOnly=false, bool setValDirty=true) override
Copy the cached value from given source and raise dirty flag.
Int_t numBins(const char *rangeName=nullptr) const override
Return the number of fit bins ( = number of types )
bool setOrdinal(unsigned int index)
Set our state to our nth defined type.
RooAbsArg & operator=(int index)
Assignment operator from integer index number.
void setBin(Int_t ibin, const char *rangeName=nullptr) override
Set category to i-th fit bin, which is the i-th registered state.
const RooAbsBinning * getBinningPtr(const char *) const override
virtual bool setLabel(const char *label, bool printError=true)=0
Change category state by specifying a state name.
A space to attach TBranches.
virtual const char * getCurrentLabel() const
Return label string of current state.
void copyCache(const RooAbsArg *source, bool valueOnly=false, bool setValueDirty=true) override
Copy the cached value from given source and raise dirty flag.
value_type _currentIndex
Current category state.
Int_t numTypes(const char *=nullptr) const
Return number of types defined (in range named rangeName if rangeName!=nullptr)
const std::map< std::string, value_type >::value_type & getOrdinal(unsigned int n) const
Return name and index of the nth defined state.
std::vector< std::string > _insertionOrder
Keeps track in which order state numbers have been inserted. Make sure this is updated in recomputeSh...
bool isValid() const override
WVE (08/21/01) Probably obsolete now.
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].
const char * GetName() const override
Returns name of object.