ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaBaseComps
src
AthAlgorithmDHUpdate.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration.
3
*/
4
// $Id$
11
12
13
#include "
AthAlgorithmDHUpdate.h
"
14
#include "
AthenaKernel/BaseInfo.h
"
15
16
17
namespace
AthenaBaseComps
{
18
19
25
AthAlgorithmDHUpdate::AthAlgorithmDHUpdate
(DataObjIDColl& linkedObjs,
26
std::unique_ptr<IDataHandleVisitor> chain)
27
:
m_linkedObjs
(linkedObjs),
28
m_chain
(
std
::move (chain))
29
{
30
}
31
32
40
void
AthAlgorithmDHUpdate::visit
(
const
IDataHandleHolder* dhh)
41
{
42
// Make a copy, as usually linkedObjs will be extraOutputDeps().
43
DataObjIDColl ex = dhh->extraOutputDeps();
44
45
// Process all output dependencies.
46
for
(
const
Gaudi::DataHandle*
h
: dhh->outputHandles()) {
47
if
(!
h
->objKey().empty())
48
handle
(
h
->fullKey().clid(),
h
->objKey());
49
}
50
51
for
(
const
DataObjID& dobj : ex) {
52
if
(!dobj.key().empty())
53
handle
(dobj.clid(), dobj.key());
54
}
55
56
for
(
const
DataObjID& dobj : dhh->outputDataObjs()) {
57
if
(!dobj.key().empty())
58
handle
(dobj.clid(), dobj.key());
59
}
60
61
// If we put anything in linkedObjs, also add the contents
62
// of extraOutputDeps.
63
if
(!
m_linkedObjs
.empty()) {
64
m_linkedObjs
.insert (ex.begin(), ex.end());
65
}
66
67
// Call the next hook function, if any.
68
if
(
m_chain
) {
69
m_chain
->visit (dhh);
70
}
71
}
72
73
81
void
AthAlgorithmDHUpdate::handle
(
CLID
clid,
const
std::string& key)
82
{
83
const
SG::BaseInfoBase
* bib =
SG::BaseInfoBase::find
(clid);
84
if
(!bib)
return
;
85
for
(
CLID
clid2 : bib->
get_bases
()) {
86
if
(clid2 != clid) {
87
m_linkedObjs
.emplace (clid2, key);
88
}
89
}
90
for
(
CLID
copy_clid : bib->
get_copy_conversions
()) {
91
if
(copy_clid != clid) {
92
m_linkedObjs
.emplace (copy_clid, key);
93
}
94
}
95
}
96
97
98
}
// namespace AthenaBaseComps
AthAlgorithmDHUpdate.h
Update output dependencies to include symlinks.
BaseInfo.h
Provide an interface for finding inheritance information at run time.
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
h
Header file for AthHistogramAlgorithm.
AthenaBaseComps::AthAlgorithmDHUpdate::AthAlgorithmDHUpdate
AthAlgorithmDHUpdate(DataObjIDColl &linkedObjs, std::unique_ptr< IDataHandleVisitor > chain)
Constructor.
Definition
AthAlgorithmDHUpdate.cxx:25
AthenaBaseComps::AthAlgorithmDHUpdate::m_linkedObjs
DataObjIDColl & m_linkedObjs
Set of additional output dependencies represented by links.
Definition
AthAlgorithmDHUpdate.h:75
AthenaBaseComps::AthAlgorithmDHUpdate::handle
void handle(CLID clid, const std::string &key)
Handle one output dependency.
Definition
AthAlgorithmDHUpdate.cxx:81
AthenaBaseComps::AthAlgorithmDHUpdate::visit
virtual void visit(const IDataHandleHolder *dhh) override
Walk over the dependencies of an algorithm.
Definition
AthAlgorithmDHUpdate.cxx:40
AthenaBaseComps::AthAlgorithmDHUpdate::m_chain
std::unique_ptr< IDataHandleVisitor > m_chain
Hook to call after this one.
Definition
AthAlgorithmDHUpdate.h:78
SG::BaseInfoBase
The non-template portion of the BaseInfo implementation.
Definition
Control/AthenaKernel/AthenaKernel/BaseInfo.h:451
SG::BaseInfoBase::find
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
Definition
BaseInfo.cxx:570
SG::BaseInfoBase::get_bases
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
Definition
BaseInfo.cxx:304
SG::BaseInfoBase::get_copy_conversions
std::vector< CLID > get_copy_conversions() const
Return known copy conversions.
Definition
BaseInfo.cxx:455
AthenaBaseComps
Definition
AthAlgorithmDHUpdate.cxx:17
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0