Define an abstract interface for building a D3PD tree.
More...
#include <ID3PD.h>
|
| typedef unsigned int | Dim_t |
| | Currently unimplemented — see design note.
|
|
| virtual StatusCode | capture ()=0 |
| | Capture the current state of all variables and write to the tuple.
|
| virtual StatusCode | clear ()=0 |
| | Clear all the tuple variables.
|
| virtual StatusCode | redim (const Dim_t *ptr)=0 |
| virtual StatusCode | addMetadata (const std::string &key, const void *obj, const std::type_info &ti)=0 |
| | Add a new piece of metadata to the tuple.
|
| template<class T> |
| StatusCode | addMetadata (const std::string &key, const T *obj) |
| | Add a new piece of metadata to the tuple.
|
| template<class T> |
| StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring="") |
| | Add a variable to the tuple.
|
| template<class T, class U> |
| StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring, const U &defval) |
| | Add a variable to the tuple.
|
| virtual StatusCode | addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)=0 |
| | Add a variable to the tuple.
|
| template<class T> |
| StatusCode | addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring="") |
| | Add a variable to the tuple.
|
| template<class T, class U> |
| StatusCode | addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring, const U &defval) |
| | Add a variable to the tuple.
|
| virtual StatusCode | addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)=0 |
| | Add a variable to the tuple.
|
Define an abstract interface for building a D3PD tree.
Variables are added via the IAddVariable interface.
A D3PD also allows storing arbitrary metadata objects, identified by a string key.
Definition at line 35 of file ID3PD.h.
◆ Dim_t
Currently unimplemented — see design note.
Definition at line 52 of file ID3PD.h.
◆ addDimensionedVariable() [1/3]
| virtual StatusCode D3PD::IAddVariable::addDimensionedVariable |
( |
const std::string & | name, |
|
|
const std::type_info & | ti, |
|
|
void *& | ptr, |
|
|
const std::string & | dim, |
|
|
const std::string & | docstring = "", |
|
|
const void * | defval = 0 ) |
|
pure virtualinherited |
Add a variable to the tuple.
- Parameters
-
| 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.
Implemented in D3PD::AddVariable, D3PD::ObjectMetadata, D3PD::RootD3PD, D3PD::RootReaderD3PDBase, and D3PD::VectorFillerToolBase.
◆ addDimensionedVariable() [2/3]
template<class T, class U>
| StatusCode D3PD::IAddVariable::addDimensionedVariable |
( |
const std::string & | name, |
|
|
T *& | ptr, |
|
|
const std::string & | dim, |
|
|
const std::string & | docstring, |
|
|
const U & | defval ) |
|
inherited |
Add a variable to the tuple.
- Parameters
-
| 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.
◆ addDimensionedVariable() [3/3]
template<class T>
| StatusCode D3PD::IAddVariable::addDimensionedVariable |
( |
const std::string & | name, |
|
|
T *& | ptr, |
|
|
const std::string & | dim, |
|
|
const std::string & | docstring = "" ) |
|
inherited |
Add a variable to the tuple.
- Parameters
-
| 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.
◆ addMetadata() [1/2]
template<class T>
| StatusCode D3PD::ID3PD::addMetadata |
( |
const std::string & | key, |
|
|
const T * | obj ) |
Add a new piece of metadata to the tuple.
- Parameters
-
| key | - The key for this object. Any existing object will be overwritten. |
| obj | - Pointer to the object to write. |
The interpretation of the key parameter is up to the concrete D3PD implementation. However, a key name with a trailing slash NAME/ indicates that all metadata items with this name should be grouped together in a collection called NAME (for example, in a Root directory with that name).
◆ addMetadata() [2/2]
| virtual StatusCode D3PD::ID3PD::addMetadata |
( |
const std::string & | key, |
|
|
const void * | obj, |
|
|
const std::type_info & | ti ) |
|
pure virtual |
Add a new piece of metadata to the tuple.
- Parameters
-
| key | - The key for this object. Any existing object will be overwritten. |
| obj | - Pointer to the object to write. |
| ti | - Type of the object to write. |
The interpretation of the key parameter is up to the concrete D3PD implementation. However, a key name with a trailing slash NAME/ indicates that all metadata items with this name should be grouped together in a collection called NAME (for example, in a Root directory with that name).
Implemented in D3PD::RootD3PD, and D3PD::RootReaderD3PDBase.
◆ addVariable() [1/3]
| virtual StatusCode D3PD::IAddVariable::addVariable |
( |
const std::string & | name, |
|
|
const std::type_info & | ti, |
|
|
void *& | ptr, |
|
|
const std::string & | docstring = "", |
|
|
const void * | defval = 0 ) |
|
pure virtualinherited |
Add a variable to the tuple.
- Parameters
-
| 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.
Implemented in D3PD::AddVariable, D3PD::ObjectMetadata, D3PD::RootD3PD, D3PD::RootObjectMetadata, D3PD::RootReaderD3PDBase, and D3PD::VectorFillerToolBase.
◆ addVariable() [2/3]
template<class T, class U>
| StatusCode D3PD::IAddVariable::addVariable |
( |
const std::string & | name, |
|
|
T *& | ptr, |
|
|
const std::string & | docstring, |
|
|
const U & | defval ) |
|
inherited |
Add a variable to the tuple.
- Parameters
-
| 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(). |
| 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.
◆ addVariable() [3/3]
template<class T>
| StatusCode D3PD::IAddVariable::addVariable |
( |
const std::string & | name, |
|
|
T *& | ptr, |
|
|
const std::string & | docstring = "" ) |
|
inherited |
Add a variable to the tuple.
- Parameters
-
| 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(). |
| docstring | Documentation string for this variable. |
If called from the constructor, the only effect is to clear ptr.
◆ capture()
| virtual StatusCode D3PD::ID3PD::capture |
( |
| ) |
|
|
pure virtual |
◆ clear()
| virtual StatusCode D3PD::ID3PD::clear |
( |
| ) |
|
|
pure virtual |
◆ redim()
| virtual StatusCode D3PD::ID3PD::redim |
( |
const Dim_t * | ptr | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: