50 template<
class... Args_t>
53 template<
class... Args_t>
54 void defineMutex(
const char* head, Args_t && ... tail);
57 bool defineInt(
const char*
name,
const char* argName,
int intNum,
int defValue=0) ;
58 bool defineDouble(
const char*
name,
const char* argName,
int doubleNum,
double defValue=0.0) ;
59 bool defineString(
const char*
name,
const char* argName,
int stringNum,
const char* defValue=
"",
bool appendMode=
false) ;
60 bool defineObject(
const char*
name,
const char* argName,
int setNum,
const TObject* obj=
nullptr,
bool isArray=
false) ;
64 template<
class... Args_t>
67 template<
typename It_t>
68 bool process(It_t begin, It_t end);
70 int getInt(
const char*
name,
int defaultValue=0)
const;
71 double getDouble(
const char*
name,
double defaultValue=0.0)
const;
72 const char*
getString(
const char*
name,
const char* defaultValue=
"",
bool convEmptyToNull=
false)
const;
77 bool ok(
bool verbose)
const ;
88 template<
class ...Args_t>
90 const char* callerID,
const char* cmdArgName,
int intIdx,
int defVal, Args_t && ...args);
92 template<
class ...Args_t>
94 const char* callerID,
const char* cmdArgName,
int intIdx,
const char* defVal, Args_t && ...args);
96 template<
class ...Args_t>
98 const char* callerID,
const char* cmdArgName,
int objIdx,
TObject* defVal, Args_t && ...args);
100 template<
class ...Args_t>
102 const char* callerID,
const char* cmdArgName,
int objIdx,
RooArgSet* defVal, Args_t && ...args);
104 static double decodeDoubleOnTheFly(
const char* callerID,
const char* cmdArgName,
int idx,
double defVal,
105 std::initializer_list<std::reference_wrapper<const RooCmdArg>> args);
143template<
class... Args_t>
145 for(
auto const& arg : {first, args...}) {
153template<
class... Args_t>
155 for(
auto const& item : {tail...}) {
165template<
class... Args_t>
168 for(
auto r : {
process(arg),
process(std::forward<Args_t>(args))...}) result |=
r;
175template<
typename It_t>
178 for (
auto it = begin; it != end; ++it) {
189template<
class ...Args_t>
191 const char* callerID,
const char* cmdArgName,
int intIdx,
int defVal, Args_t && ...args)
195 pc.
defineInt(
"theInt",cmdArgName,intIdx,defVal) ;
196 pc.
process(std::forward<Args_t>(args)...);
197 return pc.
getInt(
"theInt") ;
205template<
class ...Args_t>
207 const char* callerID,
const char* cmdArgName,
int strIdx,
const char* defVal, Args_t && ...args)
212 pc.
process(std::forward<Args_t>(args)...);
213 const char*
ret = pc.
getString(
"theString",
nullptr,
true) ;
223template<
class ...Args_t>
225 const char* callerID,
const char* cmdArgName,
int objIdx,
TObject* defVal, Args_t && ...args)
230 pc.
process(std::forward<Args_t>(args)...);
235template<
class ...Args_t>
237 const char* callerID,
const char* cmdArgName,
int objIdx,
RooArgSet* defVal, Args_t && ...args)
241 pc.
defineSet(
"theObj",cmdArgName,objIdx,defVal) ;
242 pc.
process(std::forward<Args_t>(args)...);
243 return pc.
getSet(
"theObj") ;
#define ClassDefOverride(name, id)
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...
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'.
RooCmdConfig(RooStringView methodName)
Constructor taking descriptive name of owner/user which is used as prefix for any warning or error me...
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...
The TNamed class is the base class for all named ROOT classes.
Collectable string class.
Mother of all ROOT objects.
TObject()
TObject constructor.