31 const std::string& name,
32 const IInterface* parent)
39 "Label of the collection getter defining the collection "
40 "within which to index.");
41 declareProperty (
"Targets", m_targetLabels,
42 "List of labels of collection getters defining the "
43 "collections within which to index. "
44 "If Target is non-empty, it is considered to come "
45 "at the start of this list.");
46 declareProperty (
"ContainerIndexName", m_containerIndexName,
47 "Variable name to use for the index of the container "
48 "in which the object was found. Useful if more than "
49 "one target container is specified. Omitted if this "
51 declareProperty (
"CollectionGetterRegistry",
m_registry,
52 "The ICollectionGetterRegistryTool instance.");
54 "If true, then it is not considered an error for the "
55 "target getter to fail to find the input objects.");
67 return StatusCode::SUCCESS;
81 const std::type_info& ti)
89 <<
"Not booking index variable because no association targets exist: "
90 <<
m_map.formatLabels();
93 return StatusCode::SUCCESS;
104 if (
m_map.target()) {
105 std::string indexdoc =
"Index in ";
106 std::string contdoc =
"Container index: ";
113 for (
size_t i = 0; i < m_targetLabels.size(); i++) {
118 indexdoc += m_targetLabels[i];
119 std::ostringstream s;
120 s << n <<
" - " << m_targetLabels[i];
127 if (!m_containerIndexName.empty())
131 return StatusCode::SUCCESS;
162IndexFillerTool::fillUntyped (
const void* p,
170 std::pair<int, int> out =
m_map.findIndexPair (p);
172 if (m_containerIndex)
173 *m_containerIndex = out.second;
176 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
#define CHECK(...)
Evaluate an expression and check for errors.
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.
Common interface for adding a variable to a tuple.
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.
int * m_index
Index variable.
std::string m_targetLabel
Fill one block.