Go to the documentation of this file.
44 using IOVSlot = std::map<ConditionKey, std::any>;
45 using IOVSlots = std::map<ConditionContext, IOVSlot>;
76 template <
typename Base>
102 template <
typename T>
107 const std::string& keyDoc =
"" )
108 :
m_key{ owner, keyName, keyDefault, keyDoc } {
128 auto sc = Base::initialize();
129 if ( !sc )
return sc;
146 template <
typename T>
150 template <
typename T>
static ConditionsStore & instance()
details::ConditionsStore::ConditionKey ConditionKey
Forward backend specific ConditionKey to specializations.
friend class ConditionAccessor
const T & getCondition(const ConditionKey &key, const ConditionContext &ctx) const
std::map< ConditionContext, IOVSlot > IOVSlots
const ConditionContext & getConditionContext(const EventContext &ctx) const
const ConditionKey & key() const
Helper to access the key of the current accessor.
void declareKey(const ConditionKey &key)
const T & get(const ConditionContext &ctx) const
Get the condition value for the requested condition slot.
std::map< ConditionKey, std::any > IOVSlot
std::set< ConditionKey > m_requestedKeys
ConditionAccessor(base_class *owner, const std::string &keyName, const ConditionKey &keyDefault, const std::string &keyDoc="")
Constructor a ConditionAccessor instance registering it to the current holder.
Example class to implement an actual backend for Gaudi::TestSuite::Conditions::ConditionAccessorHolde...
Class wrapping the communication between condition users and conditions backend.
Example of a ConditionAccessorHolder implementation.
ConditionsStore()=default
const ConditionContext & getConditionContext(const EventContext &ctx) const
Helper to map the event being processed to the corresponding conditions slot.
details::ConditionsStore::ConditionContext ConditionContext
Forward backend specific ConditionContext to specializations.
void registerConditionAccessor(ConditionAccessor< T > &accessor)
Register a ConditionAccessor instance to internal bookkeeping.
Gaudi::Property< ConditionKey > m_key
Internal property object for the condition key.
std::list< std::function< void()> > m_delayedRegistrations
Helper to postpone the registration to the backend.
const std::any * getConditionAny(const ConditionKey &key, const ConditionContext &ctx) const
StatusCode initialize() override