|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef STOREGATE_READMETAHANDLE_H
6 #define STOREGATE_READMETAHANDLE_H
16 #include "GaudiKernel/DataHandle.h"
17 #include "GaudiKernel/DataObjID.h"
18 #include "GaudiKernel/EventContext.h"
19 #include "GaudiKernel/ThreadLocalContext.h"
27 class ReadMetaHandle {
38 ,
const EventContext& ctx);
74 ,
const EventContext& ctx)
76 , m_cont(
key.getContainer() )
82 <<
"ReadMetaHandleKey " <<
key.objKey() <<
" was not initialized"
84 throw std::runtime_error(
"ReadMetaHandle: ReadMetaHandleKey was not initialized");
91 if(
ms->retrieve(cb,
m_hkey.key()).isFailure()) {
93 <<
"can't retrieve " <<
m_hkey.fullKey()
94 <<
" via base class" <<
endmsg;
95 throw std::runtime_error(
"ReadCondHandle: ptr to CondCont<T> is zero");
101 <<
"can't dcast MetaContBase to " <<
m_hkey.fullKey()
103 throw std::runtime_error(
"ReadMetaHandle: ptr to MetaCont<T> is zero");
111 template <
typename T>
116 if (m_ent)
return true;
122 std::ostringstream
ost;
126 <<
"ReadMetaHandle:: could not find current SourceID "
127 << m_sid <<
" for key " << m_hkey.objKey() <<
"\n"
138 template <
typename T>
144 if (!initMetaHandle()) {
154 template <
typename T>
163 if (! (m_cont->find(sid,
obj) ) ) {
164 std::ostringstream
ost;
168 <<
"ReadMetaHandle::retrieve() could not find SourceID "
169 << sid <<
" for key " << m_hkey.objKey() <<
"\n"
180 template <
typename T>
184 return initMetaHandle();
def retrieve(aClass, aKey=None)
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
The Athena Transient Store API.
=============================================================================
Handle class for reading from StoreGate.