Belle II Software light-2406-ragdoll
|
A single parameter of the module. More...
#include <ModuleParam.h>
Public Member Functions | |
ModuleParam (T ¶mVariable, const std::string &description="", bool force=false) | |
Constructor. | |
virtual | ~ModuleParam () |
Destructor. | |
void | setValue (const T &value) |
Sets the value of a parameter. | |
void | setDefaultValue (const T &defaultValue) |
Sets the default value of a parameter. | |
T & | getValue () |
Returns the value of the parameter. | |
T & | getDefaultValue () |
Returns the default value of the parameter. | |
virtual void | setValueFromPythonObject (const boost::python::object &pyObject) final |
Implements a method for setting boost::python objects. | |
virtual void | setValueToPythonObject (boost::python::object &pyObject, bool defaultValues=false) const final |
Returns a python object containing the value or the default value of the given parameter. | |
virtual void | setValueFromParam (const ModuleParamBase ¶m) final |
Set value from other ModuleParam of same type. | |
void | resetValue () |
Resets the parameter value by assigning the default value to the parameter value. | |
const std::string & | getTypeInfo () const |
Returns the type identifier of the parameter as string. | |
const std::string & | getDescription () const |
Returns the description of the parameter. | |
bool | isSetInSteering () const |
Returns true if the parameter was set in the steering file. | |
bool | isForcedInSteering () const |
Returns true if the parameter has to be set by the user in the steering file. | |
Static Public Member Functions | |
static std::string | TypeInfo () |
Static function to generate a string description for the parameter type. | |
Protected Attributes | |
std::string | m_typeInfo |
The type of the parameter stored as string. | |
std::string | m_description |
The (optional) description of the parameter. | |
bool | m_forceInSteering |
If true the parameter has to be set by the user in the steering file. | |
bool | m_setInSteering |
True, if the parameter value was changed in the steering file. | |
Private Attributes | |
T | m_defaultValue {} |
The default value of the parameter. | |
T & | m_paramVariable |
Reference to the member variable in the module which stores the parameter value. | |
A single parameter of the module.
Implements a single parameter of the module as a template class. Inherits from the module parameter base class.
Definition at line 34 of file ModuleParam.h.
|
inherited |
Returns the description of the parameter.
Definition at line 30 of file ModuleParamBase.cc.
|
inherited |
Returns the type identifier of the parameter as string.
The type identifier is used to discriminate between problematic parameter types (e.g. double and int).
Definition at line 25 of file ModuleParamBase.cc.
|
inherited |
Returns true if the parameter has to be set by the user in the steering file.
Definition at line 40 of file ModuleParamBase.cc.
|
inherited |
Returns true if the parameter was set in the steering file.
If the value was not set in the steering file but is still the default value, this method returns false.
Definition at line 35 of file ModuleParamBase.cc.
|
private |
The default value of the parameter.
Definition at line 121 of file ModuleParam.h.
|
protectedinherited |
The (optional) description of the parameter.
Definition at line 113 of file ModuleParamBase.h.
|
protectedinherited |
If true the parameter has to be set by the user in the steering file.
Definition at line 116 of file ModuleParamBase.h.
|
private |
Reference to the member variable in the module which stores the parameter value.
Definition at line 124 of file ModuleParam.h.
|
protectedinherited |
True, if the parameter value was changed in the steering file.
Definition at line 119 of file ModuleParamBase.h.
|
protectedinherited |
The type of the parameter stored as string.
Definition at line 110 of file ModuleParamBase.h.