| The Gaudi Framework v32r1 (f65d50dc)

DataHandleFinder.cpp
Go to the documentation of this file.
1 #include "GaudiKernel/DataHandleFinder.h"
2
3 DataHandleFinder::DataHandleFinder( DataObjID const& target ) : m_target( target ) {}
4
5 void DataHandleFinder::visit( const IDataHandleHolder* visitee ) {
6 if ( !visitee ) { return; }
7
8 // See if the handle holder we're visiting contains the target
9 for ( auto& handle : visitee->inputHandles() ) {
10 if ( handle->fullKey() == m_target ) {
11 m_holderNames.push_back( visitee->name() );
12 return;
13 }
14 }
15
16 for ( auto& handle : visitee->extraInputDeps() ) {
17 if ( handle == m_target ) {
18 m_holderNames.push_back( visitee->name() );
19 return;
20 }
21 }
22
23 for ( auto& handle : visitee->inputDataObjs() ) {
24 if ( handle == m_target ) {
25 m_holderNames.push_back( visitee->name() );
26 return;
27 }
28 }
29 }
DataHandleFinder::visit
void visit(const IDataHandleHolder *visitee) override
Definition: DataHandleFinder.cpp:5
IDataHandleHolder::inputHandles
virtual std::vector< Gaudi::DataHandle * > inputHandles() const =0
DataObjID
Definition: DataObjID.h:37
IDataHandleHolder::inputDataObjs
virtual const DataObjIDColl & inputDataObjs() const =0
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::vector::push_back
T push_back(T... args)
IDataHandleHolder
Definition: IDataHandleHolder.h:14
DataHandleFinder::DataHandleFinder
DataHandleFinder(DataObjID const &target)
Definition: DataHandleFinder.cpp:3
DataHandleFinder.h
DataHandleFinder::m_target
DataObjID const & m_target
Definition: DataHandleFinder.h:29
DataHandleFinder::m_holderNames
std::vector< std::string > m_holderNames
Definition: DataHandleFinder.h:30
IDataHandleHolder::extraInputDeps
virtual const DataObjIDColl & extraInputDeps() const =0