48 template<
class... Args_t>
51 template<
class... Args_t>
52 void defineMutex(
const char* head, Args_t && ... tail);
57 bool defineString(
const char*
name,
const char* argName,
Int_t stringNum,
const char* defValue=
"",
bool appendMode=
false) ;
62 template<
class... Args_t>
65 template<
typename It_t>
66 bool process(It_t begin, It_t end);
70 const char*
getString(
const char*
name,
const char* defaultValue=
"",
bool convEmptyToNull=
false) ;
75 bool ok(
bool verbose)
const ;
86 template<
class ...Args_t>
88 const char* callerID,
const char* cmdArgName,
Int_t intIdx,
Int_t defVal, Args_t && ...args);
90 template<
class ...Args_t>
92 const char* callerID,
const char* cmdArgName,
Int_t intIdx,
const char* defVal, Args_t && ...args);
94 template<
class ...Args_t>
96 const char* callerID,
const char* cmdArgName,
Int_t objIdx,
TObject* defVal, Args_t && ...args);
98 template<
class ...Args_t>
100 const char* callerID,
const char* cmdArgName,
Int_t objIdx,
RooArgSet* defVal, Args_t && ...args);
102 static double decodeDoubleOnTheFly(
const char* callerID,
const char* cmdArgName,
int idx,
double defVal,
103 std::initializer_list<std::reference_wrapper<const RooCmdArg>> args);
141template<
class... Args_t>
143 for(
auto const& arg : {
first, args...}) {
151template<
class... Args_t>
153 for(
auto const& item : {tail...}) {
163template<
class... Args_t>
173template<
typename It_t>
176 for (
auto it = begin; it != end; ++it) {
187template<
class ...Args_t>
189 const char* callerID,
const char* cmdArgName,
Int_t intIdx,
Int_t defVal, Args_t && ...args)
193 pc.
defineInt(
"theInt",cmdArgName,intIdx,defVal) ;
194 pc.
process(std::forward<Args_t>(args)...);
195 return pc.
getInt(
"theInt") ;
203template<
class ...Args_t>
205 const char* callerID,
const char* cmdArgName,
Int_t strIdx,
const char* defVal, Args_t && ...args)
210 pc.
process(std::forward<Args_t>(args)...);
211 const char* ret = pc.
getString(
"theString",
nullptr,
true) ;
213 return ret ? ret :
"";
221template<
class ...Args_t>
223 const char* callerID,
const char* cmdArgName,
Int_t objIdx,
TObject* defVal, Args_t && ...args)
228 pc.
process(std::forward<Args_t>(args)...);
233template<
class ...Args_t>
235 const char* callerID,
const char* cmdArgName,
Int_t objIdx,
RooArgSet* defVal, Args_t && ...args)
239 pc.
defineSet(
"theObj",cmdArgName,objIdx,defVal) ;
240 pc.
process(std::forward<Args_t>(args)...);
241 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.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
bool defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=nullptr, bool isArray=false)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
std::vector< Var< RooArgSet * > > _cList
RooArgSet list.
void defineMutex(const char *)
double getDouble(const char *name, double defaultValue=0.0)
Return double property registered with name 'name'.
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr)
Return RooArgSet property registered with name 'name'.
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.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
std::vector< Var< int > > _iList
Integer list.
std::vector< Var< double > > _dList
Double list.
const RooLinkedList & getObjectList(const char *name)
Return list of objects 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...
static void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
bool defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
std::vector< Var< std::string > > _sList
String list.
TList _yList
Dependency cmd list.
TList _fList
Forbidden cmd list.
bool defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", bool appendMode=false)
Define double property name 'name' mapped to double in slot 'stringNum' in RooCmdArg with name argNam...
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.
TObject * getObject(const char *name, TObject *obj=nullptr)
Return TObject property registered with name 'name'.
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.
TList _mList
Mutex cmd list.
const char * getString(const char *name, const char *defaultValue="", bool convEmptyToNull=false)
Return string property registered with name 'name'.
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
bool defineSet(const char *name, const char *argName, Int_t setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
static RooArgSet * decodeSetOnTheFly(const char *callerID, const char *cmdArgName, Int_t objIdx, RooArgSet *defVal, Args_t &&...args)
static std::string decodeStringOnTheFly(const char *callerID, const char *cmdArgName, Int_t intIdx, const char *defVal, Args_t &&...args)
Static decoder function allows to retrieve string property from set of RooCmdArgs For use in base mem...
static Int_t decodeIntOnTheFly(const char *callerID, const char *cmdArgName, Int_t intIdx, Int_t defVal, Args_t &&...args)
Static decoder function allows to retrieve integer property from set of RooCmdArgs For use in base 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.
bool defineDouble(const char *name, const char *argName, Int_t doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
static TObject * decodeObjOnTheFly(const char *callerID, const char *cmdArgName, Int_t objIdx, TObject *defVal, Args_t &&...args)
Static decoder function allows to retrieve object property from set of RooCmdArgs For use in base mem...
void setVerbose(bool flag)
If flag is true verbose messaging is activated.
TList _rList
Required cmd list.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
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.