Go to the documentation of this file.
76 template <
typename Base>
102 template <
typename T>
108 :
m_key{ owner, keyName, keyDefault, keyDoc } {
109 owner->registerConditionAccessor( *
this );
128 auto sc = Base::initialize();
129 if ( !sc )
return sc;
146 template <
typename T>
150 template <
typename T>
static ConditionsStore & instance()
friend class ConditionAccessor
const T & getCondition(const ConditionKey &key, const ConditionContext &ctx) const
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::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.
Implementation of property with value of concrete type.
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