15#include "GaudiKernel/IClassIDSvc.h"
16#include "GaudiKernel/ServiceHandle.h"
33 const std::string&
key ,
34 const std::string& storeName )
52 if (
assign (sgkey).isFailure()) {
70 std::string
key = key_in;
73 std::string::size_type islash =
key.find (
'/');
74 if (islash != std::string::npos) {
75 std::string::size_type istart =
key.find (
'+');
76 if (istart == std::string::npos) {
84 std::string clname =
key.substr (istart, islash-istart);
85 key.erase (istart, islash+1-istart);
89 CHECK( clidsvc.retrieve() );
91 CHECK( clidsvc->getIDOfTypeName (clname,
clid) );
94 Gaudi::DataHandle::setKey (DataObjID (
clid, objKey()));
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Exceptions that can be thrown from StoreGate.
uint32_t CLID
The Class ID type.
Property holding a write key for which the type can be configured.
an iterator over instances of a given type in StoreGateSvc.
Exception — Bad key format for VarHandleKey.
Property holding a write key for which the type can be configured.
TypelessWriteHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
TypelessWriteHandleKey(CLID clid=CLID_NULL, const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
virtual StatusCode assign(const std::string &key) override
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.
virtual StatusCode assign(const std::string &sgkey)
Change the key of the object to which we're referring.
VarHandleKey(CLID clid, const std::string &sgkey, Gaudi::DataHandle::Mode a, const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE), bool isCond=false)
Constructor.
=============================================================================