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"
38 ,
const EventContext& ctx);
42 const EventContext& ctx) =
delete;
78 ,
const EventContext& ctx)
79 :
m_sid(
Atlas::getExtendedEventContext(ctx).proxy()->sourceID() )
80 ,
m_cont( key.getContainer() )
86 <<
"ReadMetaHandleKey " << key.objKey() <<
" was not initialized"
88 throw std::runtime_error(
"ReadMetaHandle: ReadMetaHandleKey was not initialized");
95 if(ms->retrieve(cb,
m_hkey.key()).isFailure()) {
97 <<
"can't retrieve " <<
m_hkey.fullKey()
98 <<
" via base class" <<
endmsg;
99 throw std::runtime_error(
"ReadCondHandle: ptr to CondCont<T> is zero");
105 <<
"can't dcast MetaContBase to " <<
m_hkey.fullKey()
107 throw std::runtime_error(
"ReadMetaHandle: ptr to MetaCont<T> is zero");
115 template <
typename T>
120 if (
m_ent)
return true;
126 std::ostringstream ost;
130 <<
"ReadMetaHandle:: could not find current SourceID "
142 template <
typename T>
158 template <
typename T>
167 if (! (
m_cont->find(sid, obj) ) ) {
168 std::ostringstream ost;
172 <<
"ReadMetaHandle::retrieve() could not find SourceID "
173 << sid <<
" for key " <<
m_hkey.objKey() <<
"\n"
184 template <
typename T>
Handle class for reading from StoreGate.
The Athena Transient Store API.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
=============================================================================