ATLAS Offline Software
Loading...
Searching...
No Matches
SG::WriteHandleKey< T > Class Template Reference

Property holding a SG store/key/clid from which a WriteHandle is made. More...

#include <WriteHandleKey.h>

Inherits SG::VarHandleKey.

Inherited by SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer >, SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >, SG::WriteDecorHandleKey< xAOD::UncalibratedMeasurementContainer >, SG::WriteDecorHandleKey< xAOD::TruthParticleContainer >, SG::WriteDecorHandleKey< xAOD::EventInfo >, SG::WriteDecorHandleKey< xAOD::JetContainer >, SG::WriteDecorHandleKey< xAOD::ElectronContainer >, SG::WriteDecorHandleKey< DataVector< T > >, and SG::WriteDecorHandleKey< T >.

Collaboration diagram for SG::WriteHandleKey< T >:

Public Types

using PropertyType = SG::VarHandleKeyProperty
 Declare corresponding property type.

Public Member Functions

 WriteHandleKey (const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
 Constructor.
template<std::derived_from< IProperty > OWNER>
 WriteHandleKey (OWNER *owner, std::string name, const std::string &key={}, std::string doc="")
 auto-declaring Property Constructor.
WriteHandleKeyoperator= (const std::string &sgkey)
 Change the key of the object to which we're referring.
virtual StatusCode assign (const std::string &sgkey)
 Change the key of the object to which we're referring.
StatusCode initialize (bool used=true)
 If this object is used as a property, then this should be called during the initialize phase.
StatusCode initialize (AllowEmptyEnum)
 If this object is used as a property, then this should be called during the initialize phase.
CLID clid () const
 Return the class ID for the referenced object.
const std::string & key () const
 Return the StoreGate ID for the referenced object.
bool empty () const
 Test if the key is blank.
const ServiceHandle< IProxyDict > & storeHandle () const
 Return handle to the referenced store.
VarHandleBaseowningHandle ()
 Return the VarHandle that owns this key, if any.
bool isEventStore () const
 Does this key reference the primary event store?
virtual StatusCode start ()
 Called by the owning algorithm during the START transition.
SG::sgkey_t hashedKey () const
 Return the hashed StoreGate key.

Static Public Attributes

static constexpr bool isDecorHandleKey = false

Protected Member Functions

virtual std::string pythonRepr () const override
 Python representation of Handle.

Private Member Functions

void setOwningHandle (VarHandleBase *handle)
virtual void setKey (DataObjID key) override final
 Don't allow calling these.
virtual void updateKey (std::string key) override final
 Prevent this method from being called.
void parseKey (const std::string &sgkey, const std::string &storeName)
 Handle assignment/construction from a string key.
void updateHandle (const std::string &name)
 Update the name of the store to which we're referring.

Private Attributes

ServiceHandle< IProxyDictm_storeHandle
 Handle to the referenced store.
std::string m_sgKey
 StoreGate key, that doesn't include the storename.
SG::sgkey_t m_hashedKey = 0
 The hashed StoreGate key. May be 0 if not yet initialized.
bool m_isEventStore = false
 Cache test for whether we're referencing the event store.
VarHandleBasem_owningHandle = nullptr
 Handle that owns this key, or nullptr if it is not owned.

Detailed Description

template<class T>
class SG::WriteHandleKey< T >

Property holding a SG store/key/clid from which a WriteHandle is made.

This class holds the key part of a WriteHandle. For a reentrant algorithm, you would use this as the algorithm property and construct the actual ReadHandle on the stack from this key object (and optionally the event context).

See VarHandleKey for more details.

Definition at line 38 of file StoreGate/StoreGate/WriteHandleKey.h.

Member Typedef Documentation

◆ PropertyType

Declare corresponding property type.

Definition at line 90 of file StoreGate/StoreGate/VarHandleKey.h.

Constructor & Destructor Documentation

◆ WriteHandleKey() [1/2]

template<class T>
SG::WriteHandleKey< T >::WriteHandleKey ( const std::string & key = "",
const std::string & storeName = StoreID::storeName(StoreID::EVENT_STORE) )
explicit

Constructor.

Parameters
keyThe StoreGate key for the object.
storeNameName to use for the store, if it's not encoded in sgkey.

The provided key may actually start with the name of the store, separated by a "+": "MyStore+Obj". If no "+" is present the store named by storeName is used.

◆ WriteHandleKey() [2/2]

template<class T>
template<std::derived_from< IProperty > OWNER>
SG::WriteHandleKey< T >::WriteHandleKey ( OWNER * owner,
std::string name,
const std::string & key = {},
std::string doc = "" )
inline

auto-declaring Property Constructor.

Parameters
ownerOwning component.
namename of the Property
keydefault StoreGate key for the object.
docDocumentation string.

will associate the named Property with this WHK via declareProperty

The provided key may actually start with the name of the store, separated by a "+": "MyStore+Obj". If no "+" is present the store named by storeName is used.

Member Function Documentation

◆ assign()

StatusCode SG::VarHandleKey::assign ( const std::string & sgkey)
virtualinherited

Change the key of the object to which we're referring.

Parameters
sgkeyThe StoreGate key for the object.

The provided key may actually start with the name of the store, separated by a "+": "MyStore+Obj". If no "+" is present the store is not changed. A key name that starts with a slash is interpreted as a hierarchical key name, not an empty store name.

Returns failure the key string format is bad.

Reimplemented in SG::ReadDecorHandleKey< T >, SG::ReadDecorHandleKey< C >, SG::ReadDecorHandleKey< CONSTITUENTS >, SG::ReadDecorHandleKey< CONTAINER >, SG::ReadDecorHandleKey< DataVector< C_v1 > >, SG::ReadDecorHandleKey< DataVector< CaloCluster_v1 > >, SG::ReadDecorHandleKey< DataVector< ExampleElectron_v1 > >, SG::ReadDecorHandleKey< DataVector< IParticle > >, SG::ReadDecorHandleKey< DataVector< JVec_v1 > >, SG::ReadDecorHandleKey< DataVector< PLinks_v1 > >, SG::ReadDecorHandleKey< DataVector< TrigComposite_v1 > >, SG::ReadDecorHandleKey< DataVector< TruthParticle_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::DiTauJet_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::eFexTauRoI_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Egamma_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Electron_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::FlowElement_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Jet_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::jFexTauRoI_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Muon_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::MuonRoI_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::MuonSegment_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Photon_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::SpacePoint_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TauJet_v3 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TrackMeasurementValidation_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TrackParticle_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TriggerTower_v2 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Vertex_v1 > >, SG::ReadDecorHandleKey< DataVector< ZdcModule_v1 > >, SG::ReadDecorHandleKey< DMTest::C_v1 >, SG::ReadDecorHandleKey< DMTest::JVec_v1 >, SG::ReadDecorHandleKey< DMTest::PLinks_v1 >, SG::ReadDecorHandleKey< JetContainer >, SG::ReadDecorHandleKey< MyDataObj >, SG::ReadDecorHandleKey< SG::AuxElement >, SG::ReadDecorHandleKey< T_Cont >, SG::ReadDecorHandleKey< T_RoIContainer >, SG::ReadDecorHandleKey< xAOD::EventInfo >, SG::ReadDecorHandleKey< xAOD::EventInfo_v1 >, SG::ReadDecorHandleKey< xAOD::FlowElement_v1 >, SG::ReadDecorHandleKey< xAOD::IParticleContainer >, SG::ReadDecorHandleKey< xAOD::PFO_v1 >, SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >, SG::TypelessWriteHandleKey, SG::WriteDecorHandleKey< T >, SG::WriteDecorHandleKey< C >, SG::WriteDecorHandleKey< CONTAINER >, SG::WriteDecorHandleKey< container_t >, SG::WriteDecorHandleKey< DataVector< C_v1 > >, SG::WriteDecorHandleKey< DataVector< CaloCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< ExampleElectron_v1 > >, SG::WriteDecorHandleKey< DataVector< H_v2 > >, SG::WriteDecorHandleKey< DataVector< IParticle > >, SG::WriteDecorHandleKey< DataVector< JVec_v1 > >, SG::WriteDecorHandleKey< DataVector< MdtDriftCircle_v1 > >, SG::WriteDecorHandleKey< DataVector< MuonMeasurement_v1 > >, SG::WriteDecorHandleKey< DataVector< PLinks_v1 > >, SG::WriteDecorHandleKey< DataVector< RpcMeasurement_v1 > >, SG::WriteDecorHandleKey< DataVector< RpcStrip_v1 > >, SG::WriteDecorHandleKey< DataVector< T > >, SG::WriteDecorHandleKey< DataVector< TgcStrip_v1 > >, SG::WriteDecorHandleKey< DataVector< TrigComposite_v1 > >, SG::WriteDecorHandleKey< DataVector< TruthParticle_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::BTagging_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::DiTauJet_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexEMRoI > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexEMRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTauRoI > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTauRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTower_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Egamma_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Electron_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::FlowElement_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexGlobalRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexTower_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::HGTDCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Jet_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::JetRoI_v2 > >, SG::WriteDecorHandleKey< DataVector< xAOD::jFexLRJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::jFexSRJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::jFexTower_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Muon_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::MuonSegment_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::PFO_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Photon_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::PixelCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::SpacePoint_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::StripCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TauJet_v3 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TrackMeasurementValidation_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TrackParticle_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TriggerTower_v2 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Vertex_v1 > >, SG::WriteDecorHandleKey< DataVector< ZdcModule_v1 > >, SG::WriteDecorHandleKey< DMTest::C_v1 >, SG::WriteDecorHandleKey< DMTest::CVecWithData_v1 >, SG::WriteDecorHandleKey< DMTest::JVec_v1 >, SG::WriteDecorHandleKey< DMTest::PLinks_v1 >, SG::WriteDecorHandleKey< MyDataObj >, SG::WriteDecorHandleKey< SG::AuxElement >, SG::WriteDecorHandleKey< T_RoIContainer >, SG::WriteDecorHandleKey< xAOD::ElectronContainer >, SG::WriteDecorHandleKey< xAOD::EventInfo >, SG::WriteDecorHandleKey< xAOD::EventInfo_v1 >, SG::WriteDecorHandleKey< xAOD::JetContainer >, SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer >, SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >, SG::WriteDecorHandleKey< xAOD::TruthParticleContainer >, and SG::WriteDecorHandleKey< xAOD::UncalibratedMeasurementContainer >.

Definition at line 88 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.

89{
90 m_sgKey = sgkey;
91 return StatusCode::SUCCESS;
92}
std::string m_sgKey
StoreGate key, that doesn't include the storename.
sgkey(tool)
Definition common.py:1027

◆ clid()

CLID SG::VarHandleKey::clid ( ) const
inherited

Return the class ID for the referenced object.

Definition at line 188 of file StoreGate/src/VarHandleKey.cxx.

189{
190 return Gaudi::DataHandle::fullKey().clid();
191}

◆ empty()

bool SG::VarHandleKey::empty ( ) const
inherited

Test if the key is blank.

Definition at line 150 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.

151{
152 return m_sgKey.empty();
153}

◆ hashedKey()

SG::sgkey_t SG::VarHandleKey::hashedKey ( ) const
inherited

Return the hashed StoreGate key.

May be 0 if not yet initialized.

◆ initialize() [1/2]

StatusCode SG::VarHandleKey::initialize ( AllowEmptyEnum )
inherited

If this object is used as a property, then this should be called during the initialize phase.

This variant will allow the key to be blank.

Parameters
Flagto select this variant. Call like
ATH_CHECK( key.initialize (SG::AllowEmpty) );
#define ATH_CHECK
Evaluate an expression and check for errors.
const std::string & key() const
Return the StoreGate ID for the referenced object.

Definition at line 129 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.

130{
131 if (key().empty()) {
132 return StatusCode::SUCCESS;
133 }
134 return initialize (true);
135}
bool empty() const
Test if the key is blank.
void initialize()

◆ initialize() [2/2]

StatusCode SG::VarHandleKey::initialize ( bool used = true)
inherited

If this object is used as a property, then this should be called during the initialize phase.

It will fail if the requested StoreGate service cannot be found or if the key is blank.

Parameters
usedIf false, then this handle is not to be used. Instead of normal initialization, the key will be cleared.

Definition at line 103 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.

104{
105 if (!used) {
106 m_sgKey = "";
107 return StatusCode::SUCCESS;
108 }
109
110 if (key() == "") {
111 // REPORT_ERROR (StatusCode::FAILURE)
112 // << "Cannot initialize a Read/Write/Update handle with a null key.";
113 return StatusCode::FAILURE;
114 }
115
116 return StatusCode::SUCCESS;
117}

◆ isEventStore()

bool SG::VarHandleKey::isEventStore ( ) const
inherited

Does this key reference the primary event store?

◆ key()

const std::string & SG::VarHandleKey::key ( ) const
inherited

Return the StoreGate ID for the referenced object.

Definition at line 141 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.

142{
143 return m_sgKey;
144}

◆ operator=()

template<class T>
WriteHandleKey & SG::WriteHandleKey< T >::operator= ( const std::string & sgkey)

Change the key of the object to which we're referring.

Parameters
sgkeyThe StoreGate key for the object.

The provided key may actually start with the name of the store, separated by a "+": "MyStore+Obj". If no "+" is present, the store is not changed.

◆ owningHandle()

VarHandleBase * SG::VarHandleKey::owningHandle ( )
inherited

Return the VarHandle that owns this key, if any.

This should only be non-null for keys that are created automatically by a VarHandle when it is not created from a VarHandleKey. This should always be null for keys that are created explicitly.

◆ parseKey()

void SG::VarHandleKey::parseKey ( const std::string & key,
const std::string & storeName )
privateinherited

Handle assignment/construction from a string key.

Parameters
sgkeyThe StoreGate key for the referenced object.

The provided key may actually start with the name of the store, separated by a "+": "MyStore+Obj". If no "+" is present, the store named by storeName is used. A key name that starts with a slash is interpreted as a hierarchical key name, not an empty store name.

see implementation comments for further details

Parameters
sgkeyThe StoreGate key for the referenced object.

The provided key may actually start with the name of the store, separated by a "+": "MyStore+Obj". If no "+" is present the store named by storeName is used. A key name that starts with a slash is interpreted as a hierarchical key name, not an empty store name.

we also have to check that if the key contains the store name, it matches the store name that they Handle was constructed with

blank keys result in blank DataObjIDs

Definition at line 228 of file StoreGate/src/VarHandleKey.cxx.

230{
231 std::string sn;
232 // test if storeName has classname
233 std::string::size_type sp = storeName.find('/');
234 if (sp == std::string::npos) {
235 sn = storeName;
236 } else {
237 sn = storeName.substr(sp+1,storeName.length()-sp+1);
238 }
239
240 if (key.empty()) {
241 this->updateHandle(sn);
242 Gaudi::DataHandle::updateKey("");
243 m_sgKey.clear();
244 m_hashedKey = 0;
245 return;
246 }
247
248 // StoreName separator is "+"
249 sp = key.find(storeSeparator);
250 if(sp == std::string::npos) {
251 m_sgKey = key;
252 } else {
253 sn = key.substr(0,sp);
254 m_sgKey = key.substr(sp+1,key.length()-sp-1);
255 }
256
257
258 this->updateHandle(sn);
259
261 // would be nice if we could get the storeID from the storeHandle, but
262 // we can't be sure that the store has been created when the VHK is
263 // constructed.
264 //
265
267
269 if (m_sgKey.find('/') != std::string::npos) {
270 throw SG::ExcBadHandleKey("key \"" + key
271 + "\": keys with \"/\" only allowed for "
273 + " - store is \""
274 + sn + "\"");
275 }
276 } else {
277 sp = m_sgKey.rfind('/');
278 if (sp != std::string::npos) {
279 if (sp == 0
280 && m_sgKey.size() == 1) {
281 // Replace '\' with blank key
282 m_sgKey.clear();
283 m_hashedKey = 0;
284 } else if ( sp == m_sgKey.length()-1) {
285 throw SG::ExcBadHandleKey("key \"" + key
286 + "\": must not end with a \"/\"");
287 }
288 }
289 }
290
291 if (m_sgKey.empty()) {
292 Gaudi::DataHandle::updateKey("");
293 } else {
294 Gaudi::DataHandle::updateKey(sn + storeSeparator + m_sgKey);
295 }
296
297
298}
static Double_t sp
constexpr char const storeSeparator
SG::sgkey_t m_hashedKey
The hashed StoreGate key. May be 0 if not yet initialized.
void updateHandle(const std::string &name)
Update the name of the store to which we're referring.
@ CONDITION_STORE
Definition StoreID.h:28
@ METADATA_STORE
Definition StoreID.h:29
static const std::string & storeName(const StoreID::type &s)
Definition StoreID.cxx:77
static StoreID::type findStoreID(const std::string &storeName)
Definition StoreID.cxx:21

◆ pythonRepr()

std::string SG::VarHandleKey::pythonRepr ( ) const
overrideprotectedvirtualinherited

Python representation of Handle.

Reimplemented in SG::ReadDecorHandleKey< T >, SG::ReadDecorHandleKey< C >, SG::ReadDecorHandleKey< CONSTITUENTS >, SG::ReadDecorHandleKey< CONTAINER >, SG::ReadDecorHandleKey< DataVector< C_v1 > >, SG::ReadDecorHandleKey< DataVector< CaloCluster_v1 > >, SG::ReadDecorHandleKey< DataVector< ExampleElectron_v1 > >, SG::ReadDecorHandleKey< DataVector< IParticle > >, SG::ReadDecorHandleKey< DataVector< JVec_v1 > >, SG::ReadDecorHandleKey< DataVector< PLinks_v1 > >, SG::ReadDecorHandleKey< DataVector< TrigComposite_v1 > >, SG::ReadDecorHandleKey< DataVector< TruthParticle_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::DiTauJet_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::eFexTauRoI_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Egamma_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Electron_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::FlowElement_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Jet_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::jFexTauRoI_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Muon_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::MuonRoI_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::MuonSegment_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Photon_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::SpacePoint_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TauJet_v3 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TrackMeasurementValidation_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TrackParticle_v1 > >, SG::ReadDecorHandleKey< DataVector< xAOD::TriggerTower_v2 > >, SG::ReadDecorHandleKey< DataVector< xAOD::Vertex_v1 > >, SG::ReadDecorHandleKey< DataVector< ZdcModule_v1 > >, SG::ReadDecorHandleKey< DMTest::C_v1 >, SG::ReadDecorHandleKey< DMTest::JVec_v1 >, SG::ReadDecorHandleKey< DMTest::PLinks_v1 >, SG::ReadDecorHandleKey< JetContainer >, SG::ReadDecorHandleKey< MyDataObj >, SG::ReadDecorHandleKey< SG::AuxElement >, SG::ReadDecorHandleKey< T_Cont >, SG::ReadDecorHandleKey< T_RoIContainer >, SG::ReadDecorHandleKey< xAOD::EventInfo >, SG::ReadDecorHandleKey< xAOD::EventInfo_v1 >, SG::ReadDecorHandleKey< xAOD::FlowElement_v1 >, SG::ReadDecorHandleKey< xAOD::IParticleContainer >, SG::ReadDecorHandleKey< xAOD::PFO_v1 >, SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >, SG::WriteDecorHandleKey< T >, SG::WriteDecorHandleKey< C >, SG::WriteDecorHandleKey< CONTAINER >, SG::WriteDecorHandleKey< container_t >, SG::WriteDecorHandleKey< DataVector< C_v1 > >, SG::WriteDecorHandleKey< DataVector< CaloCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< ExampleElectron_v1 > >, SG::WriteDecorHandleKey< DataVector< H_v2 > >, SG::WriteDecorHandleKey< DataVector< IParticle > >, SG::WriteDecorHandleKey< DataVector< JVec_v1 > >, SG::WriteDecorHandleKey< DataVector< MdtDriftCircle_v1 > >, SG::WriteDecorHandleKey< DataVector< MuonMeasurement_v1 > >, SG::WriteDecorHandleKey< DataVector< PLinks_v1 > >, SG::WriteDecorHandleKey< DataVector< RpcMeasurement_v1 > >, SG::WriteDecorHandleKey< DataVector< RpcStrip_v1 > >, SG::WriteDecorHandleKey< DataVector< T > >, SG::WriteDecorHandleKey< DataVector< TgcStrip_v1 > >, SG::WriteDecorHandleKey< DataVector< TrigComposite_v1 > >, SG::WriteDecorHandleKey< DataVector< TruthParticle_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::BTagging_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::DiTauJet_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexEMRoI > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexEMRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTauRoI > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTauRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTower_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Egamma_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Electron_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::FlowElement_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexGlobalRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexTower_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::HGTDCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Jet_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::JetRoI_v2 > >, SG::WriteDecorHandleKey< DataVector< xAOD::jFexLRJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::jFexSRJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::jFexTower_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Muon_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::MuonSegment_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::PFO_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Photon_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::PixelCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::SpacePoint_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::StripCluster_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TauJet_v3 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TrackMeasurementValidation_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TrackParticle_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::TriggerTower_v2 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Vertex_v1 > >, SG::WriteDecorHandleKey< DataVector< ZdcModule_v1 > >, SG::WriteDecorHandleKey< DMTest::C_v1 >, SG::WriteDecorHandleKey< DMTest::CVecWithData_v1 >, SG::WriteDecorHandleKey< DMTest::JVec_v1 >, SG::WriteDecorHandleKey< DMTest::PLinks_v1 >, SG::WriteDecorHandleKey< MyDataObj >, SG::WriteDecorHandleKey< SG::AuxElement >, SG::WriteDecorHandleKey< T_RoIContainer >, SG::WriteDecorHandleKey< xAOD::ElectronContainer >, SG::WriteDecorHandleKey< xAOD::EventInfo >, SG::WriteDecorHandleKey< xAOD::EventInfo_v1 >, SG::WriteDecorHandleKey< xAOD::JetContainer >, SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer >, SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >, SG::WriteDecorHandleKey< xAOD::TruthParticleContainer >, and SG::WriteDecorHandleKey< xAOD::UncalibratedMeasurementContainer >.

Definition at line 320 of file StoreGate/src/VarHandleKey.cxx.

321{
322 const std::string& className = fullKey().className().empty() ?
323 Gaudi::DataHandle::default_type : fullKey().className();
324
325 std::ostringstream ost;
326 ost << "DataHandle(";
328 ost << ",";
329 switch (mode()) {
330 case Gaudi::DataHandle::Writer:
331 Gaudi::Utils::toStream("W", ost); break;
332 default:
333 Gaudi::Utils::toStream("R", ost); break;
334 }
335 ost << ","; Gaudi::Utils::toStream(className, ost);
336 ost << ","; Gaudi::Utils::toStream(isCondition(), ost);
337 ost << ")";
338
339 return ost.str();
340}
ServiceHandle< IProxyDict > m_storeHandle
Handle to the referenced store.
std::ostream & toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.

◆ setKey()

void SG::VarHandleKey::setKey ( DataObjID key)
finaloverrideprivatevirtualinherited

Don't allow calling these.

Prevent this method from being called.

Definition at line 197 of file StoreGate/src/VarHandleKey.cxx.

198{
199 throw SG::ExcForbiddenMethod ("VarHandleKey::setKey");
200}

◆ setOwningHandle()

void SG::VarHandleKey::setOwningHandle ( VarHandleBase * handle)
privateinherited

