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::UserPool Class Referenceabstract

Interface for conditions pool optimized to host conditions updates. More...

#include <ConditionsPool.h>

Inheritance diagram for dd4hep::cond::UserPool:
dd4hep::ConditionsMap dd4hep::cond::ConditionsMappedUserPool< MAPPING >

Public Types

enum  {
  PRINT_NONE = 0, PRINT_INSERT = 1<<0, PRINT_CLEAR = 1<<1, PRINT_LOAD = 1<<2,
  PRINT_COMPUTE = 1<<3, PRINT_LAST
}
 Printout flags for debugging. More...
 
typedef std::map< Condition::key_type, const ConditionDependency * > Dependencies
 Forward definition of the key type. More...
 
- Public Types inherited from dd4hep::ConditionsMap
enum  { FIRST_ITEM = Condition::FIRST_ITEM_KEY, LAST_ITEM = Condition::LAST_ITEM_KEY }
 
enum  { FIRST_KEY = Condition::FIRST_KEY, LAST_KEY = Condition::LAST_KEY }
 

Public Member Functions

virtual bool insert (Condition condition)=0
 ConditionsMap overload: Add a condition directly to the slice. More...
 
 UserPool (ConditionsManager mgr)
 Default constructor. More...
 
virtual ~UserPool ()
 Default destructor. More...
 
const IOVvalidity () const
 Access the interval of validity for this user pool. More...
 
const IOVvalidityPtr () const
 Access the interval of validity for this user pool. More...
 
virtual void print (const std::string &opt) const =0
 Print pool content. More...
 
virtual size_t size () const =0
 Total entry count. More...
 
virtual void clear ()=0
 Full cleanup of all managed conditions. More...
 
virtual bool exists (Condition::key_type key) const =0
 Check a condition for existence. More...
 
virtual bool exists (const ConditionKey &key) const =0
 Check a condition for existence. More...
 
virtual Condition get (Condition::key_type key) const =0
 Check if a condition exists in the pool and return it to the caller. More...
 
virtual Condition get (const ConditionKey &key) const =0
 Check if a condition exists in the pool and return it to the caller. More...
 
virtual bool remove (Condition::key_type hash_key)=0
 Remove condition by key from pool. More...
 
virtual bool remove (const ConditionKey &key)=0
 Remove condition by key from pool. More...
 
virtual bool registerOne (const IOV &iov, Condition cond)=0
 Do single insertion of condition including registration to the manager. More...
 
virtual size_t registerMany (const IOV &iov, const std::vector< Condition > &values)=0
 Do block insertions of conditions with identical IOV. More...
 
template<typename CONT >
size_t registerUnmapped (const IOV &iov, CONT &c)
 Insert multiple conditions. Note: the conditions must already have a hash key. More...
 
template<typename CONT >
size_t registerMapping (const IOV &iov, CONT &c)
 Insert multiple conditions. Note: the conditions must already have a hash key. More...
 
virtual bool insert (DetElement detector, Condition::itemkey_type key, Condition condition)=0
 ConditionsMap overload: Add a condition directly to the slice. More...
 
virtual Condition get (DetElement detector, Condition::itemkey_type key) const =0
 ConditionsMap overload: Access a single condition. More...
 
virtual std::vector< Conditionget (Condition::key_type lower, Condition::key_type upper) const =0
 No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper]. More...
 
virtual std::vector< Conditionget (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper) const =0
 No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper]. More...
 
virtual void scan (const Condition::Processor &processor) const =0
 ConditionsMap overload: Interface to scan data content of the conditions mapping. More...
 
virtual void scan (Condition::key_type lower, Condition::key_type upper, const Condition::Processor &processor) const =0
 No ConditionsMap overload: Interface to scan data content of the conditions mapping. More...
 
virtual void scan (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper, const Condition::Processor &processor) const =0
 No ConditionsMap overload: Interface to scan data content of the conditions mapping. More...
 
virtual ConditionsManager::Result prepare (const IOV &required, ConditionsSlice &slice, ConditionUpdateUserContext *user_param=0)=0
 Prepare user pool for usage (load, fill etc.) according to required IOV. More...
 
