|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef STOREGATE_READCONDHANDLE_H
6 #define STOREGATE_READCONDHANDLE_H 1
19 #include "GaudiKernel/DataHandle.h"
20 #include "GaudiKernel/DataObjID.h"
21 #include "GaudiKernel/EventIDBase.h"
22 #include "GaudiKernel/EventContext.h"
23 #include "GaudiKernel/ThreadLocalContext.h"
40 const EventIDBase& eid,
41 const std::string&
key);
55 const EventContext& ctx);
59 const std::string&
key()
const {
return m_hkey.key(); }
74 bool range(
const EventIDBase&
t, EventIDRange&
r)
const;
102 template <
typename T>
104 const EventContext& ctx):
105 m_eid( ctx.eventID() ),
112 if (conditionsRun != EventIDBase::UNDEFNUM) {
113 m_eid.set_run_number (conditionsRun);
116 catch (
const std::bad_any_cast&
e) {
129 if (
cs->retrieve(cb,
m_hkey.key()).isFailure()) {
142 template <
typename T>
146 if (m_obj != 0)
return true;
159 template <
typename T>
164 if (!initCondHandle()) {
182 template <
typename T>
191 if (! (m_cc->find(eid, cobj) ) ) {
203 template <
typename T>
207 return initCondHandle();
212 template <
typename T>
216 return (m_cc->valid(
t));
221 template <
typename T>
226 if (!initCondHandle()) {
239 template <
typename T>
244 if (!initCondHandle()) {
259 template <
typename T>
263 return ( m_cc->range(eid,
r) );
270 const EventContext& ctx = Gaudi::Hive::currentContext()) {
def retrieve(aClass, aKey=None)
const EventIDRange * m_range
bool range(const EventIDBase &t, EventIDRange &r) const
IEvtIdModifierSvc::number_type number_type
Exception — Bad EventContext extension while building ReadCondHandle.
const_pointer_type operator->()
const EventIDRange & getRange()
const DataObjID & fullKey() const
Hold mappings of ranges to condition objects.
singleton-like access to IMessageSvc via open function and helper
EventIDBase::number_type conditionsRun() const
bool range(EventIDRange &r)
Exception — ReadCondHandle didn't initialize in getRange().
void ReadCondHandleNotFound(const CondContBase &cc, const EventIDBase &eid, const std::string &key)
Report a conditions container lookup failure.
Exception — Range not set in ReadCondHandle::getRange().
Exception — Can't retrieve CondCont from ReadCondHandle.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
const SG::ReadCondHandleKey< T > & m_hkey
The Athena Transient Store API.
const_pointer_type retrieve()
Exceptions that can be thrown from StoreGate.
ReadCondHandle(const SG::ReadCondHandleKey< T > &key)
Base class for all conditions containers.
const_pointer_type operator*()
bool isValid(const EventIDBase &t) const
ReadCondHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx)
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Hold mapping of ranges to condition objects.
Exception — Tried to create a handle from an uninitialized key.
const T & const_reference_type
const T * const_pointer_type
=============================================================================
Handle class for reading from StoreGate.
const std::string & key() const
const_pointer_type retrieve(const EventIDBase &t)
const_pointer_type cptr()