◆ start()

virtual StatusCode SG::VarHandleKey::start ( )
virtualinherited

Called by the owning algorithm during the START transition.

AthAlgorithm and friends will call this during START. This allows for extra initialization that we can't do during initialize(), such as retrieving a conditions container from the store.

The default implementation is a no-op.

Reimplemented in SG::CondHandleKey< T >, SG::CondHandleKey< ActsTrk::ActsVolumeIdToDetectorElementCollectionMap >, SG::CondHandleKey< ActsTrk::DetectorAlignStore >, SG::CondHandleKey< ALineContainer >, SG::CondHandleKey< Analysis::JetTagCalibCondData >, SG::CondHandleKey< AthenaAttributeList >, SG::CondHandleKey< AtlasFieldCacheCondObj >, SG::CondHandleKey< AtlasFieldMapCondObj >, SG::CondHandleKey< BLineContainer >, SG::CondHandleKey< BunchCrossingAverageCondData >, SG::CondHandleKey< BunchCrossingCondData >, SG::CondHandleKey< BunchCrossingIntensityCondData >, SG::CondHandleKey< BunchGroupCondData >, SG::CondHandleKey< BunchLumisCondData >, SG::CondHandleKey< calib_data_t >, SG::CondHandleKey< CaloAffectedRegionInfoVec >, SG::CondHandleKey< CaloBCIDCoeffs >, SG::CondHandleKey< CaloBCIDLumi >, SG::CondHandleKey< CaloCellPedShift >, SG::CondHandleKey< CaloDetDescrManager >, SG::CondHandleKey< CaloLocalHadCoeff >, SG::CondHandleKey< CaloNoise >, SG::CondHandleKey< CaloNoiseSigmaDiff >, SG::CondHandleKey< CaloRec::CaloCellPositionShift >, SG::CondHandleKey< CaloRec::ToolConstants >, SG::CondHandleKey< CaloSuperCellDetDescrManager >, SG::CondHandleKey< CaloTowerGeometry >, SG::CondHandleKey< CondAttrListVec >, SG::CondHandleKey< CONDDATA >, SG::CondHandleKey< CondDataObj >, SG::CondHandleKey< CondDataObjY >, SG::CondHandleKey< CondDataObjZ >, SG::CondHandleKey< CondMultChanCollection< AlignableTransform > >, SG::CondHandleKey< CscCondDbData >, SG::CondHandleKey< DataVector< HGTD_DetectorElement > >, SG::CondHandleKey< DetCondCFloat >, SG::CondHandleKey< DetCondKeyTrans >, SG::CondHandleKey< DMTest::S1 >, SG::CondHandleKey< DMTest::S2 >, SG::CondHandleKey< DMTest::S3 >, SG::CondHandleKey< external_detector_element_collection_t >, SG::CondHandleKey< FillParamsCondData >, SG::CondHandleKey< GeoAlignmentStore >, SG::CondHandleKey< HGTDMappingData >, SG::CondHandleKey< HTcalculator >, SG::CondHandleKey< IdentifierSet >, SG::CondHandleKey< ILArAutoCorr >, SG::CondHandleKey< ILArDAC2uA >, SG::CondHandleKey< ILArfSampl >, SG::CondHandleKey< ILArHVScaleCorr >, SG::CondHandleKey< ILArMinBias >, SG::CondHandleKey< ILArMinBiasAverage >, SG::CondHandleKey< ILArMphysOverMcal >, SG::CondHandleKey< ILArNoise >, SG::CondHandleKey< ILArOFC >, SG::CondHandleKey< ILArOFCBin >, SG::CondHandleKey< ILArPedestal >, SG::CondHandleKey< ILArRamp >, SG::CondHandleKey< ILArShape >, SG::CondHandleKey< ILAruA2MeV >, SG::CondHandleKey< InDet::BeamSpotData >, SG::CondHandleKey< InDet::SiDetectorElementStatus >, SG::CondHandleKey< InDet::SiDetElementBoundaryLinks_xk >, SG::CondHandleKey< InDet::SiElementPropertiesTable >, SG::CondHandleKey< InDet::SiliconPropertiesVector >, SG::CondHandleKey< InDet::TRT_DetElementsRoadData_xk >, SG::CondHandleKey< InDet::TRT_TrackSegmentsToolCondData_xk >, SG::CondHandleKey< InDet::TRTPIDNN >, SG::CondHandleKey< InDetDD::HGTD_DetectorElementCollection >, SG::CondHandleKey< InDetDD::SiDetectorElementCollection >, SG::CondHandleKey< InDetDD::TRT_DetElementContainer >, SG::CondHandleKey< ITk::PixelOfflineCalibData >, SG::CondHandleKey< ITkPixelCablingData >, SG::CondHandleKey< ITkPixFieldMaps >, SG::CondHandleKey< ITkStripCablingData >, SG::CondHandleKey< JGTowerMappingData >, SG::CondHandleKey< L1CaloDerivedRunParsContainer >, SG::CondHandleKey< L1CaloDisabledTowersContainer >, SG::CondHandleKey< L1CaloPpmDeadChannelsContainer >, SG::CondHandleKey< L1CaloPpmFineTimeRefsContainer >, SG::CondHandleKey< L1CaloPprChanCalibContainer >, SG::CondHandleKey< L1CaloPprChanDefaultsContainer >, SG::CondHandleKey< L1CaloPprChanStrategyContainer >, SG::CondHandleKey< L1CaloPprConditionsContainerRun2 >, SG::CondHandleKey< L1CaloPprDisabledChannelContainerRun2 >, SG::CondHandleKey< L1CaloReadoutConfigContainer >, SG::CondHandleKey< L1CaloReadoutConfigContainerJSON >, SG::CondHandleKey< L1CaloRunParametersContainer >, SG::CondHandleKey< LArADC2MeV >, SG::CondHandleKey< LArAutoCorrNoise >, SG::CondHandleKey< LArAutoCorrTotal >, SG::CondHandleKey< LArBadXCont< LArBadChannel > >, SG::CondHandleKey< LArBadXCont< LArBadFeb > >, SG::CondHandleKey< LArCalibLineMapping >, SG::CondHandleKey< LArCaliWaveContainer >, SG::CondHandleKey< LArDeadOTXCorrFactors >, SG::CondHandleKey< LArDSPThresholdsComplete >, SG::CondHandleKey< LArFebConfig >, SG::CondHandleKey< LArFebRodMapping >, SG::CondHandleKey< LArFEBTempData >, SG::CondHandleKey< LArfSamplSC >, SG::CondHandleKey< LArHVCorr >, SG::CondHandleKey< LArHVIdMapping >, SG::CondHandleKey< LArHVNMap >, SG::CondHandleKey< LArHVPathology >, SG::CondHandleKey< LArLATOMEMapping >, SG::CondHandleKey< LArMCSym >, SG::CondHandleKey< LArOFC >, SG::CondHandleKey< LArOFCweightSC >, SG::CondHandleKey< LArOnOffIdMapping >, SG::CondHandleKey< LArRinjComplete >, SG::CondHandleKey< LArRoIMap >, SG::CondHandleKey< LArXTalkWeight >, SG::CondHandleKey< LArXTalkWeightGlobal >, SG::CondHandleKey< LBDurationCondData >, SG::CondHandleKey< LuminosityCondData >, SG::CondHandleKey< LVL1::gFEXDBCondData >, SG::CondHandleKey< LVL1::jFEXDBCondData >, SG::CondHandleKey< LWTNNCollection >, SG::CondHandleKey< MC_t >, SG::CondHandleKey< MdtAsBuiltContainer >, SG::CondHandleKey< MdtCondDbData >, SG::CondHandleKey< Muon::DigitEffiData >, SG::CondHandleKey< Muon::MmCTPClusterCalibData >, SG::CondHandleKey< Muon::MuonIntersectGeoData >, SG::CondHandleKey< Muon::RpcCablingMap >, SG::CondHandleKey< Muon::TgcCablingMap >, SG::CondHandleKey< Muon::TwinTubeMap >, SG::CondHandleKey< MuonAlignmentErrorData >, SG::CondHandleKey< MuonCalib::MdtCalibDataContainer >, SG::CondHandleKey< MuonGM::MuonDetectorManager >, SG::CondHandleKey< MuonMDT_CablingMap >, SG::CondHandleKey< Nsw_CablingMap >, SG::CondHandleKey< NswAsBuiltDbData >, SG::CondHandleKey< NswCalibDbThresholdData >, SG::CondHandleKey< NswCalibDbTimeChargeData >, SG::CondHandleKey< NswDcsDbData >, SG::CondHandleKey< NswErrorCalibData >, SG::CondHandleKey< NswPassivationDbData >, SG::CondHandleKey< NswT0Data >, SG::CondHandleKey< OnlineLumiCalibrationCondData >, SG::CondHandleKey< OnnxNNCollection >, SG::CondHandleKey< PixelCablingCondData >, SG::CondHandleKey< PixelCalib::PixelOfflineCalibData >, SG::CondHandleKey< PixelChargeCalibCondData >, SG::CondHandleKey< PixelDCSHVData >, SG::CondHandleKey< PixelDCSStateData >, SG::CondHandleKey< PixelDCSStatusData >, SG::CondHandleKey< PixelDCSTempData >, SG::CondHandleKey< PixelDeadMapCondData >, SG::CondHandleKey< PixeldEdxData >, SG::CondHandleKey< PixelDistortionData >, SG::CondHandleKey< PixelHitDiscCnfgData >, SG::CondHandleKey< PixelModuleData >, SG::CondHandleKey< PixelRadiationDamageFluenceMapData >, SG::CondHandleKey< PixelReadoutSpeedData >, SG::CondHandleKey< PixelTDAQData >, SG::CondHandleKey< REFCONTAINER >, SG::CondHandleKey< RegSelCondData< IRegSelLUT > >, SG::CondHandleKey< RIO_OnTrackErrorScaling >, SG::CondHandleKey< RpcCablingCondData >, SG::CondHandleKey< RpcCondDbData >, SG::CondHandleKey< RtRelationContainer >, SG::CondHandleKey< SCT_AllGoodStripInfo >, SG::CondHandleKey< SCT_CablingData >, SG::CondHandleKey< SCT_CalibDefectData >, SG::CondHandleKey< SCT_CondParameterData >, SG::CondHandleKey< SCT_ConfigurationCondData >, SG::CondHandleKey< SCT_DCSFloatCondData >, SG::CondHandleKey< SCT_DCSStatCondData >, SG::CondHandleKey< SCT_GainCalibData >, SG::CondHandleKey< SCT_MajorityCondData >, SG::CondHandleKey< SCT_ModuleVetoCondData >, SG::CondHandleKey< SCT_MonitorCondData >, SG::CondHandleKey< SCT_NoiseCalibData >, SG::CondHandleKey< SCT_SensorsCondData >, SG::CondHandleKey< SCT_TdaqEnabledCondData >, SG::CondHandleKey< SiDetElementsLayerVectors_xk >, SG::CondHandleKey< SiLorentzAngleCondData >, SG::CondHandleKey< sTGCAsBuiltData >, SG::CondHandleKey< StrawT0Container >, SG::CondHandleKey< SYM_t >, SG::CondHandleKey< T_DefectsData >, SG::CondHandleKey< T_EmulatedDefects >, SG::CondHandleKey< TgcCondDbData >, SG::CondHandleKey< TgcDigitASDposData >, SG::CondHandleKey< TgcDigitCrosstalkData >, SG::CondHandleKey< TgcDigitJitterData >, SG::CondHandleKey< TgcDigitThresholdData >, SG::CondHandleKey< TgcDigitTimeOffsetData >, SG::CondHandleKey< TGCTriggerData >, SG::CondHandleKey< TGCTriggerLUTs >, SG::CondHandleKey< TileBadChannels >, SG::CondHandleKey< TileCalibData< TileCalibDrawerFlt > >, SG::CondHandleKey< TileCalibData< TileCalibDrawerOfc > >, SG::CondHandleKey< TileDCSState >, SG::CondHandleKey< TileEMScale >, SG::CondHandleKey< TileHid2RESrcID >, SG::CondHandleKey< TilePulse >, SG::CondHandleKey< TileSampleNoise >, SG::CondHandleKey< TileSamplingFraction >, SG::CondHandleKey< TileTiming >, SG::CondHandleKey< TrigConf::HLTPrescalesSet >, SG::CondHandleKey< TrigConf::L1BunchGroupSet >, SG::CondHandleKey< TrigConf::L1PrescalesSet >, SG::CondHandleKey< TrigLiveFractionCondData >, SG::CondHandleKey< Trk::LayerMaterialMap >, SG::CondHandleKey< Trk::SolenoidParametrization >, SG::CondHandleKey< Trk::TrackingGeometry >, SG::CondHandleKey< TRTCond::ActiveFraction >, SG::CondHandleKey< TRTCond::AliveStraws >, SG::CondHandleKey< TRTCond::AverageT0 >, SG::CondHandleKey< TRTCond::HWMap >, SG::CondHandleKey< TRTCond::RtRelationMultChanContainer >, SG::CondHandleKey< TRTCond::StrawDxContainer >, SG::CondHandleKey< TRTCond::StrawStatusData >, SG::CondHandleKey< TRTCond::StrawStatusMultChanContainer >, SG::CondHandleKey< TRTCond::StrawStatusSummary >, SG::CondHandleKey< TRTCond::StrawT0MultChanContainer >, SG::CondHandleKey< TRTDedxcorrection >, and SG::CondHandleKey< TTrainedNetworkCollection >.