virtual ConditionsManager::Result load (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0)=0
 Load all updates to the clients with the defined IOV (1rst step of prepare) More...
 
virtual ConditionsManager::Result compute (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0)=0
 Compute all derived conditions with the defined IOV (2nd step of prepare) More...
 
virtual size_t compute (const Dependencies &dependencies, ConditionUpdateUserContext *user_param, bool force)=0
 Evaluate and register all derived conditions from the dependency list. More...
 
- Public Member Functions inherited from dd4hep::ConditionsMap
virtual ~ConditionsMap ()=default
 Standard destructor. More...
 

Public Attributes

unsigned int flags = 0
 Processing flags (printout etc.) More...
 

Protected Attributes

IOV m_iov
 The pool's interval of validity. More...
 
ConditionsManager m_manager
 Handle to conditions manager object. More...
 

Detailed Description

Interface for conditions pool optimized to host conditions updates.

Author
M.Frank
Version
1.0

Definition at line 134 of file ConditionsPool.h.

Member Typedef Documentation

◆ Dependencies

Forward definition of the key type.

Definition at line 137 of file ConditionsPool.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Printout flags for debugging.

Enumerator
PRINT_NONE 
PRINT_INSERT 
PRINT_CLEAR 
PRINT_LOAD 
PRINT_COMPUTE 
PRINT_LAST 

Definition at line 147 of file ConditionsPool.h.

Constructor & Destructor Documentation

◆ UserPool()

UserPool::UserPool ( ConditionsManager  mgr)

Default constructor.

Definition at line 82 of file ConditionsPool.cpp.

◆ ~UserPool()

UserPool::~UserPool ( )
virtual

Default destructor.

Definition at line 89 of file ConditionsPool.cpp.

Member Function Documentation

◆ clear()

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

Full cleanup of all managed conditions.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ compute() [1/2]

virtual size_t dd4hep::cond::UserPool::compute ( const Dependencies dependencies,
ConditionUpdateUserContext user_param,
bool  force 
)
pure virtual

Evaluate and register all derived conditions from the dependency list.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ compute() [2/2]

virtual ConditionsManager::Result dd4hep::cond::UserPool::compute ( const IOV required_validity,
ConditionsSlice slice,
ConditionUpdateUserContext ctxt = 0 
)
pure virtual

Compute all derived conditions with the defined IOV (2nd step of prepare)

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ exists() [1/2]

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

Check a condition for existence.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ exists() [2/2]

virtual bool dd4hep::cond::UserPool::exists ( const ConditionKey key) const
pure virtual

Check a condition for existence.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ get() [1/5]

virtual Condition dd4hep::cond::UserPool::get ( Condition::key_type  key) const
pure virtual

Check if a condition exists in the pool and return it to the caller.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ get() [2/5]

virtual std::vector<Condition> dd4hep::cond::UserPool::get ( Condition::key_type  lower,
Condition::key_type  upper 
) const
pure virtual

No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper].

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >, and dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ get() [3/5]

virtual Condition dd4hep::cond::UserPool::get ( const ConditionKey key) const
pure virtual

Check if a condition exists in the pool and return it to the caller.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ get() [4/5]

virtual Condition dd4hep::cond::UserPool::get ( DetElement  detector,
Condition::itemkey_type  key 
) const
pure virtual

ConditionsMap overload: Access a single condition.

Implements dd4hep::ConditionsMap.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ get() [5/5]

virtual std::vector<Condition> dd4hep::cond::UserPool::get ( DetElement  detector,
Condition::itemkey_type  lower,
Condition::itemkey_type  upper 
) const
pure virtual

No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper].

Reimplemented from dd4hep::ConditionsMap.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ insert() [1/2]

virtual bool dd4hep::cond::UserPool::insert ( Condition  condition)
pure virtual

ConditionsMap overload: Add a condition directly to the slice.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ insert() [2/2]

virtual bool dd4hep::cond::UserPool::insert ( DetElement  detector,
Condition::itemkey_type  key,
Condition  condition 
)
pure virtual

