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

#include <ReadCondHandleKey.h>

Inheritance diagram for SG::ReadCondHandleKey< T >:
Collaboration diagram for SG::ReadCondHandleKey< T >:

Public Types

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

Public Member Functions

 ReadCondHandleKey (const std::string &key, const std::string &dbKey="")
template<std::derived_from< IProperty > OWNER>
 ReadCondHandleKey (OWNER *owner, std::string name, const std::string &key={}, std::string doc="")
 auto-declaring Property Constructor.
ReadCondHandleKeyoperator= (const std::string &sgkey)
 Change the key of the object to which we're referring.
StatusCode initialize (bool used=true)
StatusCode initialize (AllowEmptyEnum)
const std::string & dbKey () const
void setDbKey (const std::string &dbKey)
virtual StatusCode start () override
 Called by the owning algorithm during the START transition.
virtual StatusCode assign (const std::string &sgkey)
 Change the key of the object to which we're referring.
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?
SG::sgkey_t hashedKey () const
 Return the hashed StoreGate key.

Static Public Attributes

static constexpr bool isDecorHandleKey = false

Protected Member Functions

bool isInit () const
CondCont< T > *getCC ATLAS_NOT_CONST_THREAD_SAFE () const
StoreGateSvcgetCS () const
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< StoreGateSvcm_cs
CondCont< T > * m_cc {0}
std::string m_dbKey {""}
bool m_isInit {false}
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.

Friends

class ReadCondHandle< T >

Detailed Description

template<class T>
class SG::ReadCondHandleKey< T >

Definition at line 19 of file ReadCondHandleKey.h.

Member Typedef Documentation

◆ PropertyType

Declare corresponding property type.

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

Constructor & Destructor Documentation

◆ ReadCondHandleKey() [1/2]

template<class T>
SG::ReadCondHandleKey< T >::ReadCondHandleKey ( const std::string & key,
const std::string & dbKey = "" )
inlineexplicit

Definition at line 26 of file ReadCondHandleKey.h.

26 :
28 {}
CondHandleKey(const std::string &key, const std::string &dbKey, Gaudi::DataHandle::Mode a)
const std::string & dbKey() const
const std::string & key() const
Return the StoreGate ID for the referenced object.

◆ ReadCondHandleKey() [2/2]

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

auto-declaring Property Constructor.

Parameters
namename of the Property
keyThe StoreGate key for the object
docdocumentation string

will associate the named Property with this RHK 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.

Definition at line 44 of file ReadCondHandleKey.h.

46 {},
47 std::string doc="") :
49 auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
50 p->template setOwnerType<OWNER>();
51 }
ReadCondHandleKey(const std::string &key, const std::string &dbKey="")

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< PLinks_v1 > >, SG::WriteDecorHandleKey< DataVector< RpcStrip_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_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTauRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Egamma_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Electron_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::FlowElement_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexTower_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::UncalibratedMeasurement_v1 > >, 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

◆ ATLAS_NOT_CONST_THREAD_SAFE()

template<class T>
CondCont< T > *getCC SG::CondHandleKey< T >::ATLAS_NOT_CONST_THREAD_SAFE ( ) const
inlineprotectedinherited

Definition at line 52 of file CondHandleKey.h.

52{ return m_cc; }
CondCont< T > * m_cc

◆ clid()

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

Return the class ID for the referenced object.

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

186{
187 return Gaudi::DataHandle::fullKey().clid();
188}

◆ dbKey()

template<class T>
const std::string & SG::CondHandleKey< T >::dbKey ( ) const
inlineinherited

Definition at line 31 of file CondHandleKey.h.

31{ return m_dbKey; }
std::string m_dbKey

◆ 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}

◆ getCS()

template<class T>
StoreGateSvc * SG::CondHandleKey< T >::getCS ( ) const
protectedinherited

◆ hashedKey()

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

Return the hashed StoreGate key.

May be 0 if not yet initialized.

◆ initialize() [1/2]

template<class T>
StatusCode SG::CondHandleKey< T >::initialize ( AllowEmptyEnum )
inherited

◆ initialize() [2/2]

template<class T>
StatusCode SG::CondHandleKey< T >::initialize ( bool used = true)
inherited

◆ isEventStore()

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

Does this key reference the primary event store?

◆ isInit()

template<class T>
bool SG::CondHandleKey< T >::isInit ( ) const
inlineprotectedinherited

Definition at line 46 of file CondHandleKey.h.

46{ return m_isInit; }

◆ 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>
ReadCondHandleKey & SG::ReadCondHandleKey< T >::operator= ( const std::string & sgkey)
inline

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.

Definition at line 62 of file ReadCondHandleKey.h.

62 {
64 return *this;
65 }
VarHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.

◆ 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 225 of file StoreGate/src/VarHandleKey.cxx.