◆ storeHandle()

const ServiceHandle< IProxyDict > & SG::VarHandleKey::storeHandle ( ) const
inherited

Return handle to the referenced store.

◆ updateHandle()

void SG::VarHandleKey::updateHandle ( const std::string & name)
privateinherited

Update the name of the store to which we're referring.

Parameters
nameThe new store name.

Definition at line 305 of file StoreGate/src/VarHandleKey.cxx.

306{
307 // Don't invalidate a stored pointer if the handle is already pointing
308 // at the desired service.
309 if (m_storeHandle.name() != name) {
310 m_hashedKey = 0;
311 m_storeHandle = ServiceHandle<IProxyDict>(name, "VarHandleKey");
314 }
315}
bool m_isEventStore
Cache test for whether we're referencing the event store.
@ EVENT_STORE
Definition StoreID.h:26
@ PILEUP_STORE
Definition StoreID.h:31

◆ updateKey()

void SG::VarHandleKey::updateKey ( std::string key)
finaloverrideprivatevirtualinherited

Prevent this method from being called.

Definition at line 206 of file StoreGate/src/VarHandleKey.cxx.

207{
208 throw SG::ExcForbiddenMethod ("VarHandleKey::updateKey");
209}

Member Data Documentation

◆ isDecorHandleKey

