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");
94 if(
m_hkey.getStore()->retrieve(cb,
m_hkey.key()).isFailure()) {
96 <<
"can't retrieve " <<
m_hkey.fullKey()
97 <<
" via base class" <<
endmsg;
98 throw std::runtime_error(
"ReadCondHandle: ptr to CondCont<T> is zero");
104 <<
"can't dcast MetaContBase to " <<
m_hkey.fullKey()
106 throw std::runtime_error(
"ReadMetaHandle: ptr to MetaCont<T> is zero");
114 template <
typename T>
119 if (
m_ent)
return true;
125 std::ostringstream ost;
129 <<
"ReadMetaHandle:: could not find current SourceID "
141 template <
typename T>
157 template <
typename T>
166 if (! (
m_cont->find(sid, obj) ) ) {
167 std::ostringstream ost;
171 <<
"ReadMetaHandle::retrieve() could not find SourceID "
172 << sid <<
" for key " <<
m_hkey.objKey() <<
"\n"
183 template <
typename T>
Handle class for reading from StoreGate.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
=============================================================================