![]() |
ATLAS Offline Software
|
Non-template parts of CollectionGetterTool.
More...
#include <CollectionGetterToolImpl.h>
Inherits extends< ObjGetterToolImpl, ICollectionGetterTool >.
Inherited by D3PD::CollectionGetterTool< CaloCalibrationHitContainer >, D3PD::CollectionGetterTool< INav4MomLinkContainer >, D3PD::CollectionGetterTool< IParticleLinks >, D3PD::CollectionGetterTool< LArHitContainer >, D3PD::CollectionGetterTool< LArRawChannelContainer >, D3PD::CollectionGetterTool< Obj4Container >, D3PD::CollectionGetterTool< TileDigitsContainer >, D3PD::CollectionGetterTool< TileHitVector >, D3PD::CollectionGetterTool< TileRawChannelContainer >, D3PD::CollectionGetterTool< TrackRecordCollection >, D3PD::CollectionGetterFilterToolImpl, D3PD::CollectionGetterTool< CONT >, and D3PD::SGDataVectorGetterTool.
Public Member Functions | |
| CollectionGetterToolImpl (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard Gaudi tool constructor. More... | |
| StatusCode | initialize () |
Standard Gaudi initialize method. More... | |
| const void * | nextTypeinfo (const std::type_info &ti) |
| Return the next object cast to a different pointer type. More... | |
| StatusCode | configureElementTypeinfo (const std::type_info &ti) |
| Test type compatibility. More... | |
| void | releaseElementTypeinfo (const void *p, const std::type_info &ti) |
| Release an element retrieved from the getter. More... | |
Private Attributes | |
| std::string | m_label |
| Property: label to assign to this getter (or null). More... | |
| ToolHandle< ICollectionGetterRegistryTool > | m_registry |
| The collection getter registry tool. More... | |
| TypeConverter | m_converter |
| Helper to convert pointers. More... | |
| TypeConverter | m_backConverter |
Helper to convert pointers back, for releaseElement. More... | |
Non-template parts of CollectionGetterTool.
CollectionGetterTool extends ObjGetterTool to allow iterating over the objects within a container. CollectionGetterTool is templated on the collection type. This class factors out the pieces that don't depend on the template argument.
Definition at line 40 of file CollectionGetterToolImpl.h.
| D3PD::CollectionGetterToolImpl::CollectionGetterToolImpl | ( | 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 28 of file CollectionGetterToolImpl.cxx.
| StatusCode D3PD::CollectionGetterToolImpl::configureElementTypeinfo | ( | const std::type_info & | ti | ) |
Test type compatibility.
| ti | The desired type. |
Test to see if the object being returned by the tool can be converted to a pointer to T. This can be used to perform type checks during job initialization.
Definition at line 146 of file CollectionGetterToolImpl.cxx.
| StatusCode D3PD::CollectionGetterToolImpl::initialize | ( | ) |
Return the next object cast to a different pointer type.
Return the next element from the collection as a pointer to the ti type. Return 0 if the pointer can't be converted or at the end of the iteration.
Definition at line 68 of file CollectionGetterToolImpl.cxx.
| void D3PD::CollectionGetterToolImpl::releaseElementTypeinfo | ( | const void * | p, |
| const std::type_info & | ti | ||
| ) |
Release an element retrieved from the getter.
| p | The element to release. |
| ti | The type of p. |
Call this when you are done with the element returned by nextUntyped(). The default implementation is a no-op, but if the getter dynamically allocated the object which it returned, this gives it a chance to free it.
Definition at line 104 of file CollectionGetterToolImpl.cxx.
|
private |
Helper to convert pointers back, for releaseElement.
Definition at line 106 of file CollectionGetterToolImpl.h.
|
private |
Helper to convert pointers.
Definition at line 103 of file CollectionGetterToolImpl.h.
|
private |
Property: label to assign to this getter (or null).
Definition at line 97 of file CollectionGetterToolImpl.h.
|
private |
The collection getter registry tool.
Definition at line 100 of file CollectionGetterToolImpl.h.
1.8.18