|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #ifndef STOREGATE_VARHANDLEKEY_H
17 #define STOREGATE_VARHANDLEKEY_H
22 #include "GaudiKernel/DataHandle.h"
23 #include "GaudiKernel/ServiceHandle.h"
35 class VarHandleKeyProperty;
61 :
public Gaudi::DataHandle
82 const std::string&
sgkey,
155 const std::string&
key()
const;
209 virtual std::string
pythonRepr()
const override;
218 virtual void setKey(DataObjID
key)
override final;
234 void parseKey (
const std::string&
sgkey,
const std::string& storeName);
270 #endif // not STOREGATE_VARHANDLEKEY_H
bool m_isEventStore
Cache test for whether we're referencing the event store.
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
Base class for VarHandle types.
ServiceHandle< IProxyDict > m_storeHandle
Handle to the referenced store.
void updateHandle(const std::string &name)
Update the name of the store to which we're referring.
SG::sgkey_t m_hashedKey
The hashed StoreGate key. May be 0 if not yet initialized.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
VarHandleKey(CLID clid, const std::string &sgkey, Gaudi::DataHandle::Mode a, const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE), bool isCond=false)
Constructor.
virtual std::string pythonRepr() const override
Python representation of Handle.
virtual void setKey(DataObjID key) override final
Don't allow calling these.
virtual StatusCode assign(const std::string &sgkey)
Change the key of the object to which we're referring.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool isEventStore() const
Does this key reference the primary event store?
VarHandleBase * owningHandle()
Return the VarHandle that owns this key, if any.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
uint32_t CLID
The Class ID type.
std::string m_sgKey
StoreGate key, that doesn't include the storename.
VarHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
CLID clid() const
Return the class ID for the referenced object.
A property holding a SG store/key/clid from which a VarHandle is made.
VarHandleBase * m_owningHandle
Handle that owns this key, or nullptr if it is not owned.
void parseKey(const std::string &sgkey, const std::string &storeName)
Handle assignment/construction from a string key.
SG::sgkey_t hashedKey() const
Return the hashed StoreGate key.
void setOwningHandle(VarHandleBase *handle)
virtual void updateKey(std::string key) override final
Prevent this method from being called.
VarHandleKeyProperty is the class which wraps a SG::VarHandleKey.
static const std::string & storeName(const StoreID::type &s)
virtual StatusCode start()
Called by the owning algorithm during the START transition.