43using std::endl, std::ostream;
57 _multiCat(
"MultiCatProxy",
"Stores a RooMultiCategory", this,
58 std::make_unique<
RooMultiCategory>((std::string(
name) +
"_internalMultiCat").c_str(), title, inputCategories), true, true)
61 for (
const auto arg : inputCategories) {
63 coutE(InputArguments) <<
"RooSuperCategory::RooSuperCategory(" <<
GetName() <<
"): input category " << arg->
GetName()
64 <<
" is not an lvalue. Use RooMultiCategory instead." << endl ;
65 throw std::invalid_argument(
"Arguments of RooSuperCategory must be lvalues.");
78 _multiCat(
"MultiCatProxy", this, other._multiCat)
92 coutE(InputArguments) <<
"RooSuperCategory can only have positive index states. Got " <<
index << std::endl;
101 coutE(InputArguments) << __func__ <<
": Found a category with zero states. Cannot set state for '"
102 << cat->
GetName() <<
"'." << std::endl;
107 error |= cat->setOrdinal(thisIndex);
134 os <<
indent <<
"--- RooSuperCategory ---" <<
'\n';
135 os <<
indent <<
" Internal RooMultiCategory:" <<
'\n';
149 if (!cat->inRange(rangeName)) {
164 if (cat->hasRange(rangeName))
return true;
static void indent(ostringstream &buf, int indent_level)
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
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
Abstract base class for objects that represent a discrete value that can be set from the outside,...
virtual value_type getCurrentIndex() const
Return index number of current 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.
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.
Connects several RooAbsCategory objects into a single category.
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.
RooSetProxy _catSet
Set of input category.
const RooArgSet & inputCatList() const
Joins several RooAbsCategoryLValue 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.