Belle II Software development
|
Base class for module parameter. More...
#include <ModuleParamBase.h>
Public Member Functions | |
ModuleParamBase (std::string typeInfo, std::string description, bool force) | |
Constructor. | |
virtual | ~ModuleParamBase () |
Destructor. | |
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. | |
virtual void | setValueFromPythonObject (const boost::python::object &pyObject)=0 |
Pure virtual function. | |
virtual void | setValueToPythonObject (boost::python::object &pyObject, bool defaultValues=false) const =0 |
Pure virtual function. | |
virtual void | setValueFromParam (const ModuleParamBase ¶m)=0 |
Set value from other ModuleParam of same 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. | |
Base class for module parameter.
The base class stores all common information for parameters.
Definition at line 31 of file ModuleParamBase.h.
ModuleParamBase | ( | std::string | typeInfo, |
std::string | description, | ||
bool | force | ||
) |
Constructor.
typeInfo | The type string of the parameter. |
description | The description of the parameter. |
force | If true the parameter has to be set in the steering file by the user. |
Definition at line 15 of file ModuleParamBase.cc.
const std::string & getDescription | ( | ) | const |
Returns the description of the parameter.
Definition at line 30 of file ModuleParamBase.cc.
const std::string & getTypeInfo | ( | ) | const |
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.
bool isForcedInSteering | ( | ) | const |
Returns true if the parameter has to be set by the user in the steering file.
Definition at line 40 of file ModuleParamBase.cc.
bool isSetInSteering | ( | ) | const |
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.
|
pure virtual |
Set value from other ModuleParam of same type.
Implemented in ModuleParam< T >, and ModuleParam< bool >.
|
pure virtual |
Pure virtual function.
Set the value of the parameter from a python object. The derived templated ModuleParam class calls the converter functions in PyObjConvUtils.h with the right template arguments. Hence the compiler can automatically infer the right converter.
pyObject | The python object which holds the parameter value |
Implemented in ModuleParam< T >, and ModuleParam< bool >.
|
pure virtual |
Pure virtual function.
Set the value of a python objects to stored parameter value. The derived templated ModuleParam class calls the converter functions in PyObjConvUtils.h with the right template arguments. Hence the compiler can automatically infer the right converters
pyObject | The python object which should be filled with the parameter value |
defaultValues | If true, the python object is set to the default value of this parameter. |
Implemented in ModuleParam< T >, and ModuleParam< bool >.
|
protected |
The (optional) description of the parameter.
Definition at line 113 of file ModuleParamBase.h.
|
protected |
If true the parameter has to be set by the user in the steering file.
Definition at line 116 of file ModuleParamBase.h.
|
protected |
True, if the parameter value was changed in the steering file.
Definition at line 119 of file ModuleParamBase.h.
|
protected |
The type of the parameter stored as string.
Definition at line 110 of file ModuleParamBase.h.