DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Class implementing the conditions collection for a given IOV type. More...
#include <ConditionsPool.h>
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... | |
NamedObject & | operator= (const NamedObject &c)=default |
Assignment operator. More... | |
NamedObject & | operator= (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 | |
IOV * | iov |
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... | |
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.
Definition at line 54 of file ConditionsPool.h.
anonymous enum |
Enumerator | |
---|---|
AGE_NONE | |
AGE_ANY | |
AGE_EXPIRED |
Definition at line 60 of file ConditionsPool.h.
ConditionsPool::ConditionsPool | ( | ConditionsManager | mgr, |
IOV * | iov | ||
) |
Default constructor.
Definition at line 29 of file ConditionsPool.cpp.
|
virtual |
Default destructor. Note: pool must be cleared by the subclass!
Default destructor.
Definition at line 36 of file ConditionsPool.cpp.
|
pure virtual |
Full cleanup of all managed conditions.
|
pure virtual |
Check if a condition exists in the pool.
|
pure virtual |
Register a new condition to this pool.
|
pure virtual |
Register a new condition to this pool. May overload for performance reasons.
void ConditionsPool::onRegister | ( | Condition | condition | ) |
Listener invocation when a condition is registered to the cache.
Definition at line 63 of file ConditionsPool.cpp.
void ConditionsPool::onRemove | ( | Condition | condition | ) |
Listener invocation when a condition is deregistered from the cache.
Definition at line 68 of file ConditionsPool.cpp.
void ConditionsPool::print | ( | ) | const |
Print pool basics.
Definition at line 42 of file ConditionsPool.cpp.
void ConditionsPool::print | ( | const std::string & | opt | ) | const |
Print pool basics.
Definition at line 48 of file ConditionsPool.cpp.
|
pure virtual |
Select the conditions matching the DetElement and the conditions name.
|
pure virtual |
Select all conditions contained.
|
pure virtual |
Select the conditons, passing a predicate.
|
pure virtual |
Select all conditions contained.
|
pure virtual |
Total entry count.
int dd4hep::cond::ConditionsPool::age_value |
Aging value.
Definition at line 67 of file ConditionsPool.h.
IOV* dd4hep::cond::ConditionsPool::iov |
The IOV of the conditions hosted.
Definition at line 65 of file ConditionsPool.h.
|
protected |
Handle to conditions manager object.
Definition at line 57 of file ConditionsPool.h.