| The Gaudi Framework v32r1 (f65d50dc)

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

`#include <GaudiKernel/DataHandleHolderVisitor.h>`

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

## Public Member Functions
| DHHVisitor (DataObjIDColl &ido, DataObjIDColl &odo)
const DataObjIDColl & | ignoredInpKeys () const
const DataObjIDColl & | ignoredOutKeys () const
void | visit (const IDataHandleHolder *visitee) override
Public Member Functions inherited from IDataHandleVisitor
virtual | ~IDataHandleVisitor ()=default

## Private Attributes
DataObjIDColl & | m_ido
DataObjIDColl & | m_odo
DataObjIDColl | m_ign_i
DataObjIDColl | m_ign_o

## Detailed Description

Definition at line 8 of file DataHandleHolderVisitor.h.

## Constructor & Destructor Documentation

## ◆ DHHVisitor()

DHHVisitor::DHHVisitor | ( | DataObjIDColl & | ido,
|  | DataObjIDColl & | odo
| ) |  |

Definition at line 13 of file DataHandleHolderVisitor.cpp.

13 : m_ido( ido ), m_odo( odo ) {}
DHHVisitor::m_ido
DataObjIDColl & m_ido
Definition: DataHandleHolderVisitor.h:18
DHHVisitor::m_odo
DataObjIDColl & m_odo
Definition: DataHandleHolderVisitor.h:18

## Member Function Documentation

## ◆ ignoredInpKeys()

const DataObjIDColl& DHHVisitor::ignoredInpKeys | ( |  | ) | const
| inline

Definition at line 12 of file DataHandleHolderVisitor.h.

12 { return m_ign_i; }
DHHVisitor::m_ign_i
DataObjIDColl m_ign_i
Definition: DataHandleHolderVisitor.h:19

## ◆ ignoredOutKeys()

const DataObjIDColl& DHHVisitor::ignoredOutKeys | ( |  | ) | const
| inline

Definition at line 13 of file DataHandleHolderVisitor.h.

13 { return m_ign_o; }
DHHVisitor::m_ign_o
DataObjIDColl m_ign_o
Definition: DataHandleHolderVisitor.h:19

## ◆ visit()

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

Implements IDataHandleVisitor.

Definition at line 15 of file DataHandleHolderVisitor.cpp.

15 {
16 if ( !v ) { return; }
17
18 // Loop over inputs and outputs of handles, extra dependiencies and objects to
19 // collect all of them.
20 // Handles and extra dependencies are those of a specific algorith or tool, while
21 // the collection of data objects also contains those of the tree of tools and
22 // algorithms below it.
23
24 // Loop over input handles and output handles and store those with with non-empty keys
25 // in the container of input objects passed to us and the others in a container of those
26 // we ignore for debug purposes. To avoid multiple for loops, make some tuples and loop
27 // over those.
28 for ( auto& hs : {make_tuple( v->inputHandles(), std::ref( m_ido ), std::ref( m_ign_i ) ),
29 make_tuple( v->outputHandles(), std::ref( m_odo ), std::ref( m_ign_o ) )} ) {
30 for ( const auto& h : std::get<0>( hs ) ) {
31 if ( !h->objKey().empty() ) {
32 std::get<1>( hs ).emplace( h->fullKey() );
33 } else {
34 std::get<2>( hs ).emplace( h->fullKey() );
35 }
36 }
37 }
38
39 // The containers of handles are a different type than the on of input deps and input
40 // objects, so we need another loop here.
41 // NOTE: perhaps a view from range v3 can be used to also avoid this second loop.
42 for ( auto& hs : {make_tuple( v->extraInputDeps(), std::ref( m_ido ), std::ref( m_ign_i ) ),
43 make_tuple( v->extraOutputDeps(), std::ref( m_odo ), std::ref( m_ign_o ) ),
44 make_tuple( v->inputDataObjs(), std::ref( m_ido ), std::ref( m_ign_i ) ),
45 make_tuple( v->outputDataObjs(), std::ref( m_odo ), std::ref( m_ign_o ) )} ) {
46 for ( const auto& h : std::get<0>( hs ) ) {
47 if ( !h.key().empty() ) {
48 std::get<1>( hs ).emplace( h );
49 } else {
50 std::get<2>( hs ).emplace( h );
51 }
52 }
53 }
54 }
DHHVisitor::m_ign_o
DataObjIDColl m_ign_o
Definition: DataHandleHolderVisitor.h:19
std::make_tuple
T make_tuple(T... args)
DHHVisitor::m_ign_i
DataObjIDColl m_ign_i
Definition: DataHandleHolderVisitor.h:19
DHHVisitor::m_ido
DataObjIDColl & m_ido
Definition: DataHandleHolderVisitor.h:18
std::ref
T ref(T... args)
DHHVisitor::m_odo
DataObjIDColl & m_odo
Definition: DataHandleHolderVisitor.h:18

## Member Data Documentation

## ◆ m_ido

DataObjIDColl& DHHVisitor::m_ido
| private

Definition at line 18 of file DataHandleHolderVisitor.h.

## ◆ m_ign_i

DataObjIDColl DHHVisitor::m_ign_i
| private

Definition at line 19 of file DataHandleHolderVisitor.h.

## ◆ m_ign_o

DataObjIDColl DHHVisitor::m_ign_o
| private

Definition at line 19 of file DataHandleHolderVisitor.h.

## ◆ m_odo

DataObjIDColl & DHHVisitor::m_odo
| private

Definition at line 18 of file DataHandleHolderVisitor.h.

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

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