MarlinMT
0.1.0
|
#include <RunHeader.h>
Public Member Functions | |
RunHeader ()=default | |
~RunHeader ()=default | |
RunHeader (const RunHeader &)=delete | |
RunHeader & | operator= (const RunHeader &)=delete |
RunHeader (RunHeader &&)=default | |
RunHeader & | operator= (RunHeader &&)=default |
int | runNumber () const |
Get the run number. More... | |
RunHeader & | setRunNumber (int n) |
Set the run number. More... | |
const std::string & | description () const |
Get the run description. More... | |
RunHeader & | setDescription (const std::string &desc) |
Set the run description. More... | |
const std::string & | detectorName () const |
Get the detector name. More... | |
RunHeader & | setDetectorName (const std::string &det) |
Set the detector name. More... | |
const ParameterMap & | parameters () const |
Get the run parameters. More... | |
ParameterMap & | parameters () |
Get the run parameters. More... | |
template<typename T > | |
std::optional< T > | parameter (const std::string &name) const |
Get a parameter by name. More... | |
template<typename T > | |
RunHeader & | setParameter (const std::string &name, const T &value) |
Set a run parameter. More... | |
Extensions & | extensions () |
Get the run extensions. More... | |
const Extensions & | extensions () const |
Get the run extensions. More... | |
Private Types | |
using | ParameterMap = std::map< std::string, std::string > |
Private Attributes | |
int | _runNumber {0} |
The run number. More... | |
std::string | _detectorName {} |
The detector name. More... | |
std::string | _description {} |
The run description. More... | |
ParameterMap | _parameters {} |
The run parameters map. More... | |
Extensions | _extensions {} |
The run extensions. More... | |
RunHeader class.
Provide a simple interface describing a run. The basic metadata are run number, detector name and description and can be extended with more parameters. The parameters are real properties of a run whereas the extensions can also be attached to a run object but are only valid at runtime.
Definition at line 22 of file RunHeader.h.
|
private |
Definition at line 23 of file RunHeader.h.
|
default |
|
default |
|
delete |
|
default |
|
inline |
Get the run description.
Definition at line 136 of file RunHeader.h.
References _description.
Referenced by marlinmt::LCIOOutputProcessor::processRunHeader().
|
inline |
Get the detector name.
Definition at line 149 of file RunHeader.h.
References _detectorName.
Referenced by marlinmt::LCIOOutputProcessor::processRunHeader().
|
inline |
|
inline |
|
inline |
Get a parameter by name.
name | the parameter name |
Definition at line 175 of file RunHeader.h.
References _parameters, and marlinmt::details::convert< T >::from_string().
Referenced by marlinmt::LCIOOutputProcessor::processRunHeader().
|
inline |
Get the run parameters.
Definition at line 162 of file RunHeader.h.
References _parameters.
Referenced by marlinmt::LCIOOutputProcessor::processRunHeader().
|
inline |
|
inline |
Get the run number.
Definition at line 123 of file RunHeader.h.
References _runNumber.
Referenced by marlinmt::TestProcessor::processRunHeader(), and marlinmt::LCIOOutputProcessor::processRunHeader().
|
inline |
Set the run description.
desc | the run description |
Definition at line 142 of file RunHeader.h.
References _description.
|
inline |
Set the detector name.
det | the detector name |
Definition at line 155 of file RunHeader.h.
References _detectorName.
|
inline |
Set a run parameter.
name | the parameter name |
value | the parameter value |
Definition at line 186 of file RunHeader.h.
References _parameters, and marlinmt::details::convert< T >::to_string().
|
inline |
Set the run number.
n | the run number |
Definition at line 129 of file RunHeader.h.
References _runNumber.
|
private |
The run description.
Definition at line 113 of file RunHeader.h.
Referenced by description(), and setDescription().
|
private |
The detector name.
Definition at line 111 of file RunHeader.h.
Referenced by detectorName(), and setDetectorName().
|
private |
|
private |
The run parameters map.
Definition at line 115 of file RunHeader.h.
Referenced by parameter(), parameters(), and setParameter().
|
private |
The run number.
Definition at line 109 of file RunHeader.h.
Referenced by runNumber(), and setRunNumber().