16#ifndef ROO_MAPPED_CATEGORY
17#define ROO_MAPPED_CATEGORY
39 bool map(
const char* inKeyRegExp,
const char* outKeyName,
Int_t outKeyNum=
NoCatIdx) ;
46 bool readFromStream(std::istream& is,
bool compact,
bool verbose=
false)
override ;
47 void writeToStream(std::ostream& os,
bool compact)
const override ;
57 bool match(
const char* testPattern)
const;
77 std::map<std::string,RooMappedCategory::Entry>
_mapArray ;
78 mutable std::unique_ptr<RooMappedCategoryCache>
_mapcache;
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
static void indent(ostringstream &buf, int indent_level)
A space to attach TBranches.
RooAbsCategory::value_type outCat() const
Entry & operator=(const Entry &other)
const TRegexp * regexp() const
TString mangle(const char *exp) const
Mangle name : escape regexp character '+'.
RooAbsCategory::value_type _catIdx
bool match(const char *testPattern) const
RooMappedCategory provides a category-to-category mapping defined by pattern matching on their state ...
value_type _defCat
Default (unmapped) output type.
void writeToStream(std::ostream &os, bool compact) const override
Write object contents to ostream.
const RooMappedCategoryCache * getOrCreateCache() const
RooCategoryProxy _inputCat
Input category.
void printMetaArgs(std::ostream &os) const override
Customized printing of arguments of a RooMappedCategory to more intuitively reflect the contents of t...
std::map< std::string, RooMappedCategory::Entry > _mapArray
List of mapping rules.
void recomputeShape() override
When the input category changes states, the cached state mappings are invalidated.
TObject * clone(const char *newname) const override
void setDefCat(value_type defCat)
std::unique_ptr< RooMappedCategoryCache > _mapcache
! transient member: cache the mapping
static constexpr value_type NoCatIdx
bool map(const char *inKeyRegExp, const char *outKeyName, Int_t outKeyNum=NoCatIdx)
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print info about this object to the specified stream.
~RooMappedCategory() override
value_type evaluate() const override
Evaluate the category state and return.
bool readFromStream(std::istream &is, bool compact, bool verbose=false) override
Read object contents from stream (dummy for now)
Mother of all ROOT objects.
Regular expression class.