ATLAS Offline Software
|
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made. More...
#include <ReadDecorHandleKey.h>
Public Types | |
typedef ReadHandleKey< T > | Base |
Base class. More... | |
typedef SG::TopBase< T >::type | topbase_t |
Class for which we set the CLID. See above. More... | |
using | PropertyType = SG::VarHandleKeyProperty |
Declare corresponding property type. More... | |
Public Member Functions | |
ReadDecorHandleKey (const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE)) | |
Constructor. More... | |
ReadDecorHandleKey (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> | |
ReadDecorHandleKey (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> | |
ReadDecorHandleKey (OWNER *owner, const std::string &name, const VarHandleKey &contKey, const std::string &decorKey={}, const std::string &doc="") | |
auto-declaring Property Constructor. More... | |
ReadDecorHandleKey & | operator= (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... | |
CLID | clid () const |
Return the class ID for the referenced object. More... | |
StatusCode | initialize (bool used=true) |
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... | |
StatusCode | initialize (AllowEmptyEnum) |
If this object is used as a property, then this should be called during the initialize phase. 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... | |
VarHandleBase * | owningHandle () |
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... | |
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 VarHandleKey * | m_contKey {nullptr} |
Optional container from which decorations are read. More... | |
ServiceHandle< IProxyDict > | m_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... | |
VarHandleBase * | m_owningHandle = nullptr |
Handle that owns this key, or nullptr if it is not owned. More... | |
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
This class holds the key part of a ReadDecorHandle.
Use this to read a decoration on an object such that the scheduler is aware of it. This is used just like a ReadHandleKey
(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:
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:
One can run into issues with the scheduler if this is used in conjunction with inheritance. For example, if D
derives from B
, and one uses WriteDecorHandleKey, then the scheduler will know only about the B.DECOR output; it won't have a dependency for D.DECOR. That means that trying to use D.DECOR as a dependency downstream won't work. To solve this, we arrange that the CLID in the DataObjID for ReadDecorHandleKey<D> is actually that for B; in that case, the scheduler will be happy.
Definition at line 83 of file StoreGate/StoreGate/ReadDecorHandleKey.h.
typedef ReadHandleKey<T> SG::ReadDecorHandleKey< T >::Base |
Base class.
Definition at line 88 of file StoreGate/StoreGate/ReadDecorHandleKey.h.
|
inherited |
Declare corresponding property type.
Definition at line 91 of file StoreGate/StoreGate/VarHandleKey.h.
typedef SG::TopBase<T>::type SG::ReadDecorHandleKey< T >::topbase_t |
Class for which we set the CLID. See above.
Definition at line 91 of file StoreGate/StoreGate/ReadDecorHandleKey.h.
SG::ReadDecorHandleKey< T >::ReadDecorHandleKey | ( | const std::string & | key = "" , |
const std::string & | storeName = StoreID::storeName(StoreID::EVENT_STORE) |
||
) |
Constructor.
key | The StoreGate key for the object. |
storeName | Name 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.
|
explicit |
Constructor with associated container.
contKey | VarHandleKey of the associated container |
decorKey | The decoration name. |
storeName | Name to use for the store. |
The decoration @decorKey will be read from the container referenced by @contKey.
SG::ReadDecorHandleKey< T >::ReadDecorHandleKey | ( | OWNER * | owner, |
const std::string & | name, | ||
const std::string & | key = {} , |
||
const std::string & | doc = "" |
||
) |
auto-declaring Property Constructor.
owner | Owning component. |
name | name of the Property |
key | default StoreGate key for the object. |
doc | Documentation 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.
SG::ReadDecorHandleKey< T >::ReadDecorHandleKey | ( | OWNER * | owner, |
const std::string & | name, | ||
const VarHandleKey & | contKey, | ||
const std::string & | decorKey = {} , |
||
const std::string & | doc = "" |
||
) |
auto-declaring Property Constructor.
owner | Owning component. |
name | name of the Property |
contKey | VarHandleKey of the associated container |
decorKey | name The decoration name. |
doc | Documentation string. |
will associate the named Property with this WDHK via declareProperty
|
overridevirtual |
Change the key of the object to which we're referring.
sgkey | The 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 SG::ReadDecorHandleKey< T >::clid | ( | ) | const |
Return the class ID for the referenced object.
Overridden here to return the CLID for T
instead of topbase_t
.
const ReadHandleKey<T>& SG::ReadDecorHandleKey< T >::contHandleKey | ( | ) | const |
Return the handle key for the container.
|
inherited |
Test if the key is blank.
Definition at line 150 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.
|
inherited |
Return the hashed StoreGate key.
May be 0 if not yet initialized.
|
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.
Flag | to select this variant. Call like |
Definition at line 129 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.
StatusCode SG::ReadDecorHandleKey< 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.
used | If false, then this handle is not to be used. Instead of normal initialization, the key will be cleared. |
|
inherited |
Does this key reference the primary event store?
|
inherited |
Return the StoreGate ID for the referenced object.
Definition at line 141 of file AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx.
ReadDecorHandleKey& SG::ReadDecorHandleKey< T >::operator= | ( | const std::string & | sgkey | ) |
Change the key of the object to which we're referring.
sgkey | The 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.
|
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.
|
privateinherited |
Handle assignment/construction from a string key.
sgkey | The 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
sgkey | The 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.
|
overrideprivatevirtual |
Python representation of Handle.
Reimplemented from SG::VarHandleKey.
|
finaloverrideprivatevirtualinherited |
Don't allow calling these.
Prevent this method from being called.
Definition at line 186 of file StoreGate/src/VarHandleKey.cxx.
|
privateinherited |
|
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< 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< InDetDD::HGTD_DetectorElementCollection >, SG::CondHandleKey< LArFebConfig >, SG::CondHandleKey< LArHVIdMapping >, SG::CondHandleKey< LArOnOffIdMapping >, SG::CondHandleKey< InDet::SiElementPropertiesTable >, SG::CondHandleKey< ITk::PixelOfflineCalibData >, SG::CondHandleKey< StrawT0Container >, SG::CondHandleKey< ILArMinBias >, SG::CondHandleKey< TgcDigitCrosstalkData >, SG::CondHandleKey< SCT_AllGoodStripInfo >, SG::CondHandleKey< PixelRadiationDamageFluenceMapData >, SG::CondHandleKey< TgcCondDbData >, SG::CondHandleKey< ILAruA2MeV >, SG::CondHandleKey< ILArNoise >, SG::CondHandleKey< LBDurationCondData >, SG::CondHandleKey< Muon::MuonIntersectGeoData >, SG::CondHandleKey< LArFebRodMapping >, SG::CondHandleKey< L1CaloPprChanDefaultsContainer >, SG::CondHandleKey< L1CaloPprChanCalibContainer >, SG::CondHandleKey< MuonGM::MuonDetectorManager >, SG::CondHandleKey< TGCTriggerLUTs >, SG::CondHandleKey< DetCondKeyTrans >, SG::CondHandleKey< AtlasFieldMapCondObj >, SG::CondHandleKey< LArAutoCorrNoise >, SG::CondHandleKey< TileHid2RESrcID >, 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< Muon::DigitEffiData >, SG::CondHandleKey< SCT_CablingData >, SG::CondHandleKey< SCT_CondParameterData >, SG::CondHandleKey< DetCondCFloat >, SG::CondHandleKey< PixelHitDiscCnfgData >, SG::CondHandleKey< InDetDD::TRT_DetElementContainer >, SG::CondHandleKey< ILArfSampl >, SG::CondHandleKey< ILArOFC >, SG::CondHandleKey< LArLATOMEMapping >, 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< CaloRec::CaloCellPositionShift >, SG::CondHandleKey< MuonNRPC_CablingMap >, SG::CondHandleKey< PixelDeadMapCondData >, SG::CondHandleKey< PixelTDAQData >, 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< ILArMphysOverMcal >, SG::CondHandleKey< TrigLiveFractionCondData >, 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< 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 >.
|
inherited |
Return handle to the referenced store.
|
privateinherited |
Update the name of the store to which we're referring.
name | The new store name. |
Definition at line 294 of file StoreGate/src/VarHandleKey.cxx.
|
finaloverrideprivatevirtualinherited |
Prevent this method from being called.
Definition at line 195 of file StoreGate/src/VarHandleKey.cxx.
|
private |
The container handle.
Definition at line 218 of file StoreGate/StoreGate/ReadDecorHandleKey.h.
|
private |
Optional container from which decorations are read.
If used, this is really the same as our own m_contHandleKey. So we could just keep it in a (non-)owning pointer depending on the use-case. But that would require a dedicated copy constructor for this class, etc.
Definition at line 227 of file StoreGate/StoreGate/ReadDecorHandleKey.h.
|
privateinherited |
The hashed StoreGate key. May be 0 if not yet initialized.
Definition at line 250 of file StoreGate/StoreGate/VarHandleKey.h.
|
privateinherited |
Cache test for whether we're referencing the event store.
Definition at line 253 of file StoreGate/StoreGate/VarHandleKey.h.
|
privateinherited |
Handle that owns this key, or nullptr if it is not owned.
Definition at line 256 of file StoreGate/StoreGate/VarHandleKey.h.
|
privateinherited |
StoreGate key, that doesn't include the storename.
Definition at line 247 of file StoreGate/StoreGate/VarHandleKey.h.
|
privateinherited |
Handle to the referenced store.
Definition at line 244 of file StoreGate/StoreGate/VarHandleKey.h.