|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/ServiceHandle.h"
17 #include "GaudiKernel/IIncidentSvc.h"
32 const std::string& targetLabel,
33 ToolHandle<ICollectionGetterRegistryTool>&
registry,
34 const bool& allowMissing)
36 m_targetLabel (&targetLabel),
40 m_allowMissing (allowMissing),
59 const std::string& targetLabel,
60 const std::vector<std::string>& targetLabels,
61 ToolHandle<ICollectionGetterRegistryTool>&
registry,
62 const bool& allowMissing)
64 m_targetLabel (&targetLabel),
65 m_targetLabels (&targetLabels),
68 m_allowMissing (allowMissing),
81 ToolHandleArray<ICollectionGetterTool>& getters,
82 const bool& allowMissing)
88 m_allowMissing (allowMissing),
100 CHECK( incSvc.retrieve() );
101 incSvc->addListener (
this,
"EndEvent");
128 return StatusCode::SUCCESS;
148 return StatusCode::SUCCESS;
168 return StatusCode::SUCCESS;
216 if (inc.type() ==
"EndEvent")
238 m_map.insert (std::make_pair (cobj, std::make_pair(
idx++, (
int)
i)));
245 return StatusCode::SUCCESS;
277 if (
it->second.second ==
static_cast<int>(
i)) {
278 ret =
it->second.first;
296 std::pair<int, int> ret (-1, -1);
304 if (
it->second.second < ret.second)
JetConstituentVector::iterator iterator
ICollectionGetterTool * target()
Return the getter defining the first collection within which to index.
std::string formatLabels() const
Return list of all configured targets as a comma-separated string.
int findIndex(const void *p)
Find the index corresponding to an element.
INamedInterface * m_parent
The parent tool.
std::pair< int, int > findIndexPair(const void *p)
Find the (index,container) pair corresponding to an element.
StatusCode reset()
Call before asking for an index. Rebuilds cache if needed.
int ntargets()
Return the number of valid targets.
StatusCode configureCommon()
Common part of configuration.
bool valid() const
Return the valid flag.
Block filler tool for noisy FEB information.
::StatusCode StatusCode
StatusCode definition for legacy code.
IndexMap(INamedInterface *parent, const std::string &targetLabel, ToolHandle< ICollectionGetterRegistryTool > ®istry, const bool &allowMissing)
Constructor: for a single target.
ToolHandleArray< ICollectionGetterTool > * m_getters
Property for a direct list of getters.
#define CHECK(...)
Evaluate an expression and check for errors.
const std::vector< std::string > * m_targetLabels
Property for the label of the getter defining the list of target collections.
std::vector< ICollectionGetterTool * > m_targets
Getters defining the collections within which to index.
StatusCode configureD3PD()
Configure during initialization: type-check.
Helpers for checking error return status codes and reporting errors.
Cache pointer -> index mappings for a Getter used for index assocs.
def init(v_theApp, v_rootStream=None)
const bool & m_allowMissing
Property for the allowMissing flag.
bool m_valid
Flag if the map is valid.
const std::string * m_targetLabel
Property for the label of the getter defining the target collection.
std::vector< TypeConverter > m_converters
Converter for each target.
virtual const void * nextUntyped()=0
Return a pointer to the next element in the iteration.
virtual void handle(const Incident &inc)
Incident handler.
ToolHandle< ICollectionGetterRegistryTool > * m_registry
Property for the ICollectionGetterRegistryTool instance.