ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SG::WriteDecorHandleKey< T > Class Template Reference

Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made. More...

#include <WriteDecorHandleKey.h>

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

Public Types

typedef WriteHandleKey< T > Base
 
using PropertyType = SG::VarHandleKeyProperty
 Declare corresponding property type. More...
 

Public Member Functions

 WriteDecorHandleKey (const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
 Constructor. More...
 
 WriteDecorHandleKey (const VarHandleKey &contKey, const std::string &decorKey="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
 Constructor with associated container. More...
 
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
 WriteDecorHandleKey (OWNER *owner, const std::string &name, const std::string &key={}, const std::string &doc="")
 auto-declaring Property Constructor. More...
 
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
 WriteDecorHandleKey (OWNER *owner, const std::string &name, const VarHandleKey &contKey, const std::string &decorKey={}, const std::string &doc="")
 auto-declaring Property Constructor. More...
 
WriteDecorHandleKeyoperator= (const std::string &sgkey)
 Change the key of the object to which we're referring. More...
 
virtual StatusCode assign (const std::string &sgkey) override
 Change the key of the object to which we're referring. More...
 
StatusCode initialize (bool used=true)
 If this object is used as a property, then this should be called during the initialize phase. More...
 
StatusCode initialize (AllowEmptyEnum)
 If this object is used as a property, then this should be called during the initialize phase. More...
 
const ReadHandleKey< T > & contHandleKey () const
 Return the handle key for the container. More...
 
void renounce ()
 Declare that this item does not participate in scheduling. More...
 
bool renounced () const
 Return the renounced flag. More...
 
CLID clid () const
 Return the class ID for the referenced object. More...
 
const std::string & key () const
 Return the StoreGate ID for the referenced object. More...
 
bool empty () const
 Test if the key is blank. More...
 
const ServiceHandle< IProxyDict > & storeHandle () const
 Return handle to the referenced store. More...
 
VarHandleBaseowningHandle ()
 Return the VarHandle that owns this key, if any. More...
 
bool isEventStore () const
 Does this key reference the primary event store? More...
 
virtual StatusCode start ()
 Called by the owning algorithm during the START transition. More...
 
SG::sgkey_t hashedKey () const
 Return the hashed StoreGate key. More...
 

Private Member Functions

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

Private Attributes

ReadHandleKey< T > m_contHandleKey
 The container handle. More...
 
const VarHandleKeym_contKey = nullptr
 Optional container on which decorations are applied. More...
 
bool m_renounced = false
 True if this key has been the target of a renounce(). More...
 
ServiceHandle< IProxyDictm_storeHandle
 Handle to the referenced store. More...
 
std::string m_sgKey
 StoreGate key, that doesn't include the storename. More...
 
SG::sgkey_t m_hashedKey = 0
 The hashed StoreGate key. May be 0 if not yet initialized. More...
 
bool m_isEventStore = false
 Cache test for whether we're referencing the event store. More...
 
VarHandleBasem_owningHandle = nullptr
 Handle that owns this key, or nullptr if it is not owned. More...
 

Friends

class ::AthAlgorithm
 
class ::AthReentrantAlgorithm
 
class ::AthAlgTool
 

Detailed Description

template<class T>
class SG::WriteDecorHandleKey< T >

Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.

This class holds the key part of a WriteDecorHandle.

Use this to add a decoration to an object such that the scheduler is aware of it. This is used just like a WriteHandleKey (which see) except that the key string is of the form CCC.DDD, where CCC is the name of the container in StoreGate and DDD is the name of the decoration.

Example:

class MyAlgorithm : public AthReentrantAlgorithm {
...
SG::WriteDecorHandleKey<MyCont> m_key{this, "Key", "container.decor"};
};
{
ATH_CHECK( m_key.initialize() );
...
}
StatusCode MyAlgorithm::execute (const EventContext& ctx) const
{
for (const MyObj& o : *h) { // Access the container.
h (o) = calculate (o); // Add the decoration.
...

Alternatively, one can construct the key with an additional VarHandleKey that represents the container and the key then only holds the decoration name. This is useful to avoid hard-coding the container name twice in case the algorithm also has a ReadHandleKey or WriteHandleKey for the container:

Example:

class MyAlgorithm : public AthReentrantAlgorithm {
...
SG::WriteHandleKey<MyCont> m_whkey{this, "WHKey", "container"};
SG::WriteDecorHandleKey<MyCont> m_wdhkey{this, "Key", m_whkey, "decor"};
};
...

Implementation note: We want to make two dependencies from this key: a read dependency on the container itself, and a write dependency on the decoration. This class derives from WriteHandleKey, which provides the output dependency on the decoration. We also hold as a member a ReadHandleKey for the container. This extra dependency is added at initialize time via registerWriteDecorHandleKey(), which see.

Definition at line 87 of file StoreGate/StoreGate/WriteDecorHandleKey.h.

Member Typedef Documentation

◆ Base

template<class T >
typedef WriteHandleKey<T> SG::WriteDecorHandleKey< T >::Base

Definition at line 91 of file StoreGate/StoreGate/WriteDecorHandleKey.h.

◆ PropertyType

Declare corresponding property type.

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

Constructor & Destructor Documentation

◆ WriteDecorHandleKey() [1/4]

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

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.

◆ WriteDecorHandleKey() [2/4]

template<class T >
SG::WriteDecorHandleKey< T >::WriteDecorHandleKey ( const VarHandleKey contKey,
const std::string &  decorKey = "",
const std::string &  storeName = StoreID::storeName(StoreID::EVENT_STORE) 
)
explicit

Constructor with associated container.

Parameters
contKeyVarHandleKey of the associated container
decorKeyThe decoration name.
storeNameName to use for the store.

The decoration @decorKey will be applied on the container referenced by @contKey.

◆ WriteDecorHandleKey() [3/4]

template<class T >
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
SG::WriteDecorHandleKey< T >::WriteDecorHandleKey ( OWNER *  owner,
const std::string &  name,
const std::string &  key = {},
const std::string &  doc = "" 
)

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 WDHK 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.

◆ WriteDecorHandleKey() [4/4]

template<class T >
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
SG::WriteDecorHandleKey< T >::WriteDecorHandleKey ( OWNER *  owner,
const std::string &  name,
const VarHandleKey contKey,
const std::string &  decorKey = {},
const std::string &  doc = "" 
)

auto-declaring Property Constructor.

Parameters
ownerOwning component.
namename of the Property
contKeyVarHandleKey of the associated container
decorKeyname The decoration name.
docDocumentation string.

Will associate the named Property with this WDHK via declareProperty The container part of the decoration key will be taken from contKey, while decorKey gives the name of the decoration itself. If decorKey is blank, then the overall key will be blank.

Member Function Documentation

◆ assign()

template<class T >
virtual StatusCode SG::WriteDecorHandleKey< T >::assign ( const std::string &  sgkey)
overridevirtual

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 from SG::VarHandleKey.

◆ clid()

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

Return the class ID for the referenced object.

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

178 {
179  return Gaudi::DataHandle::fullKey().clid();
180 }

◆ contHandleKey()

template<class T >
const ReadHandleKey<T>& SG::WriteDecorHandleKey< T >::contHandleKey ( ) const

Return the handle key for the container.

◆ contHandleKey_nc()

template<class T >
ReadHandleKey<T>& SG::WriteDecorHandleKey< T >::contHandleKey_nc ( )
private

Return the handle key for the container.

Should be used only by AthAlgorithm/AthAlgTool.

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

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

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) );

◆ initialize() [2/2]

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

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.

◆ 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 >
WriteDecorHandleKey& SG::WriteDecorHandleKey< 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 217 of file StoreGate/src/VarHandleKey.cxx.

219 {
220  m_hashedKey = 0;
221 
222  std::string sn;
223  // test if storeName has classname
224  std::string::size_type sp = storeName.find('/');
225  if (sp == std::string::npos) {
226  sn = storeName;
227  } else {
228  sn = storeName.substr(sp+1,storeName.length()-sp+1);
229  }
230 
231  if (key.empty()) {
232  this->updateHandle(sn);
233  Gaudi::DataHandle::updateKey("");
234  m_sgKey.clear();
235  return;
236  }
237 
238  // StoreName separator is "+"
239  sp = key.find(storeSeparator);
240  if(sp == std::string::npos) {
241  m_sgKey = key;
242  } else {
243  sn = key.substr(0,sp);
244  m_sgKey = key.substr(sp+1,key.length()-sp-1);
245  }
246 
247 
248  this->updateHandle(sn);
249 
250  StoreID::type st;
251  // would be nice if we could get the storeID from the storeHandle, but
252  // we can't be sure that the store has been created when the VHK is
253  // constructed.
254  //
255 
256  st = StoreID::findStoreID(sn);
257 
259  if (m_sgKey.find('/') != std::string::npos) {
260  throw SG::ExcBadHandleKey("key \"" + key
261  + "\": keys with \"/\" only allowed for "
263  + " - store is \""
264  + sn + "\"");
265  }
266  } else {
267  sp = m_sgKey.rfind('/');
268  if (sp != std::string::npos) {
269  if (sp == 0
270  && m_sgKey.size() == 1) {
271  // Replace '\' with blank key
272  m_sgKey.clear();
273  } else if ( sp == m_sgKey.length()-1) {
274  throw SG::ExcBadHandleKey("key \"" + key
275  + "\": must not end with a \"/\"");
276  }
277  }
278  }
279 
280  if (m_sgKey.empty()) {
281  Gaudi::DataHandle::updateKey("");
282  } else {
283  Gaudi::DataHandle::updateKey(sn + storeSeparator + m_sgKey);
284  }
285 
286 
287 }

◆ pythonRepr()

template<class T >
virtual std::string SG::WriteDecorHandleKey< T >::pythonRepr ( ) const
overrideprivatevirtual

Python representation of Handle.

Reimplemented from SG::VarHandleKey.

◆ renounce()

template<class T >
void SG::WriteDecorHandleKey< T >::renounce ( )

Declare that this item does not participate in scheduling.

If a WriteDataHandleKey is renounced, then we skip creating the output alias. Further, we skip the check that the element provided is a member of the declared container. A WriteDataHandle initialized from a renounced key will effectively behave like a simple Decorator.

◆ renounced()

template<class T >
bool SG::WriteDecorHandleKey< T >::renounced ( ) const

Return the renounced flag.

◆ setKey()

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

Don't allow calling these.

Prevent this method from being called.

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

187 {
188  throw SG::ExcForbiddenMethod ("VarHandleKey::setKey");
189 }

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

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

295 {
296  // Don't invalidate a stored pointer if the handle is already pointing
297  // at the desired service.
298  if (m_storeHandle.name() != name) {
299  m_hashedKey = 0;
300  m_storeHandle = ServiceHandle<IProxyDict>(name, "VarHandleKey");
303  }
304 }

◆ updateKey()

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

Prevent this method from being called.

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

196 {
197  throw SG::ExcForbiddenMethod ("VarHandleKey::updateKey");
198 }

Friends And Related Function Documentation

◆ ::AthAlgorithm

template<class T >
friend class ::AthAlgorithm
friend

Definition at line 235 of file StoreGate/StoreGate/WriteDecorHandleKey.h.

◆ ::AthAlgTool

template<class T >
friend class ::AthAlgTool
friend

Definition at line 237 of file StoreGate/StoreGate/WriteDecorHandleKey.h.

◆ ::AthReentrantAlgorithm

template<class T >
friend class ::AthReentrantAlgorithm
friend

Definition at line 236 of file StoreGate/StoreGate/WriteDecorHandleKey.h.

Member Data Documentation

◆ m_contHandleKey

template<class T >
ReadHandleKey<T> SG::WriteDecorHandleKey< T >::m_contHandleKey
private

The container handle.

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

◆ m_contKey

template<class T >
const VarHandleKey* SG::WriteDecorHandleKey< T >::m_contKey = nullptr
private

Optional container on which decorations are applied.

Definition at line 255 of file StoreGate/StoreGate/WriteDecorHandleKey.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 250 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 253 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 256 of file StoreGate/StoreGate/VarHandleKey.h.

◆ m_renounced

template<class T >
bool SG::WriteDecorHandleKey< T >::m_renounced = false
private

True if this key has been the target of a renounce().

(In that case, we don't make the output alias.)

Definition at line 259 of file StoreGate/StoreGate/WriteDecorHandleKey.h.

◆ m_sgKey

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

StoreGate key, that doesn't include the storename.

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

◆ m_storeHandle

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

Handle to the referenced store.

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


The documentation for this class was generated from the following file:
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
SG::VarHandleKey::m_isEventStore
bool m_isEventStore
Cache test for whether we're referencing the event store.
Definition: StoreGate/StoreGate/VarHandleKey.h:253
initialize
void initialize()
Definition: run_EoverP.cxx:894
SG::VarHandleKey::m_storeHandle
ServiceHandle< IProxyDict > m_storeHandle
Handle to the referenced store.
Definition: StoreGate/StoreGate/VarHandleKey.h:244
SG::VarHandleKey::updateHandle
void updateHandle(const std::string &name)
Update the name of the store to which we're referring.
Definition: StoreGate/src/VarHandleKey.cxx:294
SG::VarHandleKey::m_hashedKey
SG::sgkey_t m_hashedKey
The hashed StoreGate key. May be 0 if not yet initialized.
Definition: StoreGate/StoreGate/VarHandleKey.h:250
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
storeSeparator
constexpr char const storeSeparator
Definition: StoreGate/src/VarHandleKey.cxx:27
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
StoreID::CONDITION_STORE
@ CONDITION_STORE
Definition: StoreID.h:28
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
StoreID::PILEUP_STORE
@ PILEUP_STORE
Definition: StoreID.h:31
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
extractSporadic.h
list h
Definition: extractSporadic.py:97
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
SG::ExcBadHandleKey
Exception — Bad key format for VarHandleKey.
Definition: Control/StoreGate/StoreGate/exceptions.h:62
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
StoreID::METADATA_STORE
@ METADATA_STORE
Definition: StoreID.h:29
SG::ExcForbiddenMethod
Exception — Forbidden method called.
Definition: Control/StoreGate/StoreGate/exceptions.h:77
SG::VarHandleKey::m_sgKey
std::string m_sgKey
StoreGate key, that doesn't include the storename.
Definition: StoreGate/StoreGate/VarHandleKey.h:247
EMFourMomBuilder::calculate
void calculate(xAOD::Electron &electron)
Definition: EMFourMomBuilder.cxx:68
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
h
StoreID::type
type
Definition: StoreID.h:24
StoreID::findStoreID
static StoreID::type findStoreID(const std::string &storeName)
Definition: StoreID.cxx:21
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
StoreID::storeName
static const std::string & storeName(const StoreID::type &s)
Definition: StoreID.cxx:77
ServiceHandle< IProxyDict >