Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ROOT::Math::GenAlgoOptions Class Reference

class implementing generic options for a numerical algorithm Just store the options in a map of string-value pairs

Definition at line 32 of file GenAlgoOptions.h.

Public Member Functions

 GenAlgoOptions ()
 ~GenAlgoOptions () override
IOptionsClone () const override
 generic methods for retrieving options
std::vector< std::string > GetAllIntKeys ()
std::vector< std::string > GetAllNamedKeys ()
std::vector< std::string > GetAllRealKeys ()
bool GetIntValue (const char *name, int &val) const override
bool GetNamedValue (const char *name, std::string &val) const override
bool GetRealValue (const char *name, double &val) const override
template<typename T>
bool GetValue (const char *name, T &t) const
int IValue (const char *name) const
std::string NamedValue (const char *name) const
void Print (std::ostream &os=std::cout) const override
 print options
double RValue (const char *name) const
void SetIntValue (const char *name, int val) override
void SetNamedValue (const char *name, const char *val) override
void SetRealValue (const char *name, double val) override
 Method that needs to be re-implemented by the derived classes.
void SetValue (const char *name, const char *val)
void SetValue (const char *name, double val)
 generic methods for retrieving options
void SetValue (const char *name, int val)

Static Public Member Functions

static IOptionsDefault (const char *algoname)
static IOptionsFindDefault (const char *algoname)
static void PrintAllDefault (std::ostream &os=std::cout)
 print all the default options

Private Member Functions

bool DoGetValue (const char *name, double &val) const
bool DoGetValue (const char *name, int &val) const
bool DoGetValue (const char *name, std::string &val) const

Static Private Member Functions

template<class M>
static const M::mapped_type * FindValue (const std::string &name, const M &opts)
template<class M>
static void InsertValue (const std::string &name, M &opts, const typename M::mapped_type &value)
template<class M>
static void Print (const M &opts, std::ostream &os)

Private Attributes

std::map< std::string, intfIntOpts
 map of the integer options
std::map< std::string, std::string > fNamOpts
 map of the named options
std::map< std::string, doublefRealOpts
 map of the real options

#include <Math/GenAlgoOptions.h>

Inheritance diagram for ROOT::Math::GenAlgoOptions:
ROOT::Math::IOptions

Constructor & Destructor Documentation

◆ GenAlgoOptions()

ROOT::Math::GenAlgoOptions::GenAlgoOptions ( )
inline

Definition at line 36 of file GenAlgoOptions.h.

◆ ~GenAlgoOptions()

ROOT::Math::GenAlgoOptions::~GenAlgoOptions ( )
inlineoverride

Definition at line 38 of file GenAlgoOptions.h.

Member Function Documentation

◆ Clone()

IOptions * ROOT::Math::GenAlgoOptions::Clone ( ) const
inlineoverridevirtual

generic methods for retrieving options

Implements ROOT::Math::IOptions.

Definition at line 47 of file GenAlgoOptions.h.

◆ Default()

IOptions & ROOT::Math::GenAlgoOptions::Default ( const char * algoname)
static

Definition at line 55 of file GenAlgoOptions.cxx.

◆ DoGetValue() [1/3]

bool ROOT::Math::IOptions::DoGetValue ( const char * name,
double & val ) const
inlineprivateinherited

Definition at line 75 of file IOptions.h.

◆ DoGetValue() [2/3]

bool ROOT::Math::IOptions::DoGetValue ( const char * name,
int & val ) const
inlineprivateinherited

Definition at line 77 of file IOptions.h.

◆ DoGetValue() [3/3]

bool ROOT::Math::IOptions::DoGetValue ( const char * name,
std::string & val ) const
inlineprivateinherited

Definition at line 79 of file IOptions.h.

◆ FindDefault()

IOptions * ROOT::Math::GenAlgoOptions::FindDefault ( const char * algoname)
static

Definition at line 48 of file GenAlgoOptions.cxx.

◆ FindValue()

template<class M>
const M::mapped_type * ROOT::Math::GenAlgoOptions::FindValue ( const std::string & name,
const M & opts )
inlinestaticprivate

Definition at line 142 of file GenAlgoOptions.h.

◆ GetAllIntKeys()

std::vector< std::string > ROOT::Math::GenAlgoOptions::GetAllIntKeys ( )
inline

Definition at line 104 of file GenAlgoOptions.h.

◆ GetAllNamedKeys()

std::vector< std::string > ROOT::Math::GenAlgoOptions::GetAllNamedKeys ( )
inline

Definition at line 88 of file GenAlgoOptions.h.

◆ GetAllRealKeys()

