Non-template parts of BlockFillerTool
.
More...
#include <BlockFillerToolImpl.h>
Inherits extends< AthAlgTool, IBlockFillerTool >, and D3PD::AddVariable.
Inherited by D3PD::BlockFillerTool< AmgSymMatrix(5)>, D3PD::BlockFillerTool< CaloCalibrationHit >, D3PD::BlockFillerTool< CaloCell >, D3PD::BlockFillerTool< CaloCellContainer >, D3PD::BlockFillerTool< CaloTower >, D3PD::BlockFillerTool< D3PD::Types< Obj1, Obj2 > >, D3PD::BlockFillerTool< LArCollisionTime >, D3PD::BlockFillerTool< LArDigit >, D3PD::BlockFillerTool< LArHit >, D3PD::BlockFillerTool< LArHitContainer >, D3PD::BlockFillerTool< LArNoisyROSummary >, D3PD::BlockFillerTool< LArRawChannel >, D3PD::BlockFillerTool< MDTSimHit >, D3PD::BlockFillerTool< Obj1 >, D3PD::BlockFillerTool< Obj2 >, D3PD::BlockFillerTool< Obj4 >, D3PD::BlockFillerTool< Obj5 >, D3PD::BlockFillerTool< SG::AuxElement >, D3PD::BlockFillerTool< SkimDecisionCollection >, D3PD::BlockFillerTool< TileCell >, D3PD::BlockFillerTool< TileCosmicMuon >, D3PD::BlockFillerTool< TileDigits >, D3PD::BlockFillerTool< TileHit >, D3PD::BlockFillerTool< TileHitVector >, D3PD::BlockFillerTool< TileL2 >, D3PD::BlockFillerTool< TileMu >, D3PD::BlockFillerTool< TileRawChannel >, D3PD::BlockFillerTool< TileRawChannelCollection >, D3PD::BlockFillerTool< TileTrigger >, D3PD::BlockFillerTool< TileTTL1 >, D3PD::BlockFillerTool< TrackRecord >, D3PD::BlockFillerTool< Trk::Perigee >, D3PD::BlockFillerTool< Trk::TrackParameters >, D3PD::BlockFillerTool< Types< AmgSymMatrix(5), AmgSymMatrix(3), Amg::MatrixX > >, D3PD::BlockFillerTool< Types< CaloCluster, xAOD::CaloCluster > >, D3PD::BlockFillerTool< Types< INavigable4Momentum, I4Momentum, CLHEP::HepLorentzVector, xAOD::IParticle > >, D3PD::BlockFillerTool< Types< TrackRecord, xAOD::TruthParticle > >, D3PD::BlockFillerTool< Types< Trk::VxCandidate, xAOD::Vertex > >, D3PD::BlockFillerTool< Types< xAOD::Electron, xAOD::Photon > >, D3PD::BlockFillerTool< xAOD::CaloCluster >, D3PD::BlockFillerTool< xAOD::Egamma >, D3PD::BlockFillerTool< xAOD::EventInfo >, D3PD::BlockFillerTool< xAOD::Muon >, D3PD::BlockFillerTool< xAOD::Photon >, D3PD::BlockFillerTool< xAOD::TrackParticle >, D3PD::BlockFillerTool< xAOD::TruthParticle >, D3PD::BlockFillerTool< T >, D3PD::BlockFillerTool< Types< T0 > >, D3PD::BlockFillerTool< void >, D3PD::ContainerFlagFillerTool, and D3PD::IndexFillerTool.
|
| BlockFillerToolImpl (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Gaudi tool constructor. More...
|
|
StatusCode | configureD3PD (IAddVariable *tree) |
| Configure the parent tree. More...
|
|
virtual StatusCode | addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0) |
| Add a variable to the tuple. More...
|
|
template<class T > |
StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring="") |
| Make the template implementation from IAddVariable visible. More...
|
|
template<class T , class U > |
StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring, const U &defval) |
| Make the template implementation from IAddVariable visible. More...
|
|
virtual StatusCode | addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)=0 |
| Make the template implementation from IAddVariable visible. More...
|
|
template<class T > |
StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring="") |
| Add a variable to the tuple. More...
|
|
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. More...
|
|
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) |
| Add a variable to the tuple. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
Non-template parts of BlockFillerTool
.
The class BlockFillerTool
provides a type-safe wrapper for the IBlockFillerTool
interface; it is templated on the type of object on which it operates. This class serves as a common base class for the BlockFillerTool
instantiations, and factors out all the code that doesn't depend on the template argument.
We also derive from AddVariable
, so we provide the IAddVariable
interface.
Definition at line 42 of file BlockFillerToolImpl.h.
◆ BlockFillerToolImpl()
D3PD::BlockFillerToolImpl::BlockFillerToolImpl |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Gaudi tool constructor.
- Parameters
-
type | The name of the tool type. |
name | The tool name. |
parent | The tool's Gaudi parent. |
Definition at line 27 of file BlockFillerToolImpl.cxx.
33 declareProperty (
"Prefix",
m_prefix =
"",
34 "Tuple variable prefix for this block.");
35 declareProperty (
"Suffix",
m_suffix =
"",
36 "Tuple variable suffix for this block.");
38 "The name of this block.");
◆ addDimensionedVariable() [1/6]
StatusCode D3PD::AddVariable::addDimensionedVariable |
( |
const std::string & |
name, |
|
|
const std::type_info & |
ti, |
|
|
void *& |
ptr, |
|
|
const std::string & |
dim, |
|
|
const std::string & |
docstring = "" , |
|
|
const void * |
defval = 0 |
|
) |
| |
|
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
.
Implements D3PD::IAddVariable.
Definition at line 123 of file AddVariable.cxx.
133 return StatusCode::SUCCESS;
138 docstring, defval ) );
◆ addDimensionedVariable() [2/6]
virtual StatusCode D3PD::IAddVariable::addDimensionedVariable |
|
inherited |
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
.
◆ addDimensionedVariable() [3/6]
template<class T , class U >
StatusCode D3PD::IAddVariable::addDimensionedVariable |
( |
class T |
, |
|
|
class U |
|
|
) |
| |
|
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() [4/6]
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() [5/6]
template<class T >
StatusCode D3PD::IAddVariable::addDimensionedVariable |
( |
class T |
| ) |
|
|
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
.
◆ addDimensionedVariable() [6/6]
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
.
◆ addVariable() [1/6]
StatusCode D3PD::AddVariable::addVariable |
( |
const std::string & |
name, |
|
|
const std::type_info & |
ti, |
|
|
void *& |
ptr, |
|
|
const std::string & |
docstring = "" , |
|
|
const void * |
defval = 0 |
|
) |
| |
|
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
.
Implements D3PD::IAddVariable.
Definition at line 85 of file AddVariable.cxx.
94 return StatusCode::SUCCESS;
98 ti,
ptr, docstring, defval ) );
100 ti,
ptr, docstring, defval);
◆ addVariable() [2/6]
virtual StatusCode D3PD::IAddVariable::addVariable |
|
inherited |
◆ addVariable() [3/6]
template<class T , class U >
StatusCode D3PD::IAddVariable::addVariable |
( |
class T |
, |
|
|
class U |
|
|
) |
| |
|
inherited |
◆ addVariable() [4/6]
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() [5/6]
template<class T >
StatusCode D3PD::IAddVariable::addVariable |
( |
class T |
| ) |
|
|
inherited |
◆ addVariable() [6/6]
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
.
◆ configureD3PD()
StatusCode D3PD::AddVariable::configureD3PD |
( |
IAddVariable * |
tree | ) |
|
|
inherited |
Configure the parent tree.
- Parameters
-
Definition at line 61 of file AddVariable.cxx.
65 return StatusCode::SUCCESS;
◆ configureImpl() [1/2]
StatusCode D3PD::BlockFillerToolImpl::configureImpl |
( |
IAddVariable * |
tree, |
|
|
const std::type_info & |
ti, |
|
|
const std::type_info & |
fill_ti |
|
) |
| |
|
protected |
Configure during initialization: type-check.
- Parameters
-
tree | Our parent for tuple making. |
ti | Gives the type of the object being passed to fillUntyped . |
fill_ti | is the type of object that the user code will expect. |
This is the common implementation for the configureD3PD
method of IBlockFillerTool
. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.
Definition at line 55 of file BlockFillerToolImpl.cxx.
62 return StatusCode::SUCCESS;
◆ configureImpl() [2/2]
StatusCode D3PD::BlockFillerToolImpl::configureImpl |
( |
IAddVariable * |
tree, |
|
|
const std::type_info & |
ti, |
|
|
const std::vector< const std::type_info * > & |
tis, |
|
|
size_t & |
which |
|
) |
| |
|
protected |
Configure during initialization: type-check.
- Parameters
-
| tree | Our parent for tuple making. |
| ti | Gives the type of the object being passed to fillUntyped . |
| tis | List of possible input types that we can accept. |
[out] | which | Index of the accepted type. |
This is the common implementation for the configureD3PD
method of IBlockFillerTool
. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.
This version allows for one of a set of types to match. If successful, WHICH is set to the index (0-based) of the matching type.
Definition at line 83 of file BlockFillerToolImpl.cxx.
90 return StatusCode::SUCCESS;
◆ convert()
StatusCode D3PD::BlockFillerToolImpl::convert |
( |
void const *& |
p | ) |
const |
|
protected |
Do type conversion.
- Parameters
-
p[in,out] | Pointer to convert. |
On entry, p is a pointer to an object of the type that was passed into configureImpl
as ti
. Convert the pointer to point to an object of the type that was given as fill_ti
. If the conversion fails, the pointer is set to 0 (and FAILURE
is returned).
Definition at line 105 of file BlockFillerToolImpl.cxx.
112 return StatusCode::FAILURE;
114 return StatusCode::SUCCESS;
◆ m_blockName
std::string D3PD::BlockFillerToolImpl::m_blockName |
|
private |
◆ m_converter
◆ m_metadata
Metadata about the variables created by this object.
Definition at line 129 of file AddVariable.h.
◆ m_prefix
std::string D3PD::BlockFillerToolImpl::m_prefix |
|
private |
◆ m_suffix
std::string D3PD::BlockFillerToolImpl::m_suffix |
|
private |
◆ m_tree
◆ s_emptyString
const std::string D3PD::AddVariable::s_emptyString |
|
staticprivateinherited |
Used to provide a default value for blockName.
Definition at line 41 of file AddVariable.h.
The documentation for this class was generated from the following files: