28IndexAssociationFillerTool::IndexAssociationFillerTool
29 (
const std::string&
type,
30 const std::string& name,
31 const IInterface* parent)
32 : base_class (
type, name, parent),
38 declareProperty (
"Associator", m_associator,
39 "The ISingleAssociationTool instance.");
41 "Label of the collection getter defining the collection "
42 "within which to index.");
44 "Variable name prefix for the index variable.");
45 declareProperty (
"BlockName",
m_blockName = this->name(),
46 "The name of this block.");
47 declareProperty (
"CollectionGetterRegistry",
m_registry,
48 "The ICollectionGetterRegistryTool instance.");
50 "If true, then it is not considered an error for the "
51 "target getter to fail to find the input objects.");
59IndexAssociationFillerTool::initialize()
62 <<
"IndexAssociationFillerTool is deprecated; use instead "
63 <<
"ContainedAssociationFillerTool with IndexFillerTool. "
64 <<
"IndexAssociation.py should do that for you.";
66 CHECK( AthAlgTool::initialize() );
67 CHECK( m_associator.retrieve() );
71 CHECK( m_registry.retrieve() );
72 return StatusCode::SUCCESS;
85IndexAssociationFillerTool::configureD3PD (IAddVariable*
tree,
86 const std::type_info& ti)
88 CHECK( AddVariable::configureD3PD (
tree) );
89 CHECK( m_associator->configureD3PD (
this, ti) );
98 "D3PD::IndexAssociationFillerTool")
99 <<
"Not booking index variable because association target does not exist.";
102 return StatusCode::SUCCESS;
113 CHECK( m_associator->book () );
115 CHECK( addVariable (
"index", m_index) );
119 return StatusCode::SUCCESS;
150IndexAssociationFillerTool::fillUntyped (
const void* p,
161 const void*
pout = m_associator->getUntyped (p);
169 <<
"Pointer conversion from " <<
m_converter.srcName() <<
" to "
178 m_associator->releaseObjectUntyped (
pout);
181 return StatusCode::SUCCESS;
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
#define CHECK(...)
Evaluate an expression and check for errors.
Common implementation of IAddVariable.
virtual const std::type_info & elementTypeinfo() const =0
Return the element type of the collection.
ICollectionGetterTool * target()
Return the getter defining the first collection within which to index.
StatusCode configureD3PD()
Configure during initialization: type-check.
StatusCode reset()
Call before asking for an index. Rebuilds cache if needed.
StatusCode init(const std::type_info &src_ti, const std::type_info &dst_ti)
Initialize the converter.
Block filler tool for noisy FEB information.
ToolHandle< ICollectionGetterRegistryTool > m_registry
Property: The ICollectionGetterRegistryTool instance.
bool m_allowMissing
Property: Don't give an error if the target getter fails to find the input objects.
IndexMap m_map
Map from objects to indices.
TypeConverter m_converter
Helper to convert from pointer returned by the associator to pointer into the index container.
std::string m_prefix
Property: The variable name prefix.
std::string m_blockName
Property: the name of this block.
int * m_index
Index variable.
std::string m_targetLabel
Fill one block.
::StatusCode StatusCode
StatusCode definition for legacy code.
size_t m_index
The index of this element within its container. Should be 0 if this object is not within a container.