227{
228 std::string sn;
229 // test if storeName has classname
230 std::string::size_type sp = storeName.find('/');
231 if (sp == std::string::npos) {
232 sn = storeName;
233 } else {
234 sn = storeName.substr(sp+1,storeName.length()-sp+1);
235 }
236
237 if (key.empty()) {
238 this->updateHandle(sn);
239 Gaudi::DataHandle::updateKey("");
240 m_sgKey.clear();
241 m_hashedKey = 0;
242 return;
243 }
244
245 // StoreName separator is "+"
246 sp = key.find(storeSeparator);
247 if(sp == std::string::npos) {
248 m_sgKey = key;
249 } else {
250 sn = key.substr(0,sp);
251 m_sgKey = key.substr(sp+1,key.length()-sp-1);
252 }
253
254
255 this->updateHandle(sn);
256
258 // would be nice if we could get the storeID from the storeHandle, but
259 // we can't be sure that the store has been created when the VHK is
260 // constructed.
261 //
262
264
266 if (m_sgKey.find('/') != std::string::npos) {
267 throw SG::ExcBadHandleKey("key \"" + key
268 + "\": keys with \"/\" only allowed for "
270 + " - store is \""
271 + sn + "\"");
272 }
273 } else {
274 sp = m_sgKey.rfind('/');
275 if (sp != std::string::npos) {
276 if (sp == 0
277 && m_sgKey.size() == 1) {
278 // Replace '\' with blank key
279 m_sgKey.clear();
280 m_hashedKey = 0;
281 } else if ( sp == m_sgKey.length()-1) {
282 throw SG::ExcBadHandleKey("key \"" + key
283 + "\": must not end with a \"/\"");
284 }
285 }
286 }
287
288 if (m_sgKey.empty()) {
289 Gaudi::DataHandle::updateKey("");
290 } else {
291 Gaudi::DataHandle::updateKey(sn + storeSeparator + m_sgKey);
292 }
293
294
295}
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< PLinks_v1 > >, SG::WriteDecorHandleKey< DataVector< RpcStrip_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_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::eFexTauRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Egamma_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::Electron_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::FlowElement_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexJetRoI_v1 > >, SG::WriteDecorHandleKey< DataVector< xAOD::gFexTower_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::UncalibratedMeasurement_v1 > >, 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 317 of file StoreGate/src/VarHandleKey.cxx.

318{
319 const std::string& className = fullKey().className().empty() ?
320 Gaudi::DataHandle::default_type : fullKey().className();
321
322 std::ostringstream ost;
323 ost << "DataHandle(";
325 ost << ",";
326 switch (mode()) {
327 case Gaudi::DataHandle::Writer:
328 Gaudi::Utils::toStream("W", ost); break;
329 default:
330 Gaudi::Utils::toStream("R", ost); break;
331 }
332 ost << ","; Gaudi::Utils::toStream(className, ost);
333 ost << ","; Gaudi::Utils::toStream(isCondition(), ost);
334 ost << ")";
335
336 return ost.str();
337}
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.

◆ setDbKey()

template<class T>
void SG::CondHandleKey< T >::setDbKey ( const std::string & dbKey)
inlineinherited

Definition at line 32 of file CondHandleKey.h.

32{ m_dbKey = dbKey; }

◆ setKey()

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

Don't allow calling these.

Prevent this method from being called.

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

195{
196 throw SG::ExcForbiddenMethod ("VarHandleKey::setKey");
197}

◆ setOwningHandle()

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

◆ start()

template<class T>
virtual StatusCode SG::CondHandleKey< T >::start ( )
overridevirtualinherited

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.

Reimplemented from SG::VarHandleKey.

◆ 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 302 of file StoreGate/src/VarHandleKey.cxx.

303{
304 // Don't invalidate a stored pointer if the handle is already pointing
305 // at the desired service.
306 if (m_storeHandle.name() != name) {
307 m_hashedKey = 0;
308 m_storeHandle = ServiceHandle<IProxyDict>(name, "VarHandleKey");
311 }
312}
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 203 of file StoreGate/src/VarHandleKey.cxx.

204{
205 throw SG::ExcForbiddenMethod ("VarHandleKey::updateKey");
206}

◆ ReadCondHandle< T >

template<class T>
friend class ReadCondHandle< T >
friend

Definition at line 1 of file ReadCondHandleKey.h.

Member Data Documentation

◆ isDecorHandleKey

bool SG::VarHandleKey::isDecorHandleKey = false
staticconstexprinherited

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

◆ m_cc

template<class T>
CondCont<T>* SG::CondHandleKey< T >::m_cc {0}
privateinherited

Definition at line 59 of file CondHandleKey.h.

59{0};

◆ m_cs

template<class T>
ServiceHandle<StoreGateSvc> SG::CondHandleKey< T >::m_cs
privateinherited

Definition at line 58 of file CondHandleKey.h.

◆ m_dbKey

template<class T>
std::string SG::CondHandleKey< T >::m_dbKey {""}
privateinherited

Definition at line 61 of file CondHandleKey.h.

61{""};

◆ 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_isInit

template<class T>
bool SG::CondHandleKey< T >::m_isInit {false}
privateinherited

Definition at line 63 of file CondHandleKey.h.

63{false};

◆ 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: