ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
SG::detail::WDHScan Class Reference

Helper to scan a tree of components to search for another handle key potentially conflicting with the container key part of a WriteDecorHandleKey. More...

Inheritance diagram for SG::detail::WDHScan:
Collaboration diagram for SG::detail::WDHScan:

Public Member Functions

 WDHScan (const DataObjID &contHandleKey, const IDataHandleHolder *owner)
 Constructor. More...
 
virtual void visit (const IDataHandleHolder *h) override
 Called for each component in the tree. More...
 

Public Attributes

const DataObjID & m_contHandleKey
 The key we're searching for. More...
 
const IDataHandleHolder * m_owner
 Stop the search when we reach this component. More...
 
bool m_found = false
 Did we find the key? More...
 
bool m_sawOwner = false
 Have we reached m_owner yet? More...
 

Detailed Description

Helper to scan a tree of components to search for another handle key potentially conflicting with the container key part of a WriteDecorHandleKey.

Given a key, a tree of Gaudi components, and one (‘owner’) component within that tree, we search to see if any components occuring in the tree before ‘owner’ have a key that matches the one we're searching for.

Definition at line 81 of file WriteDecorHandleKey.cxx.

Constructor & Destructor Documentation

◆ WDHScan()

SG::detail::WDHScan::WDHScan ( const DataObjID &  contHandleKey,
const IDataHandleHolder *  owner 
)
inline

Constructor.

Parameters
contHandleKeykey to search for.
ownerThe ‘owner’ component, at which we stop the search.

Definition at line 90 of file WriteDecorHandleKey.cxx.

91  : m_contHandleKey (contHandleKey),
92  m_owner (owner)
93  {
94  }

Member Function Documentation

◆ visit()

void SG::detail::WDHScan::visit ( const IDataHandleHolder *  h)
overridevirtual

Called for each component in the tree.

Parameters
HComponent to visit.

Definition at line 117 of file WriteDecorHandleKey.cxx.

118 {
119  // Don't do anything if we've already found the key, or if we've seen m_owner.
120  if (m_found || m_sawOwner) return;
121  if (h == m_owner) {
122  m_sawOwner = true;
123  return;
124  }
125 
126  // Test to see if this component has a key matching the one we're looking for.
128 }

Member Data Documentation

◆ m_contHandleKey

const DataObjID& SG::detail::WDHScan::m_contHandleKey

The key we're searching for.

Definition at line 100 of file WriteDecorHandleKey.cxx.

◆ m_found

bool SG::detail::WDHScan::m_found = false

Did we find the key?

Definition at line 106 of file WriteDecorHandleKey.cxx.

◆ m_owner

const IDataHandleHolder* SG::detail::WDHScan::m_owner

Stop the search when we reach this component.

Definition at line 103 of file WriteDecorHandleKey.cxx.

◆ m_sawOwner

bool SG::detail::WDHScan::m_sawOwner = false

Have we reached m_owner yet?

Definition at line 109 of file WriteDecorHandleKey.cxx.


The documentation for this class was generated from the following file:
SG::detail::WDHScan::m_contHandleKey
const DataObjID & m_contHandleKey
The key we're searching for.
Definition: WriteDecorHandleKey.cxx:100
SG::detail::WDHScan::m_owner
const IDataHandleHolder * m_owner
Stop the search when we reach this component.
Definition: WriteDecorHandleKey.cxx:103
SG::detail::handleInHolder
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.
Definition: WriteDecorHandleKey.cxx:30
SG::detail::WDHScan::m_sawOwner
bool m_sawOwner
Have we reached m_owner yet?
Definition: WriteDecorHandleKey.cxx:109
h
SG::detail::WDHScan::m_found
bool m_found
Did we find the key?
Definition: WriteDecorHandleKey.cxx:106