43using std::endl, std::ostream;
59 _multiCat(
"MultiCatProxy",
"Stores a RooMultiCategory", this,
60 *new
RooMultiCategory((std::string(
name) +
"_internalMultiCat").c_str(), title, inputCategories), true, true, true)
63 for (
const auto arg : inputCategories) {
65 coutE(InputArguments) <<
"RooSuperCategory::RooSuperCategory(" <<
GetName() <<
"): input category " << arg->
GetName()
66 <<
" is not an lvalue. Use RooMultiCategory instead." << endl ;
67 throw std::invalid_argument(
"Arguments of RooSuperCategory must be lvalues.");
80 _multiCat(
"MultiCatProxy", this, other._multiCat)
94 coutE(InputArguments) <<
"RooSuperCategory can only have positive index states. Got " <<
index << std::endl;
103 coutE(InputArguments) << __func__ <<
": Found a category with zero states. Cannot set state for '"
104 << cat->
GetName() <<
"'." << std::endl;
109 error |= cat->setOrdinal(thisIndex);
136 os <<
indent <<
"--- RooSuperCategory ---" <<
'\n';
137 os <<
indent <<
" Internal RooMultiCategory:" <<
'\n';
151 if (!cat->inRange(rangeName)) {
166 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.