ConditionsMap overload: Add a condition directly to the slice.

Implements dd4hep::ConditionsMap.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ load()

virtual ConditionsManager::Result dd4hep::cond::UserPool::load ( const IOV required_validity,
ConditionsSlice slice,
ConditionUpdateUserContext ctxt = 0 
)
pure virtual

Load all updates to the clients with the defined IOV (1rst step of prepare)

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ prepare()

virtual ConditionsManager::Result dd4hep::cond::UserPool::prepare ( const IOV required,
ConditionsSlice slice,
ConditionUpdateUserContext user_param = 0 
)
pure virtual

Prepare user pool for usage (load, fill etc.) according to required IOV.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ print()

virtual void dd4hep::cond::UserPool::print ( const std::string &  opt) const
pure virtual

Print pool content.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ registerMany()

virtual size_t dd4hep::cond::UserPool::registerMany ( const IOV iov,
const std::vector< Condition > &  values 
)
pure virtual

Do block insertions of conditions with identical IOV.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ registerMapping()

template<typename CONT >
size_t dd4hep::cond::UserPool::registerMapping ( const IOV iov,
CONT &  c 
)
inline

Insert multiple conditions. Note: the conditions must already have a hash key.

Definition at line 201 of file ConditionsPool.h.

◆ registerOne()

virtual bool dd4hep::cond::UserPool::registerOne ( const IOV iov,
Condition  cond 
)
pure virtual

Do single insertion of condition including registration to the manager.

Note: block insertions are preferred!!!

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ registerUnmapped()

template<typename CONT >
size_t dd4hep::cond::UserPool::registerUnmapped ( const IOV iov,
CONT &  c 
)
inline

Insert multiple conditions. Note: the conditions must already have a hash key.

Definition at line 194 of file ConditionsPool.h.

◆ remove() [1/2]

virtual bool dd4hep::cond::UserPool::remove ( Condition::key_type  hash_key)
pure virtual

Remove condition by key from pool.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ remove() [2/2]

virtual bool dd4hep::cond::UserPool::remove ( const ConditionKey key)
pure virtual

Remove condition by key from pool.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ scan() [1/3]

virtual void dd4hep::cond::UserPool::scan ( Condition::key_type  lower,
Condition::key_type  upper,
const Condition::Processor processor 
) const
pure virtual

No ConditionsMap overload: Interface to scan data content of the conditions mapping.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >, and dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ scan() [2/3]

virtual void dd4hep::cond::UserPool::scan ( const Condition::Processor processor) const
pure virtual

ConditionsMap overload: Interface to scan data content of the conditions mapping.

Implements dd4hep::ConditionsMap.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ scan() [3/3]

virtual void dd4hep::cond::UserPool::scan ( DetElement  detector,
Condition::itemkey_type  lower,
Condition::itemkey_type  upper,
const Condition::Processor processor 
) const
pure virtual

No ConditionsMap overload: Interface to scan data content of the conditions mapping.

Reimplemented from dd4hep::ConditionsMap.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ size()

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

Total entry count.

Implemented in dd4hep::cond::ConditionsMappedUserPool< MAPPING >.

◆ validity()

const IOV& dd4hep::cond::UserPool::validity ( ) const
inline

Access the interval of validity for this user pool.

Definition at line 167 of file ConditionsPool.h.

◆ validityPtr()

const IOV* dd4hep::cond::UserPool::validityPtr ( ) const
inline

Access the interval of validity for this user pool.

Definition at line 169 of file ConditionsPool.h.

Member Data Documentation

◆ flags

unsigned int dd4hep::cond::UserPool::flags = 0

Processing flags (printout etc.)

Definition at line 156 of file ConditionsPool.h.

◆ m_iov

IOV dd4hep::cond::UserPool::m_iov
protected

The pool's interval of validity.

Definition at line 141 of file ConditionsPool.h.

◆ m_manager

ConditionsManager dd4hep::cond::UserPool::m_manager
protected

Handle to conditions manager object.

Definition at line 143 of file ConditionsPool.h.


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