![]() |
ATLAS Offline Software
|
Classes | |
class | DataVectorAllocDummy |
class | IteratorBase |
class | WDHScan |
Helper to scan a tree of components to search for another handle key potentially conflicting with the container key part of a WriteDecorHandleKey . More... | |
Functions | |
bool | handleInHolder (const DataObjID &contHandleKey, const IDataHandleHolder &holder) |
Test to see if HOLDER has registered a handle key matching CONTHANDLEKEY, as either input or output. More... | |
const IDataHandleHolder * | findParent (const IDataHandleHolder *h) |
Find the top-level Gaudi component for H. More... | |
void | registerWriteDecorHandleKey (IDataHandleHolder *owner, const DataObjID &contHandleKey) |
Optionally register read dependency of a WriteDecorHandleKey . More... | |
Find the top-level Gaudi component for H.
H | The component at which to start the search. |
We're given a Gaudi component H as an IDataHandleHolder
. If this is an algorithm, return it. Otherwise, search up the list of parents to find either the owning algorithm or a top-level public tool or service.
Definition at line 58 of file WriteDecorHandleKey.cxx.
bool SG::detail::handleInHolder | ( | const DataObjID & | contHandleKey, |
const IDataHandleHolder & | holder | ||
) |
Test to see if HOLDER has registered a handle key matching CONTHANDLEKEY, as either input or output.
contHandleKey | The handle key to test. |
holder | The component to search. |
Definition at line 30 of file WriteDecorHandleKey.cxx.
void SG::detail::registerWriteDecorHandleKey | ( | IDataHandleHolder * | owner, |
const DataObjID & | contHandleKey | ||
) |
Optionally register read dependency of a WriteDecorHandleKey
.
A WriteDecorHandle
logically has a read dependency on the container itself. However, just declaring this as a usual ReadHandleKey
will cause problems if used in an algorithm that also creates the container: we'll get complaints from the Algorithm
base class about circular dependencies.
To deal with this, we don't declare the container ReadHandleKey
in declareProperty
. Instead, we wait until initialize
and declare the dependency with addDependency
only if it is not already on a handle list.
This issue also comes up across multiple tools in a single algorithm. For example, if an algorithm that has one tool that creates an container and another tool with a WriteDecorHandleKey, we can get a warning about a circular dependency. To suppress this for the common case, we also search the component tree under the algorithm and avoid adding the ReadHandleKey
if there's a matching component in the tree before the one owning the WriteDecorHandleKey. (We only do it for components earlier in the tree walk to make it less likely that we'll suppress the warning for a genuine use-before-write misconfiguration.)
Definition at line 154 of file WriteDecorHandleKey.cxx.