#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/DataHandleHolderVisitor.h>
Definition at line 20 of file DataHandleHolderVisitor.h.
◆ Owners
◆ DHHVisitor()
◆ empty()
bool DHHVisitor::empty |
( |
| ) |
const |
return true if no DataHandle was found
Definition at line 122 of file DataHandleHolderVisitor.cpp.
122 {
123
124
126}
std::map< DataObjID, std::set< const IDataHandleHolder * > > m_owners
◆ ignoredInpKeys()
◆ ignoredOutKeys()
◆ owners()
◆ owners_names_of()
std::vector< std::string > DHHVisitor::owners_names_of |
( |
const DataObjID & | id, |
|
|
bool | with_main = false ) const |
Definition at line 82 of file DataHandleHolderVisitor.cpp.
82 {
83 std::vector<std::string> tmp;
85 if ( with_main || owner->name() !=
m_initialName ) tmp.push_back( owner->name() );
86 }
87 if ( !tmp.empty() ) { std::sort( tmp.begin(), tmp.end() ); }
88 return tmp;
89}
std::vector< const IDataHandleHolder * > owners_of(const DataObjID &id) const
std::string m_initialName
◆ owners_of()
◆ report()
Definition at line 91 of file DataHandleHolderVisitor.cpp.
91 {
92
93
94 auto sort = [](
const DataObjID& a,
const DataObjID& b ) ->
bool {
return a.
fullKey() < b.fullKey(); };
95 auto orderset = [&sort](
const DataObjIDColl& in ) -> std::set<DataObjID,
decltype( sort )> {
96 return { in.begin(), in.end(), sort };
97 };
98 auto write_owners_of = [
this](
auto&
stream,
const DataObjID&
id ) {
100 if ( !tmp.empty() ) {
stream <<
' ' << tmp; }
101 };
102
103 for (
auto h : orderset(
m_ido ) ) {
105 write_owners_of( stream, h );
106 }
107 for (
auto id : orderset(
m_ign_i ) ) {
108 stream <<
"\n + INPUT IGNORED " <<
id;
109 write_owners_of( stream, id );
110 }
111 for (
auto h : orderset(
m_odo ) ) {
113 write_owners_of( stream, h );
114 }
115 for (
auto id : orderset(
m_ign_o ) ) {
116 stream <<
"\n + OUTPUT IGNORED " <<
id;
117 write_owners_of( stream, id );
118 }
120}
std::unordered_set< DataObjID, DataObjID_Hasher > DataObjIDColl
std::vector< std::string > owners_names_of(const DataObjID &id, bool with_main=false) const
std::string fullKey() const
combination of the key and the ClassName, mostly for debugging
◆ visit()
Implements IDataHandleVisitor.
Definition at line 26 of file DataHandleHolderVisitor.cpp.
26 {
27 if ( !v ) { return; }
28
29
31
32
33
34
35
36
37
38
39
40
41
42 for (
auto& hs : { make_tuple(
v->inputHandles(), std::ref(
m_ido ), std::ref(
m_ign_i ) ),
43 make_tuple(
v->outputHandles(), std::ref(
m_odo ), std::ref(
m_ign_o ) ) } ) {
44 for ( const auto& h : std::get<0>( hs ) ) {
45 if ( !
h->objKey().empty() ) {
46 std::get<1>( hs ).emplace(
h->fullKey() );
47 } else {
48 std::get<2>( hs ).emplace(
h->fullKey() );
49 }
51 }
52 }
53
54 for (
auto&
id :
v->extraInputDeps() ) {
m_owners[
id].emplace( v ); }
55 for (
auto&
id :
v->extraOutputDeps() ) {
m_owners[
id].emplace( v ); }
56
57
58
59
60 for (
auto& hs : { make_tuple(
v->extraInputDeps(), std::ref(
m_ido ), std::ref(
m_ign_i ) ),
61 make_tuple(
v->extraOutputDeps(), std::ref(
m_odo ), std::ref(
m_ign_o ) ),
62 make_tuple(
v->inputDataObjs(), std::ref(
m_ido ), std::ref(
m_ign_i ) ),
63 make_tuple(
v->outputDataObjs(), std::ref(
m_odo ), std::ref(
m_ign_o ) ) } ) {
64 for ( const auto& h : std::get<0>( hs ) ) {
65 if ( !
h.key().empty() ) {
66 std::get<1>( hs ).emplace( h );
67 } else {
68 std::get<2>( hs ).emplace( h );
69 }
71 }
72 }
73}
◆ operator<<
◆ m_ido
◆ m_ign_i
◆ m_ign_o
◆ m_initialName
std::string DHHVisitor::m_initialName |
|
private |
◆ m_odo
◆ m_owners
The documentation for this class was generated from the following files: