51 _multiCat(
"MultiCatProxy",
"Stores a RooMultiCategory", this, true, true, true) { }
61 _multiCat(
"MultiCatProxy",
"Stores a RooMultiCategory", this,
62 *new
RooMultiCategory((std::string(
name) +
"_internalMultiCat").c_str(), title, inputCategories), true, true, true)
65 for (
const auto arg : inputCategories) {
68 <<
" is not an lvalue. Use RooMultiCategory instead." << endl ;
69 throw std::invalid_argument(
"Arguments of RooSuperCategory must be lvalues.");
82 _multiCat(
"MultiCatProxy", this, other._multiCat)
106 coutE(
InputArguments) <<
"RooSuperCategory can only have positive index states. Got " << index << std::endl;
113 if (cat->size() == 0) {
115 coutE(
InputArguments) << __func__ <<
": Found a category with zero states. Cannot set state for '"
116 << cat->GetName() <<
"'." << std::endl;
119 const value_type thisIndex = index % cat->size();
120 error |= cat->setOrdinal(thisIndex);
121 index = (index - thisIndex) / cat->size();
147 os <<
indent <<
"--- RooSuperCategory ---" <<
'\n';
148 os <<
indent <<
" Internal RooMultiCategory:" <<
'\n';
162 if (!cat->inRange(rangeName)) {
177 if (cat->hasRange(rangeName))
return true;
static void indent(ostringstream &buf, int indent_level)
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
virtual value_type getCurrentIndex() const
Return index number 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.
value_type lookupIndex(const std::string &stateName) const
Find the index number corresponding to the state name.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooMultiCategory connects several RooAbsCategory objects into a single category.
const RooArgSet & inputCatList() const
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const override
Print the state of this object to the specified output stream.
The RooSuperCategory can join several RooAbsCategoryLValue objects into a single category.
virtual bool setIndex(value_type index, bool printError=true) override
Set the value of the super category to the specified index.
virtual Bool_t hasRange(const char *rangeName) const override
Check that any of the input categories has a range with the given name.
virtual Bool_t inRange(const char *rangeName) const override
Check that all input category states are in the given range.
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const override
Print the state of this object to the specified output stream.
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE) override
Set the value of the super category by specifying the state name.
TIterator * MakeIterator() const
Make an iterator over all state permutations of the input categories of this supercategory.
RooTemplateProxy< RooMultiCategory > _multiCat
Iterator abstract base class.
virtual const char * GetName() const
Returns name of object.