CepGen 1.2.5
Central exclusive processes event generator
|
#include <CepGen/Core/ParametersList.h>
Public Member Functions | |
ParametersList ()=default | |
ParametersList (const ParametersList &) | |
Copy constructor. | |
~ParametersList () | |
ParametersList & | operator= (const ParametersList &)=default |
Assignment operator. | |
bool | hasName () const |
Does the parameters list have a name key? | |
std::string | name (const std::string &def="") const |
Retrieve the module name if any. | |
ParametersList & | setName (const std::string &) |
Set the module name. | |
bool | operator== (const ParametersList &) const |
Equality operator. | |
bool | operator!= (const ParametersList &oth) const |
Inequality operator. | |
ParametersList | diff (const ParametersList &) const |
Diff with another parameters list ('mine' + 'theirs' keys) | |
ParametersList & | feed (const std::string &) |
Feed a control string to the list of parameters. | |
template<typename T > | |
bool | has (const std::string &key) const |
Check if a given parameter is handled in this list. | |
size_t | erase (const std::string &) |
Erase a parameter with key. | |
template<typename T > | |
size_t | erase (const std::string &) |
Erase a typed parameter with key. | |
template<typename T > | |
const ParametersList & | fill (const std::string &key, T &value) const |
Fill a variable with the key content if exists. | |
template<typename T > | |
T | get (const std::string &key, const T &def=default_arg< T >::get()) const |
Get a parameter value. | |
template<typename T , typename U > | |
U | getAs (const std::string &key, const U &def=default_arg< U >::get()) const |
Get a recast parameter value. | |
template<typename T > | |
T & | operator[] (const std::string &key) |
Reference to a parameter value. | |
template<typename T > | |
ParametersList & | set (const std::string &, const T &) |
Set a parameter value Set a recast parameter value. | |
template<typename T , typename U > | |
ParametersList & | setAs (const std::string &key, const U &value) |
ParametersList & | rename (const std::string &, const std::string &) |
Rename the key to a parameter value. | |
ParametersList & | operator+= (const ParametersList &oth) |
Concatenate two parameters containers. | |
ParametersList | operator+ (const ParametersList &oth) const |
Concatenation of two parameters containers. | |
bool | empty () const |
Is the list empty? | |
template<typename T > | |
std::vector< std::string > | keysOf () const |
List of keys for one type in this list of parameters List of keys handled in this list of parameters. | |
std::vector< std::string > | keys (bool name_key=true) const |
std::string | getString (const std::string &key, bool wrap=false) const |
Get a string-converted version of a value. | |
std::string | getNameString (bool wrap=false) const |
Get a string-converted version of the module name if any. | |
std::string | serialise () const |
Serialise a parameters collection into a parseable string. | |
const ParametersList & | print (std::ostream &) const |
Debugging-like printout of a parameters container. | |
std::string | print (bool compact=false) const |
Normal printout of a parameters container. | |
template<> | |
Limits | get (const std::string &key, const Limits &def) const |
template<> | |
const ParametersList & | fill (const std::string &key, Limits &value) const |
template<> | |
bool | has (const std::string &key) const |
Check if a particle properties object is handled. | |
template<> | |
ParticleProperties | get (const std::string &key, const ParticleProperties &def) const |
Get a particle properties object. | |
template<> | |
ParametersList & | set (const std::string &key, const ParticleProperties &value) |
Set a particle properties object value. | |
template<> | |
std::vector< std::string > | keysOf () const |
Friends | |
std::ostream & | operator<< (std::ostream &, const ParametersList &) |
Human-readable version of a parameters container. | |
Definition at line 52 of file ParametersList.h.
|
default |
ParametersList | ( | const ParametersList & | oth | ) |
Definition at line 71 of file ParametersList.cpp.
~ParametersList | ( | ) |
Definition at line 63 of file ParametersList.h.
ParametersList diff | ( | const ParametersList & | oth | ) | const |
Definition at line 82 of file ParametersList.cpp.
bool empty | ( | ) | const |
Definition at line 249 of file ParametersList.cpp.
size_t erase | ( | const std::string & | key | ) |
Definition at line 241 of file ParametersList.cpp.
size_t erase | ( | const std::string & | ) |
ParametersList & feed | ( | const std::string & | raw_args | ) |
Definition at line 161 of file ParametersList.cpp.
const ParametersList & fill | ( | const std::string & | key, |
Limits & | value | ||
) | const |
Definition at line 444 of file ParametersList.cpp.
const ParametersList & fill | ( | const std::string & | key, |
T & | value | ||
) | const |
[in] | key | Unique key for parameter |
[out] | value | Object/variable to be filled with parameter value |
Definition at line 92 of file ParametersList.h.
Definition at line 429 of file ParametersList.cpp.
ParticleProperties get | ( | const std::string & | key, |
const ParticleProperties & | def | ||
) | const |
Definition at line 473 of file ParametersList.cpp.
T get | ( | const std::string & | key, |
const T & | def = default_arg<T>::get() |
||
) | const |
[in] | key | Unique key for parameter |
[in] | def | Default parameters value if parameter is not contained |
Definition at line 391 of file ParametersList.cpp.
U getAs | ( | const std::string & | key, |
const U & | def = default_arg<U>::get() |
||
) | const |
T | Base type of the parameter |
U | Type to recast the parameter into |
[in] | key | Unique key for parameter |
[in] | def | Default parameters value if parameter is not contained |
Definition at line 108 of file ParametersList.h.
std::string getNameString | ( | bool | wrap = false | ) | const |
[in] | wrap | Encapsulate the value with type() |
Definition at line 142 of file ParametersList.h.
std::string getString | ( | const std::string & | key, |
bool | wrap = false |
||
) | const |
[in] | key | Unique key for parameter |
[in] | wrap | Encapsulate the value with type() |
Definition at line 313 of file ParametersList.cpp.
bool has | ( | const std::string & | key | ) | const |
Definition at line 467 of file ParametersList.cpp.
bool has | ( | const std::string & | key | ) | const |
key | Unique key for parameter |
Definition at line 386 of file ParametersList.cpp.
bool hasName | ( | ) | const |
Definition at line 292 of file ParametersList.cpp.
std::vector< std::string > keys | ( | bool | name_key = true | ) | const |
Definition at line 298 of file ParametersList.cpp.
std::vector< std::string > keysOf | ( | ) | const |
Definition at line 495 of file ParametersList.cpp.
std::vector< std::string > keysOf | ( | ) | const |
[in] | name_key | Include the name variable? |
std::string name | ( | const std::string & | def = "" | ) | const |
Definition at line 294 of file ParametersList.cpp.
bool operator!= | ( | const ParametersList & | oth | ) | const |
Definition at line 71 of file ParametersList.h.
ParametersList operator+ | ( | const ParametersList & | oth | ) | const |
Definition at line 155 of file ParametersList.cpp.
ParametersList & operator+= | ( | const ParametersList & | oth | ) |
Definition at line 111 of file ParametersList.cpp.
|
default |
bool operator== | ( | const ParametersList & | oth | ) | const |
Definition at line 73 of file ParametersList.cpp.
T & operator[] | ( | const std::string & | key | ) |
[in] | key | Unique key for parameter |
Definition at line 396 of file ParametersList.cpp.
std::string print | ( | bool | compact = false | ) | const |
Definition at line 276 of file ParametersList.cpp.
const ParametersList & print | ( | std::ostream & | os | ) | const |
Definition at line 256 of file ParametersList.cpp.
ParametersList & rename | ( | const std::string & | old_key, |
const std::string & | new_key | ||
) |
Definition at line 352 of file ParametersList.cpp.
std::string serialise | ( | ) | const |
Definition at line 361 of file ParametersList.cpp.
ParametersList & set | ( | const std::string & | key, |
const T & | |||
) |
T | Base type of the parameter |
U | Type to recast the parameter into |
[in] | key | Unique key for parameter |
[in] | value | Value to set the parameter |
Definition at line 401 of file ParametersList.cpp.
ParametersList & set | ( | const std::string & | key, |
const ParticleProperties & | value | ||
) |
Definition at line 495 of file ParametersList.cpp.
ParametersList & setAs | ( | const std::string & | key, |
const U & | value | ||
) |
Definition at line 123 of file ParametersList.h.
ParametersList & setName | ( | const std::string & | value | ) |
Definition at line 296 of file ParametersList.cpp.
|
friend |
Definition at line 251 of file ParametersList.cpp.