std::vector< std::string > ROOT::Math::GenAlgoOptions::GetAllRealKeys ( )
inline

Definition at line 96 of file GenAlgoOptions.h.

◆ GetIntValue()

bool ROOT::Math::GenAlgoOptions::GetIntValue ( const char * name,
int & val ) const
inlineoverridevirtual

Reimplemented from ROOT::Math::IOptions.

Definition at line 61 of file GenAlgoOptions.h.

◆ GetNamedValue()

bool ROOT::Math::GenAlgoOptions::GetNamedValue ( const char * name,
std::string & val ) const
inlineoverridevirtual

Reimplemented from ROOT::Math::IOptions.

Definition at line 68 of file GenAlgoOptions.h.

◆ GetRealValue()

bool ROOT::Math::GenAlgoOptions::GetRealValue ( const char * name,
double & val ) const
inlineoverridevirtual

Reimplemented from ROOT::Math::IOptions.

Definition at line 54 of file GenAlgoOptions.h.

◆ GetValue()

template<typename T>
bool ROOT::Math::IOptions::GetValue ( const char * name,
T & t ) const
inlineinherited

Definition at line 54 of file IOptions.h.

◆ InsertValue()

template<class M>
void ROOT::Math::GenAlgoOptions::InsertValue ( const std::string & name,
M & opts,
const typename M::mapped_type & value )
inlinestaticprivate

Definition at line 152 of file GenAlgoOptions.h.

◆ IValue()

int ROOT::Math::IOptions::IValue ( const char * name) const
inherited

Definition at line 21 of file IOptions.cxx.

◆ NamedValue()

std::string ROOT::Math::IOptions::NamedValue ( const char * name) const
inherited

Definition at line 30 of file IOptions.cxx.

◆ Print() [1/2]

template<class M>
void ROOT::Math::GenAlgoOptions::Print ( const M & opts,
std::ostream & os )
inlinestaticprivate

Definition at line 164 of file GenAlgoOptions.h.

◆ Print() [2/2]

void ROOT::Math::GenAlgoOptions::Print ( std::ostream & os = std::cout) const
inlineoverridevirtual

print options

Reimplemented from ROOT::Math::IOptions.

Definition at line 114 of file GenAlgoOptions.h.

◆ PrintAllDefault()

void ROOT::Math::GenAlgoOptions::PrintAllDefault ( std::ostream & os = std::cout)
static

print all the default options

Definition at line 67 of file GenAlgoOptions.cxx.

◆ RValue()

double ROOT::Math::IOptions::RValue ( const char * name) const
inherited

Definition at line 12 of file IOptions.cxx.

◆ SetIntValue()

void ROOT::Math::GenAlgoOptions::SetIntValue ( const char * name,
int val )
inlineoverridevirtual

Reimplemented from ROOT::Math::IOptions.

Definition at line 80 of file GenAlgoOptions.h.

◆ SetNamedValue()

void ROOT::Math::GenAlgoOptions::SetNamedValue ( const char * name,
const char * val )
inlineoverridevirtual

Reimplemented from ROOT::Math::IOptions.

Definition at line 84 of file GenAlgoOptions.h.

◆ SetRealValue()

void ROOT::Math::GenAlgoOptions::SetRealValue ( const char * name,
double val )
inlineoverridevirtual

Method that needs to be re-implemented by the derived classes.

Reimplemented from ROOT::Math::IOptions.

Definition at line 76 of file GenAlgoOptions.h.

◆ SetValue() [1/3]

void ROOT::Math::IOptions::SetValue ( const char * name,
const char * val )
inlineinherited

Definition at line 44 of file IOptions.h.

◆ SetValue() [2/3]

void ROOT::Math::IOptions::SetValue ( const char * name,
double val )
inlineinherited

generic methods for retrieving options

set option value

Definition at line 42 of file IOptions.h.

◆ SetValue() [3/3]

void ROOT::Math::IOptions::SetValue ( const char * name,
int val )
inlineinherited

Definition at line 43 of file IOptions.h.

Member Data Documentation

◆ fIntOpts

std::map<std::string, int> ROOT::Math::GenAlgoOptions::fIntOpts
private

map of the integer options

Definition at line 170 of file GenAlgoOptions.h.

◆ fNamOpts

std::map<std::string, std::string> ROOT::Math::GenAlgoOptions::fNamOpts
private

map of the named options

Definition at line 172 of file GenAlgoOptions.h.

◆ fRealOpts

std::map<std::string, double> ROOT::Math::GenAlgoOptions::fRealOpts
private

map of the real options

Definition at line 171 of file GenAlgoOptions.h.


The documentation for this class was generated from the following files: