![]() |
ATLAS Offline Software
|
Common implementation of IAddVariable.
More...
#include <AddVariable.h>
Public Member Functions | |
| AddVariable (const std::string &prefix, const std::string &blockName=s_emptyString) | |
| Constructor. | |
| AddVariable (const std::string &prefix, const std::string &blockName, const std::string &suffix) | |
| Constructor. | |
| StatusCode | configureD3PD (IAddVariable *tree) |
| Configure the parent tree. | |
| virtual StatusCode | addVariable (const std::string &name, const std::type_info &ti, void *&ptr, std::string_view docstring="", const void *defval=0) |
| Add a variable to the tuple. | |
| virtual StatusCode | addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, std::string_view docstring="", const void *defval=0) |
| Add a variable to the tuple. | |
| template<class T> | |
| StatusCode | addVariable (const std::string &name, T *&ptr, std::string_view docstring="") |
Make the template implementation from IAddVariable visible. | |
| template<class T, class U> | |
| StatusCode | addVariable (const std::string &name, T *&ptr, std::string_view docstring, const U &defval) |
Make the template implementation from IAddVariable visible. | |
| template<class T> | |
| StatusCode | addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, std::string_view docstring="") |
| Add a variable to the tuple. | |
| template<class T, class U> | |
| StatusCode | addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, std::string_view docstring, const U &defval) |
| Add a variable to the tuple. | |
Protected Attributes | |
| ObjectMetadata | m_metadata |
| Metadata about the variables created by this object. | |
Private Attributes | |
| const std::string & | m_prefix |
| Reference to the variable prefix. | |
| const std::string & | m_suffix |
| Reference to the variable suffix. | |
| IAddVariable * | m_tree |
The parent IAddVariable instance. | |
Static Private Attributes | |
| static const std::string | s_emptyString |
| Used to provide a default value for blockName. | |
Common implementation of IAddVariable.
This implements the IAddVariable interface for the common case where we just need to add a prefix/suffix to the variable name and forward to another IAddVariable.
References to the prefix/suffix and block name are passed to the constructor (these will typically be tool properties) and the parent IAddVariable is passed to configureD3PD.
Definition at line 36 of file AddVariable.h.
| D3PD::AddVariable::AddVariable | ( | const std::string & | prefix, |
| const std::string & | blockName = s_emptyString ) |
Constructor.
| prefix | Reference to the variable prefix. |
| blockName | Reference to the block name for this tool. |
Definition at line 29 of file AddVariable.cxx.
| D3PD::AddVariable::AddVariable | ( | const std::string & | prefix, |
| const std::string & | blockName, | ||
| const std::string & | suffix ) |
Constructor.
| prefix | Reference to the variable prefix. |
| blockName | Reference to the block name for this tool. |
| suffix | Reference to the variable suffix. |
| prefix | Reference to the variable prefix. |
| blockName | Reference to the block name for this tool. |
Definition at line 44 of file AddVariable.cxx.
|
virtual |
Add a variable to the tuple.
| name | The name of the variable. |
| type | The type of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| dim | Dimension for the variable. (Presently unimplemented!) |
| docstring | Documentation string for this variable. |
| defval | Pointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types. |
If called from the constructor, the only effect is to clear ptr.
Implements D3PD::IAddVariable.
Definition at line 122 of file AddVariable.cxx.
| StatusCode D3PD::IAddVariable::addDimensionedVariable | ( | const std::string & | name, |
| T *& | ptr, | ||
| const std::string & | dim, | ||
| std::string_view | docstring, | ||
| const U & | defval ) |
Add a variable to the tuple.
| name | The name of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| dim | Dimension for the variable. (Presently unimplemented!) |
| docstring | Documentation string for this variable. |
| defval | Pointer to the default value to use for this variable. Only works for basic types. |
If called from the constructor, the only effect is to clear ptr.
| StatusCode D3PD::IAddVariable::addDimensionedVariable | ( | const std::string & | name, |
| T *& | ptr, | ||
| const std::string & | dim, | ||
| std::string_view | docstring = "" ) |
Add a variable to the tuple.
| name | The name of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| dim | Dimension for the variable. (Presently unimplemented!) |
| docstring | Documentation string for this variable. |
If called from the constructor, the only effect is to clear ptr.
|
virtual |
Add a variable to the tuple.
| name | The name of the variable. |
| type | The type of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| docstring | Documentation string for this variable. |
| defval | Pointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types. |
If called from the constructor, the only effect is to clear ptr.
Implements D3PD::IAddVariable.
Definition at line 84 of file AddVariable.cxx.
| StatusCode D3PD::IAddVariable::addVariable | ( | const std::string & | name, |
| T *& | ptr, | ||
| std::string_view | docstring, | ||
| const U & | defval ) |
Make the template implementation from IAddVariable visible.
| StatusCode D3PD::IAddVariable::addVariable | ( | const std::string & | name, |
| T *& | ptr, | ||
| std::string_view | docstring = "" ) |
Make the template implementation from IAddVariable visible.
| StatusCode D3PD::AddVariable::configureD3PD | ( | IAddVariable * | tree | ) |
Configure the parent tree.
| tree | The parent IAddVariable instance. |
Definition at line 60 of file AddVariable.cxx.
|
protected |
Metadata about the variables created by this object.
Definition at line 129 of file AddVariable.h.
|
private |
Reference to the variable prefix.
Definition at line 134 of file AddVariable.h.
|
private |
Reference to the variable suffix.
Definition at line 137 of file AddVariable.h.
|
private |
The parent IAddVariable instance.
Definition at line 141 of file AddVariable.h.
|
staticprivate |
Used to provide a default value for blockName.
Definition at line 41 of file AddVariable.h.