13#ifndef STOREGATE_VARHANDLEKEY_H
14#define STOREGATE_VARHANDLEKEY_H
19#include "GaudiKernel/DataHandle.h"
20#include "GaudiKernel/ServiceHandle.h"
32class VarHandleKeyProperty;
58 :
public Gaudi::DataHandle
81 const std::string& sgkey,
82 Gaudi::DataHandle::Mode
a,
119 virtual StatusCode
assign (
const std::string& sgkey);
154 const std::string&
key()
const;
208 virtual std::string
pythonRepr()
const override;
217 virtual void setKey(DataObjID
key)
override final;
233 void parseKey (
const std::string& sgkey,
const std::string& storeName);
uint32_t CLID
The Class ID type.
VarHandleKeyProperty is the class which wraps a SG::VarHandleKey.
A property holding a SG store/key/clid from which a VarHandle is made.
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.
virtual std::string pythonRepr() const override
Python representation of Handle.
friend class VarHandleBase
Set the owning handle. Only callable from VarHandleBase.
static constexpr bool isDecorHandleKey
void parseKey(const std::string &sgkey, const std::string &storeName)
Handle assignment/construction from a string key.
VarHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
SG::sgkey_t m_hashedKey
The hashed StoreGate key. May be 0 if not yet initialized.
CLID clid() const
Return the class ID for the referenced object.
ServiceHandle< IProxyDict > m_storeHandle
Handle to the referenced store.
bool isEventStore() const
Does this key reference the primary event store?
void setOwningHandle(VarHandleBase *handle)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual StatusCode assign(const std::string &sgkey)
Change the key of the object to which we're referring.
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
SG::VarHandleKeyProperty PropertyType
Declare corresponding property type.
VarHandleBase * owningHandle()
Return the VarHandle that owns this key, if any.
VarHandleBase * m_owningHandle
Handle that owns this key, or nullptr if it is not owned.
std::string m_sgKey
StoreGate key, that doesn't include the storename.
virtual StatusCode start()
Called by the owning algorithm during the START transition.
bool m_isEventStore
Cache test for whether we're referencing the event store.
VarHandleKey(CLID clid, const std::string &sgkey, Gaudi::DataHandle::Mode a, const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE), bool isCond=false)
Constructor.
SG::sgkey_t hashedKey() const
Return the hashed StoreGate key.
bool empty() const
Test if the key is blank.
void updateHandle(const std::string &name)
Update the name of the store to which we're referring.
static const std::string & storeName(const StoreID::type &s)
holding In fact this class is here in order to allow STL container for all features This class is sho...
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
ostream & operator<<(ostream &s, const SG::VarHandleKey &m)