49 template<
class... Args_t>
52 template<
class... Args_t>
53 void defineMutex(
const char* head, Args_t && ... tail);
56 bool defineInt(
const char*
name,
const char* argName,
int intNum,
int defValue=0) ;
57 bool defineDouble(
const char*
name,
const char* argName,
int doubleNum,
double defValue=0.0) ;
58 bool defineString(
const char*
name,
const char* argName,
int stringNum,
const char* defValue=
"",
bool appendMode=
false) ;
59 bool defineObject(
const char*
name,
const char* argName,
int setNum,
const TObject* obj=
nullptr,
bool isArray=
false) ;
63 template<
class... Args_t>
66 template<
typename It_t>
67 bool process(It_t begin, It_t end);
69 int getInt(
const char*
name,
int defaultValue=0)
const;
70 double getDouble(
const char*
name,
double defaultValue=0.0)
const;
71 const char*
getString(
const char*
name,
const char* defaultValue=
"",
bool convEmptyToNull=
false)
const;
76 bool ok(
bool verbose)
const ;
87 template<
class ...Args_t>
89 const char* callerID,
const char* cmdArgName,
int intIdx,
int defVal, Args_t && ...args);
91 template<
class ...Args_t>
93 const char* callerID,
const char* cmdArgName,
int intIdx,
const char* defVal, Args_t && ...args);
95 template<
class ...Args_t>
97 const char* callerID,
const char* cmdArgName,
int objIdx,
TObject* defVal, Args_t && ...args);
99 template<
class ...Args_t>
101 const char* callerID,
const char* cmdArgName,
int objIdx,
RooArgSet* defVal, Args_t && ...args);
103 static double decodeDoubleOnTheFly(
const char* callerID,
const char* cmdArgName,
int idx,
double defVal,
104 std::initializer_list<std::reference_wrapper<const RooCmdArg>> args);
142template<
class... Args_t>
144 for(
auto const& arg : {first, args...}) {
152template<
class... Args_t>
154 for(
auto const& item : {tail...}) {
164template<
class... Args_t>
174template<
typename It_t>
177 for (
auto it = begin; it != end; ++it) {
188template<
class ...Args_t>
190 const char* callerID,
const char* cmdArgName,
int intIdx,
int defVal, Args_t && ...args)
194 pc.
defineInt(
"theInt",cmdArgName,intIdx,defVal) ;
195 pc.
process(std::forward<Args_t>(args)...);
196 return pc.
getInt(
"theInt") ;
204template<
class ...Args_t>
206 const char* callerID,
const char* cmdArgName,
int strIdx,
const char* defVal, Args_t && ...args)
211 pc.
process(std::forward<Args_t>(args)...);
212 const char* ret = pc.
getString(
"theString",
nullptr,
true) ;
214 return ret ? ret :
"";
222template<
class ...Args_t>
224 const char* callerID,
const char* cmdArgName,
int objIdx,
TObject* defVal, Args_t && ...args)
229 pc.
process(std::forward<Args_t>(args)...);
234template<
class ...Args_t>
236 const char* callerID,
const char* cmdArgName,
int objIdx,
RooArgSet* defVal, Args_t && ...args)
240 pc.
defineSet(
"theObj",cmdArgName,objIdx,defVal) ;
241 pc.
process(std::forward<Args_t>(args)...);
242 return pc.
getSet(
"theObj") ;
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Named container for two doubles, two integers two object points and three string pointers that can be...
Configurable parser for RooCmdArg named arguments.
std::vector< Var< RooArgSet * > > _cList
RooArgSet list.
void defineMutex(const char *)
void defineMutex(const char *head, Args_t &&... tail)
Define arguments where any pair is mutually exclusive.
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
TList _pList
Processed cmd list.
bool hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
std::vector< Var< RooLinkedList > > _oList
Object list.
std::vector< Var< int > > _iList
Integer list.
std::vector< Var< double > > _dList
Double list.
double getDouble(const char *name, double defaultValue=0.0) const
Return double property registered with name 'name'.
void print() const
Print configuration of parser.
void defineDependency(const char *refArgName, const char *neededArgName)
Define that processing argument name refArgName requires processing of argument named neededArgName t...
bool defineDouble(const char *name, const char *argName, int doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
static void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr) const
Return RooArgSet property registered with name 'name'.
bool defineSet(const char *name, const char *argName, int setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
std::vector< Var< std::string > > _sList
String list.
TList _yList
Dependency cmd list.
TList _fList
Forbidden cmd list.
void defineRequiredArgs(const char *first, Args_t &&... args)
Add condition that any of listed arguments must be processed for parsing to be declared successful.
bool ok(bool verbose) const
Return true of parsing was successful.
static std::string decodeStringOnTheFly(const char *callerID, const char *cmdArgName, int intIdx, const char *defVal, Args_t &&...args)
Static decoder function allows to retrieve string property from set of RooCmdArgs For use in base mem...
bool defineObject(const char *name, const char *argName, int setNum, const TObject *obj=nullptr, bool isArray=false)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", bool convEmptyToNull=false) const
Return string property registered with name 'name'.
bool defineString(const char *name, const char *argName, int stringNum, const char *defValue="", bool appendMode=false)
Define double property name 'name' mapped to double in slot 'stringNum' in RooCmdArg with name argNam...
static double decodeDoubleOnTheFly(const char *callerID, const char *cmdArgName, int idx, double defVal, std::initializer_list< std::reference_wrapper< const RooCmdArg > > args)
Find a given double in a list of RooCmdArg.
const RooLinkedList & getObjectList(const char *name) const
Return list of objects registered with name 'name'.
TList _mList
Mutex cmd list.
bool defineInt(const char *name, const char *argName, int intNum, int defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
int getInt(const char *name, int defaultValue=0) const
Return integer property registered with name 'name'.
RooLinkedList filterCmdList(RooLinkedList &cmdInList, const char *cmdNameList, bool removeFromInList=true) const
Utility function to filter commands listed in cmdNameList from cmdInList.
std::string missingArgs() const
Return string with names of arguments that were required, but not processed.
TObject * getObject(const char *name, TObject *obj=nullptr) const
Return TObject property registered with name 'name'.
static TObject * decodeObjOnTheFly(const char *callerID, const char *cmdArgName, int objIdx, TObject *defVal, Args_t &&...args)
Static decoder function allows to retrieve object property from set of RooCmdArgs For use in base mem...
static int decodeIntOnTheFly(const char *callerID, const char *cmdArgName, int intIdx, int defVal, Args_t &&...args)
Static decoder function allows to retrieve integer property from set of RooCmdArgs For use in base me...
static RooArgSet * decodeSetOnTheFly(const char *callerID, const char *cmdArgName, int objIdx, RooArgSet *defVal, Args_t &&...args)
void setVerbose(bool flag)
If flag is true verbose messaging is activated.
TList _rList
Required cmd list.
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
The RooStringView is a wrapper around a C-style string that can also be constructed from a std::strin...
void Add(TObject *obj) override
The TNamed class is the base class for all named ROOT classes.
Collectable string class.
Mother of all ROOT objects.