bool SG::VarHandleKey::isDecorHandleKey = false
staticconstexprinherited

Definition at line 61 of file StoreGate/StoreGate/VarHandleKey.h.

◆ m_hashedKey

SG::sgkey_t SG::VarHandleKey::m_hashedKey = 0
privateinherited

The hashed StoreGate key. May be 0 if not yet initialized.

Definition at line 249 of file StoreGate/StoreGate/VarHandleKey.h.

◆ m_isEventStore

bool SG::VarHandleKey::m_isEventStore = false
privateinherited

Cache test for whether we're referencing the event store.

Definition at line 252 of file StoreGate/StoreGate/VarHandleKey.h.

◆ m_owningHandle

VarHandleBase* SG::VarHandleKey::m_owningHandle = nullptr
privateinherited

Handle that owns this key, or nullptr if it is not owned.

Definition at line 255 of file StoreGate/StoreGate/VarHandleKey.h.

◆ m_sgKey

std::string SG::VarHandleKey::m_sgKey
privateinherited

StoreGate key, that doesn't include the storename.

Definition at line 246 of file StoreGate/StoreGate/VarHandleKey.h.

◆ m_storeHandle

ServiceHandle<IProxyDict> SG::VarHandleKey::m_storeHandle
privateinherited

Handle to the referenced store.

Definition at line 243 of file StoreGate/StoreGate/VarHandleKey.h.


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