11 #ifndef ROOT_Math_IOptions 12 #define ROOT_Math_IOptions 49 double RValue(
const char * name)
const {
52 if (!ret )
MATH_ERROR_MSGVAL(
"IOptions::RValue",
" return 0 - real option not found",name);
56 int IValue(
const char * name)
const {
59 if (!ret )
MATH_ERROR_MSGVAL(
"IOptions::IValue",
" return 0 - integer option not found",name);
66 if (!ret )
MATH_ERROR_MSGVAL(
"IOptions::NamedValue",
" return empty string - named option not found",name);
83 virtual bool GetRealValue(
const char *,
double &)
const {
return false; }
85 virtual bool GetIntValue(
const char *,
int &)
const {
return false; }
87 virtual bool GetNamedValue(
const char *, std::string &)
const {
return false; }
98 virtual void Print(std::ostream & = std::cout )
const {
MATH_INFO_MSG(
"IOptions::Print",
"it is not implemented");}
double RValue(const char *name) const
Namespace for new ROOT classes and functions.
bool DoGetValue(const char *name, double &val) const
virtual void Print(std::ostream &=std::cout) const
print options
bool DoGetValue(const char *name, std::string &val) const
bool GetValue(const char *name, T &t) const
virtual bool GetRealValue(const char *, double &) const
#define MATH_ERROR_MSGVAL(loc, str, x)
virtual void SetNamedValue(const char *, const char *)
virtual void SetRealValue(const char *, double)
method wich need to be re-implemented by the derived classes
void SetValue(const char *name, int val)
#define MATH_ERROR_MSG(loc, str)
std::string NamedValue(const char *name) const
bool DoGetValue(const char *name, int &val) const
#define MATH_INFO_MSG(loc, str)
virtual bool GetIntValue(const char *, int &) const
virtual IOptions * Clone() const =0
void SetValue(const char *name, double val)
generic methods for retrivieng options
virtual void SetIntValue(const char *, int)
Namespace for new Math classes and functions.
virtual bool GetNamedValue(const char *, std::string &) const
Generic interface for defining configuration options of a numerical algorithm.
int IValue(const char *name) const
void SetValue(const char *name, const char *val)