| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
DataHandleFinder Class Reference

Implements the IDataHandleVisitor interface Class used to explore heirarchy of nested IDataHandleHolders. More...

`#include <GaudiKernel/DataHandleFinder.h>`

Inheritance diagram for DataHandleFinder:
[legend]
Collaboration diagram for DataHandleFinder:
[legend]

## Public Member Functions
| DataHandleFinder (DataObjID const &target)
void | visit (const IDataHandleHolder *visitee) override
std::vector< std::string > & | holderNames ()
Public Member Functions inherited from IDataHandleVisitor
virtual | ~IDataHandleVisitor ()=default

## Private Attributes
DataObjID const & | m_target
std::vector< std::string > | m_holderNames

## Detailed Description

Implements the IDataHandleVisitor interface Class used to explore heirarchy of nested IDataHandleHolders.

- Instantiated with a specific target data object to find
- Descends heirarchy of tools, examining all data handles
- Returns a vector of tool/algorithm names that own handles to the target data

Author
  Ben Wynne

Definition at line 21 of file DataHandleFinder.h.

## Constructor & Destructor Documentation

## ◆ DataHandleFinder()

DataHandleFinder::DataHandleFinder | ( | DataObjID const & | target | ) |

Definition at line 3 of file DataHandleFinder.cpp.

3 : m_target( target ) {}
DataHandleFinder::m_target
DataObjID const & m_target
Definition: DataHandleFinder.h:29

## Member Function Documentation

## ◆ holderNames()

std::vector<std::string>& DataHandleFinder::holderNames | ( |  | ) |
| inline

Definition at line 26 of file DataHandleFinder.h.

26 { return m_holderNames; }
DataHandleFinder::m_holderNames
std::vector< std::string > m_holderNames
Definition: DataHandleFinder.h:30

## ◆ visit()

void DataHandleFinder::visit | ( | const IDataHandleHolder * | visitee | ) |
| override virtual

Implements IDataHandleVisitor.

Definition at line 5 of file DataHandleFinder.cpp.

5 {
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 }
IDataHandleHolder::inputHandles
virtual std::vector< Gaudi::DataHandle * > inputHandles() const =0
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)
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

## Member Data Documentation

## ◆ m_holderNames

std::vector<std::string> DataHandleFinder::m_holderNames
| private

Definition at line 30 of file DataHandleFinder.h.

## ◆ m_target

DataObjID const& DataHandleFinder::m_target
| private

Definition at line 29 of file DataHandleFinder.h.

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/DataHandleFinder.h
- GaudiKernel/src/Lib/DataHandleFinder.cpp