|
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;
103 template <
typename T>
105 const EventContext& ctx):
106 m_eid( ctx.eventID() ),
113 if (conditionsRun != EventIDBase::UNDEFNUM) {
114 m_eid.set_run_number (conditionsRun);
117 catch (
const std::bad_any_cast&
e) {
143 template <
typename T>
147 if (m_obj != 0)
return true;
160 template <
typename T>
165 if (!initCondHandle()) {
183 template <
typename T>
192 if (! (m_cc->find(eid, cobj) ) ) {
204 template <
typename T>
208 return initCondHandle();
213 template <
typename T>
217 return (m_cc->valid(
t));
222 template <
typename T>
227 if (!initCondHandle()) {
240 template <
typename T>
245 if (!initCondHandle()) {
260 template <
typename T>
264 return ( m_cc->range(eid,
r) );
271 const EventContext& ctx = Gaudi::Hive::currentContext()) {
def retrieve(aClass, aKey=None)
const EventIDRange * m_range
bool range(const EventIDBase &t, EventIDRange &r) const
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.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
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()