Configuration Options¶
These classes define configuration options and methods to parse configuration files.
Defined in src/utils/ConfigParser.h
and src/utils/Option.h
-
class Caesar::ConfigParser : public TObject¶
Public Functions
-
int Parse(std::string filename = "")¶
Read the config file, parse and set info to be used by other classes.
-
inline void PrintOptions()¶
Print registered options.
Register options.
-
inline bool HasOption(std::string name)¶
Check registered options.
-
inline int SetOptionFromString(std::string name, std::string stringified_value)¶
Set option from string.
-
inline TTree *GetConfigTree(std::string treeName = "CfgInfo")¶
Get config option tree.
-
int Parse(std::string filename = "")¶
-
template<typename T>
class Caesar::Option : public Caesar::OptionBase¶ Public Functions
-
inline Option()¶
Default Class constructor (needed by ROOT IO)
-
inline virtual ~Option()¶
Class destructor.
-
inline virtual int SetValueFromStream(std::stringstream &sstream)¶
Set option value from stringstream.
-
inline virtual int SetValueFromString(std::string const &s)¶
Set option value from string.
-
inline virtual int GetJson(Json::Value &jsonObj)¶
Get json object from option.
-
inline virtual int GetJsonString(std::string &jsonString, bool isMinified = true)¶
Get json string.
-
inline bool CheckRange(T &value)¶
Check given value against registered range (non sense for bool, string/char)?
-
inline virtual void Print()¶
Print option.
-
inline virtual int AddBranch(TTree *tree)¶
Add a TBranch to input TTree.
-
inline Option()¶