![]() |
ATLAS Offline Software
|
Non-template parts of BlockFillerTool.
More...
#include <BlockFillerToolImpl.h>
Inherits extends< AthAlgTool, IBlockFillerTool >, and D3PD::AddVariable.
Inherited by D3PD::BlockFillerTool< Types< CaloCluster, xAOD::CaloCluster > >, D3PD::BlockFillerTool< LArRawChannel >, D3PD::BlockFillerTool< TileRawChannelCollection >, D3PD::BlockFillerTool< TileRawChannel >, D3PD::BlockFillerTool< D3PD::Types< Obj1, Obj2 > >, D3PD::BlockFillerTool< Types< xAOD::Electron, xAOD::Photon > >, D3PD::BlockFillerTool< Types< INavigable4Momentum, I4Momentum, CLHEP::HepLorentzVector, xAOD::IParticle > >, D3PD::BlockFillerTool< xAOD::Muon >, D3PD::BlockFillerTool< Types< TrackRecord, xAOD::TruthParticle > >, D3PD::BlockFillerTool< Types< Trk::VxCandidate, xAOD::Vertex > >, D3PD::BlockFillerTool< xAOD::TruthParticle >, D3PD::BlockFillerTool< SG::AuxElement >, D3PD::BlockFillerTool< CaloCalibrationHit >, D3PD::BlockFillerTool< CaloCell >, D3PD::BlockFillerTool< CaloCellContainer >, D3PD::BlockFillerTool< Types< AmgSymMatrix(5), AmgSymMatrix(3), Amg::MatrixX > >, D3PD::BlockFillerTool< xAOD::EventInfo >, D3PD::BlockFillerTool< AmgSymMatrix(5)>, D3PD::BlockFillerTool< LArCollisionTime >, D3PD::BlockFillerTool< LArDigit >, D3PD::BlockFillerTool< LArHit >, D3PD::BlockFillerTool< LArNoisyROSummary >, D3PD::BlockFillerTool< LArHitContainer >, D3PD::BlockFillerTool< TileCell >, D3PD::BlockFillerTool< MDTSimHit >, D3PD::BlockFillerTool< Trk::Perigee >, D3PD::BlockFillerTool< Trk::TrackParameters >, D3PD::BlockFillerTool< SkimDecisionCollection >, D3PD::BlockFillerTool< xAOD::CaloCluster >, D3PD::BlockFillerTool< TileCosmicMuon >, D3PD::BlockFillerTool< TileDigits >, D3PD::BlockFillerTool< TileHit >, D3PD::BlockFillerTool< TileHitVector >, D3PD::BlockFillerTool< TileL2 >, D3PD::BlockFillerTool< TileMu >, D3PD::BlockFillerTool< TileTTL1 >, D3PD::BlockFillerTool< xAOD::TrackParticle >, D3PD::BlockFillerTool< TileTrigger >, D3PD::BlockFillerTool< CaloTower >, D3PD::BlockFillerTool< TrackRecord >, D3PD::BlockFillerTool< xAOD::Photon >, D3PD::BlockFillerTool< xAOD::Egamma >, D3PD::BlockFillerTool< Obj1 >, D3PD::BlockFillerTool< Obj2 >, D3PD::BlockFillerTool< Obj4 >, D3PD::BlockFillerTool< Obj5 >, D3PD::BlockFillerTool< Types< T0 > >, D3PD::BlockFillerTool< void >, D3PD::BlockFillerTool< T >, D3PD::BlockFillerTool< Types< T0 > >, D3PD::BlockFillerTool< void >, D3PD::ContainerFlagFillerTool, and D3PD::IndexFillerTool.
Public Member Functions | |
| BlockFillerToolImpl (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard Gaudi tool constructor. | |
| StatusCode | configureD3PD (IAddVariable *tree) |
| Configure the parent tree. | |
| 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. | |
| template<class T> | |
| StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring="") |
Make the template implementation from IAddVariable visible. | |
| 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. | |
| 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. | |
| 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. | |
Protected Member Functions | |
| StatusCode | configureImpl (IAddVariable *tree, const std::type_info &ti, const std::type_info &fill_ti) |
| Configure during initialization: type-check. | |
| StatusCode | configureImpl (IAddVariable *tree, const std::type_info &ti, const std::vector< const std::type_info * > &tis, size_t &which) |
| Configure during initialization: type-check. | |
| StatusCode | convert (void const *&p) const |
| Do type conversion. | |
Protected Attributes | |
| ObjectMetadata | m_metadata |
| Metadata about the variables created by this object. | |
Private Attributes | |
| std::string | m_prefix |
| Property: the variable prefix for this block. | |
| std::string | m_suffix |
| Property: the variable prefix for this block. | |
| std::string | m_blockName |
| Property: the name of this block. | |
| TypeConverter | m_converter |
| Helper to do type conversions. | |
| IAddVariable * | m_tree |
| Reference to the block name. | |
Static Private Attributes | |
| static const std::string | s_emptyString |
| Used to provide a default value for blockName. | |
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.
| D3PD::BlockFillerToolImpl::BlockFillerToolImpl | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Standard Gaudi tool constructor.
| 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.
|
virtualinherited |
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 123 of file AddVariable.cxx.
|
inherited |
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.
|
inherited |
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.
|
virtualinherited |
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 85 of file AddVariable.cxx.
|
inherited |
Make the template implementation from IAddVariable visible.
|
inherited |
Make the template implementation from IAddVariable visible.
|
inherited |
Configure the parent tree.
| tree | The parent IAddVariable instance. |
Definition at line 61 of file AddVariable.cxx.
|
protected |
Configure during initialization: type-check.
| 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.
|
protected |
Configure during initialization: type-check.
| 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.
|
protected |
Do type conversion.
| 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.
|
private |
Property: the name of this block.
Definition at line 118 of file BlockFillerToolImpl.h.
|
private |
Helper to do type conversions.
Definition at line 121 of file BlockFillerToolImpl.h.
|
protectedinherited |
Metadata about the variables created by this object.
Definition at line 129 of file AddVariable.h.
|
private |
Property: the variable prefix for this block.
Definition at line 112 of file BlockFillerToolImpl.h.
|
private |
Property: the variable prefix for this block.
Definition at line 115 of file BlockFillerToolImpl.h.
|
privateinherited |
Reference to the block name.
The parent IAddVariable instance.
Definition at line 143 of file AddVariable.h.
|
staticprivateinherited |
Used to provide a default value for blockName.
Definition at line 41 of file AddVariable.h.