43using std::endl, std::ostream;
56 _multiCat(
"MultiCatProxy",
"Stores a RooMultiCategory", this,
60 for (
const auto arg : inputCategories) {
62 coutE(InputArguments) <<
"RooSuperCategory::RooSuperCategory(" <<
GetName() <<
"): input category " << arg->GetName()
63 <<
" is not an lvalue. Use RooMultiCategory instead." << std::endl ;
64 throw std::invalid_argument(
"Arguments of RooSuperCategory must be lvalues.");
91 coutE(InputArguments) <<
"RooSuperCategory can only have positive index states. Got " << index << std::endl;
100 coutE(InputArguments) << __func__ <<
": Found a category with zero states. Cannot set state for '"
101 << cat->GetName() <<
"'." << std::endl;
105 const value_type thisIndex = index % cat->size();
106 error |= cat->setOrdinal(thisIndex);
107 index = (index - thisIndex) / cat->size();
133 os <<
indent <<
"--- RooSuperCategory ---" <<
'\n';
134 os <<
indent <<
" Internal RooMultiCategory:" <<
'\n';
146 for (
const auto c :
_multiCat->inputCatList()) {
148 if (!cat->inRange(rangeName)) {
161 for (
const auto c :
_multiCat->inputCatList()) {
163 if (cat->hasRange(rangeName))
return true;
int Int_t
Signed integer 4 bytes (int).
static void indent(ostringstream &buf, int indent_level)
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
virtual value_type getCurrentIndex() const
Return index number of current state.
int value_type
The type used to denote a specific category state.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Print info about this object to the specified stream.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Connects several RooAbsCategory objects into a single category.
bool setIndex(value_type index, bool printError=true) override
Set the value of the super category to the specified index.
bool hasRange(const char *rangeName) const override
Check that any of the input categories has a range with the given name.
bool inRange(const char *rangeName) const override
Check that all input category states are in the given range.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print the state of this object to the specified output stream.
bool setLabel(const char *label, bool printError=true) override
Set the value of the super category by specifying the state name.
RooTemplateProxy< RooMultiCategory > _multiCat
const char * GetName() const override
Returns name of object.