The Gaudi Framework  master (594c33fa)
Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T > Class Template Reference

Class wrapping the communication between condition users and conditions backend. More...

#include </builds/gaudi/Gaudi/GaudiTestSuite/include/Gaudi/TestSuite/Conditions/ConditionAccessorHolder.h>

Collaboration diagram for Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T >:

Public Member Functions

 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. More...
 
const ConditionKeykey () const
 Helper to access the key of the current accessor. More...
 
const T & get (const ConditionContext &ctx) const
 Get the condition value for the requested condition slot. More...
 

Private Attributes

Gaudi::Property< ConditionKeym_key
 Internal property object for the condition key. More...
 

Detailed Description

template<typename Base>
template<typename T>
class Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T >

Class wrapping the communication between condition users and conditions backend.

Users must use instances of this class as data members, passing this to the data member constructor.

See Gaudi::TestSuite::Conditions::UserAlg::m_cond

Definition at line 103 of file ConditionAccessorHolder.h.

Constructor & Destructor Documentation

◆ ConditionAccessor()

template<typename Base >
template<typename T >
Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T >::ConditionAccessor ( base_class owner,
const std::string keyName,
const ConditionKey keyDefault,
const std::string keyDoc = "" 
)
inline

Constructor a ConditionAccessor instance registering it to the current holder.

Definition at line 106 of file ConditionAccessorHolder.h.

108  : m_key{ owner, keyName, keyDefault, keyDoc } {
109  owner->registerConditionAccessor( *this );
110  }

Member Function Documentation

◆ get()

template<typename Base >
template<typename T >
const T& Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T >::get ( const ConditionContext ctx) const
inline

Get the condition value for the requested condition slot.

Definition at line 118 of file ConditionAccessorHolder.h.

118  {
120  }

◆ key()

template<typename Base >
template<typename T >
const ConditionKey& Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T >::key ( ) const
inline

Helper to access the key of the current accessor.

Note
can only be modified via the associated property

Definition at line 115 of file ConditionAccessorHolder.h.

115 { return m_key; }

Member Data Documentation

◆ m_key

template<typename Base >
template<typename T >
Gaudi::Property<ConditionKey> Gaudi::TestSuite::Conditions::ConditionAccessorHolder< Base >::ConditionAccessor< T >::m_key
private

Internal property object for the condition key.

Definition at line 124 of file ConditionAccessorHolder.h.


The documentation for this class was generated from the following file:
Gaudi::TestSuite::Conditions::details::ConditionsStore::instance
static ConditionsStore & instance()
Definition: Backend.cpp:15
Gaudi::TestSuite::Conditions::details::ConditionsStore::getCondition
const T & getCondition(const ConditionKey &key, const ConditionContext &ctx) const
Definition: ConditionAccessorHolder.h:36
Gaudi::TestSuite::Conditions::ConditionAccessorHolder::ConditionAccessor::key
const ConditionKey & key() const
Helper to access the key of the current accessor.
Definition: ConditionAccessorHolder.h:115
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:578
Gaudi::TestSuite::Conditions::ConditionAccessorHolder::ConditionAccessor::m_key
Gaudi::Property< ConditionKey > m_key
Internal property object for the condition key.
Definition: ConditionAccessorHolder.h:124