DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
dd4hep::cond::ConditionsPool Class Referenceabstract

Class implementing the conditions collection for a given IOV type. More...

#include <ConditionsPool.h>

Inheritance diagram for dd4hep::cond::ConditionsPool:
dd4hep::NamedObject dd4hep::cond::UpdatePool

Public Types

enum  { AGE_NONE = 0, AGE_ANY = 9999999, AGE_EXPIRED = 12345678 }
 

Public Member Functions

void onRegister (Condition condition)
 Listener invocation when a condition is registered to the cache. More...
 
void onRemove (Condition condition)
 Listener invocation when a condition is deregistered from the cache. More...
 
 ConditionsPool (ConditionsManager mgr, IOV *iov)
 Default constructor. More...
 
virtual ~ConditionsPool ()
 Default destructor. Note: pool must be cleared by the subclass! More...
 
void print () const
 Print pool basics. More...
 
void print (const std::string &opt) const
 Print pool basics. More...
 
virtual size_t size () const =0
 Total entry count. More...
 
virtual void clear ()=0
 Full cleanup of all managed conditions. More...
 
virtual bool insert (Condition cond)=0
 Register a new condition to this pool. More...
 
virtual void insert (RangeConditions &cond)=0
 Register a new condition to this pool. May overload for performance reasons. More...
 
virtual Condition exists (Condition::key_type key) const =0
 Check if a condition exists in the pool. More...
 
virtual size_t select (Condition::key_type key, RangeConditions &result)=0
 Select the conditions matching the DetElement and the conditions name. More...
 
virtual size_t select_all (RangeConditions &result)=0
 Select all conditions contained. More...
 
virtual size_t select_all (const ConditionsSelect &predicate)=0
 Select the conditons, passing a predicate. More...
 
virtual size_t select_all (ConditionsPool &selection_pool)=0
 Select all conditions contained. More...
 
- Public Member Functions inherited from dd4hep::NamedObject
 NamedObject (const char *nam, const char *typ="")
 Initializing constructor. More...
 
 NamedObject (const std::string &nam)
 Initializing constructor. More...
 
 NamedObject (const std::string &nam, const std::string &typ)
 Initializing constructor. More...
 
 NamedObject ()=default
 Standard constructor. More...
 
 NamedObject (const NamedObject &c)=default
 Copy constructor. More...
 
 NamedObject (NamedObject &&c)=default
 Move constructor. More...
 
virtual ~NamedObject ()=default
 Default destructor. More...
 
NamedObjectoperator= (const NamedObject &c)=default
 Assignment operator. More...
 
NamedObjectoperator= (NamedObject &&c)=default
 Move assignment operator. More...
 
const char * GetName () const
 Access name. More...
 
void SetName (const char *nam)
 Set name (used by Handle) More...
 
void SetTitle (const char *tit)
 Set Title (used by Handle) More...
 
const char * GetTitle () const
 Get name (used by Handle) More...
 

Public Attributes

IOViov
 The IOV of the conditions hosted. More...
 
int age_value
 Aging value. More...
 
- Public Attributes inherited from dd4hep::NamedObject
std::string name
 The object name. More...
 
std::string type
 The object type. More...
 

Protected Attributes

ConditionsManager m_manager
 Handle to conditions manager object. More...
 

Detailed Description

Class implementing the conditions collection for a given IOV type.

Implementation is mostly virtual, to allow to switch between different implementations, which allow for different lookup and store optimizations and/or various caches. The interface only represents the basic functionality required.

Please note: Users should not directly interact with object instances of this type. Data are not thread protected and interaction may cause serious harm. Only the ConditionsManager implementation should interact with this class or any subclass to ensure data integrity.

For convenience, the class definition is here. See ConditionsManager.cpp for the implementation.

Author
M.Frank
Version
1.0

Definition at line 54 of file ConditionsPool.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
AGE_NONE 
AGE_ANY 
AGE_EXPIRED 

Definition at line 60 of file ConditionsPool.h.

Constructor & Destructor Documentation

◆ ConditionsPool()

ConditionsPool::ConditionsPool ( ConditionsManager  mgr,
IOV iov 
)

Default constructor.

Definition at line 29 of file ConditionsPool.cpp.

◆ ~ConditionsPool()

ConditionsPool::~ConditionsPool ( )
virtual

Default destructor. Note: pool must be cleared by the subclass!

Default destructor.

Definition at line 36 of file ConditionsPool.cpp.

Member Function Documentation

◆ clear()

virtual void dd4hep::cond::ConditionsPool::clear ( )
pure virtual

Full cleanup of all managed conditions.

◆ exists()

virtual Condition dd4hep::cond::ConditionsPool::exists ( Condition::key_type  key) const
pure virtual

Check if a condition exists in the pool.

◆ insert() [1/2]

virtual bool dd4hep::cond::ConditionsPool::insert ( Condition  cond)
pure virtual

Register a new condition to this pool.

◆ insert() [2/2]

virtual void dd4hep::cond::ConditionsPool::insert ( RangeConditions cond)
pure virtual

Register a new condition to this pool. May overload for performance reasons.

◆ onRegister()

void ConditionsPool::onRegister ( Condition  condition)

Listener invocation when a condition is registered to the cache.

Definition at line 63 of file ConditionsPool.cpp.

◆ onRemove()

void ConditionsPool::onRemove ( Condition  condition)

Listener invocation when a condition is deregistered from the cache.

Definition at line 68 of file ConditionsPool.cpp.

◆ print() [1/2]

void ConditionsPool::print ( ) const

Print pool basics.

Definition at line 42 of file ConditionsPool.cpp.

◆ print() [2/2]

void ConditionsPool::print ( const std::string &  opt) const

Print pool basics.

Definition at line 48 of file ConditionsPool.cpp.

◆ select()

virtual size_t dd4hep::cond::ConditionsPool::select ( Condition::key_type  key,
RangeConditions result 
)
pure virtual

Select the conditions matching the DetElement and the conditions name.

◆ select_all() [1/3]

virtual size_t dd4hep::cond::ConditionsPool::select_all ( ConditionsPool selection_pool)
pure virtual

Select all conditions contained.

◆ select_all() [2/3]

virtual size_t dd4hep::cond::ConditionsPool::select_all ( const ConditionsSelect predicate)
pure virtual

Select the conditons, passing a predicate.

◆ select_all() [3/3]

virtual size_t dd4hep::cond::ConditionsPool::select_all ( RangeConditions result)
pure virtual

Select all conditions contained.

◆ size()

virtual size_t dd4hep::cond::ConditionsPool::size ( ) const
pure virtual

Total entry count.

Member Data Documentation

◆ age_value

int dd4hep::cond::ConditionsPool::age_value

Aging value.

Definition at line 67 of file ConditionsPool.h.

◆ iov

IOV* dd4hep::cond::ConditionsPool::iov

The IOV of the conditions hosted.

Definition at line 65 of file ConditionsPool.h.

◆ m_manager

ConditionsManager dd4hep::cond::ConditionsPool::m_manager
protected

Handle to conditions manager object.

Definition at line 57 of file ConditionsPool.h.


The documentation for this class was generated from the following files: