1 #ifndef GAUDIHIVE_DATAOBJECTHANDLE_H
2 #define GAUDIHIVE_DATAOBJECTHANDLE_H
43 T*
get() {
return get(
true); }
54 bool exist() {
return get(
false) != NULL; }
68 T*
get(
bool mustExist);
111 StatusCode sc = m_EDS->retrieveObject(objKey(), dataObjectp);
113 T* returnObject = NULL;
119 m_goodType = (NULL !=
dynamic_cast<T*
> (dataObjectp));
127 std::string errorMsg(
"The type provided for "+ objKey()
129 +
" and is different form the one of the object in the store.");
142 returnObject =
static_cast<T*
> (dataObjectp);
148 " from transient store.",
149 m_owner != 0 ? owner()->
name() :
"no owner",
165 StatusCode sc = m_EDS->registerObject(objKey(), objectp);
virtual ~DataObjectHandle()
Define general base for Gaudi exception.
bool exist()
Check the existence of the object in the transient store.
bool isSuccess() const
Test for a status code of SUCCESS.
void put(T *object)
Register object in transient store.
T * get()
Retrieve object from transient data store.
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
T * getIfExists()
Bypass check of existence of object in transient store Only uses main location of the...
This class is used for returning status codes from appropriate routines.
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
A DataObject is the base class of any identifiable object on any data store.
T * getOrCreate()
Get object from store or create a new one if it doesn't exist.