DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Callback handler to update condition dependencies. More...
#include <ConditionsDependencyHandler.h>
Classes | |
struct | Work |
Helper structure to define the current update item. More... | |
Public Types | |
enum | State { INVALID, CREATED, RESOLVED } |
Obect state definitions. More... | |
typedef std::map< Condition::key_type, const ConditionDependency * > | Dependencies |
typedef std::map< Condition::key_type, Work * > | WorkConditions |
Public Member Functions | |
ConditionsDependencyHandler (ConditionsManager mgr, UserPool &pool, const Dependencies &dependencies, ConditionUpdateUserContext *user_param) | |
Initializing constructor. More... | |
~ConditionsDependencyHandler () | |
Default destructor. More... | |
void | compute () |
Access the conditions created during processing. More... | |
void | resolve () |
2nd pass: Handler callback for the second turn to resolve missing dependencies More... | |
virtual Detector & | detectorDescription () const override |
Access to the detector description instance. More... | |
virtual Ref_t | manager () const override |
Access to the conditions manager. More... | |
virtual const IOV & | requiredValidity () const override |
Access to pool IOV. More... | |
virtual ConditionsMap & | conditionsMap () const override |
Accessor for the current conditons mapping. More... | |
virtual Condition | get (const ConditionKey &key) override |
ConditionResolver implementation: Interface to access conditions. More... | |
virtual Condition | get (const ConditionKey &key, bool throw_if_not) override |
Interface to access conditions by conditions key. More... | |
virtual Condition | get (Condition::key_type key) override |
ConditionResolver implementation: Interface to access conditions. More... | |
virtual Condition | get (Condition::key_type key, bool throw_if_not) override |
Interface to access conditions by hash value. More... | |
virtual Condition | get (Condition::key_type key, const ConditionDependency *dependency, bool throw_if_not) override |
Interface to access conditions by hash value. More... | |
virtual std::vector< Condition > | get (DetElement de) override |
Interface to access conditions by hash value of the DetElement (only valid at resolve!) More... | |
virtual std::vector< Condition > | get (Condition::detkey_type key) override |
Interface to access conditions by hash value of the DetElement (only valid at resolve!) More... | |
virtual std::vector< Condition > | getByItem (Condition::itemkey_type key) override |
Interface to access conditions by hash value of the item (only valid at resolve!) More... | |
virtual bool | registerOne (const IOV &iov, Condition cond) override |
Interface to handle multi-condition inserts by callbacks: One single insert. More... | |
virtual size_t | registerMany (const IOV &iov, const std::vector< Condition > &values) override |
Handle multi-condition inserts by callbacks: block insertions of conditions with identical IOV. More... | |
Public Member Functions inherited from dd4hep::cond::ConditionResolver | |
virtual | ~ConditionResolver () |
Standard destructor. More... | |
template<typename CONT > | |
size_t | registerUnmapped (const IOV &iov, CONT &c) |
Handle multi-condition inserts by callbacks with identical key. Handle unmapped containers. More... | |
template<typename CONT > | |
size_t | registerMapping (const IOV &iov, CONT &c) |
Handle multi-condition inserts by callbacks with identical key. Handle mapped containers. More... | |
Public Attributes | |
size_t | num_callback |
Number of callbacks to the handler for monitoring. More... | |
Protected Member Functions | |
void | do_callback (Work *dep) |
Internal call to trigger update callback. More... | |
Protected Attributes | |
ConditionsManagerObject * | m_manager |
Reference to conditions manager. More... | |
UserPool & | m_pool |
Reference to the user pool object. More... | |
const Dependencies & | m_dependencies |
Dependency container to be resolved. More... | |
ConditionUpdateUserContext * | m_userParam |
User defined optional processing parameter. More... | |
const IOVType * | m_iovType = 0 |
Local cacheL pool's IOV type. More... | |
WorkConditions | m_todo |
The objects created during processing. More... | |
State | m_state = CREATED |
Handler's state. More... | |
Work * | m_block = 0 |
Current block work item. More... | |
Work * | m_currentWork = 0 |
Current item of the block. More... | |
Callback handler to update condition dependencies.
Fully stack based condition resolution. Any user request for dependent conditions are fully handled by
The ConditionsDependencyHandler implements the ConditionResolver interface, which is offered to the clients as an embedded parameter during the conversion mechanism. Clients must direct any subsequent conditions access to the ConditionResolver interface in order to allow for upgrades of this implementation which might not be polymorph.
Definition at line 50 of file ConditionsDependencyHandler.h.
typedef std::map<Condition::key_type, const ConditionDependency*> dd4hep::cond::ConditionsDependencyHandler::Dependencies |
Definition at line 86 of file ConditionsDependencyHandler.h.
typedef std::map<Condition::key_type, Work*> dd4hep::cond::ConditionsDependencyHandler::WorkConditions |
Definition at line 87 of file ConditionsDependencyHandler.h.
Obect state definitions.
Enumerator | |
---|---|
INVALID | |
CREATED | |
RESOLVED |
Definition at line 53 of file ConditionsDependencyHandler.h.
ConditionsDependencyHandler::ConditionsDependencyHandler | ( | ConditionsManager | mgr, |
UserPool & | pool, | ||
const Dependencies & | dependencies, | ||
ConditionUpdateUserContext * | user_param | ||
) |
Initializing constructor.
Default constructor.
Definition at line 63 of file ConditionsDependencyHandler.cpp.
ConditionsDependencyHandler::~ConditionsDependencyHandler | ( | ) |
Default destructor.
Definition at line 82 of file ConditionsDependencyHandler.cpp.
void ConditionsDependencyHandler::compute | ( | ) |
Access the conditions created during processing.
1rst pass: Compute/create the missing conditions
Definition at line 94 of file ConditionsDependencyHandler.cpp.
|
inlineoverridevirtual |
Accessor for the current conditons mapping.
Implements dd4hep::cond::ConditionResolver.
Definition at line 140 of file ConditionsDependencyHandler.h.
|
overridevirtual |
Access to the detector description instance.
ConditionResolver implementation: Access to the detector description instance.
ConditionResolver interface implementation
Implements dd4hep::cond::ConditionResolver.
Definition at line 89 of file ConditionsDependencyHandler.cpp.
|
protected |
Internal call to trigger update callback.
Definition at line 291 of file ConditionsDependencyHandler.cpp.
|
overridevirtual |
Interface to access conditions by hash value of the DetElement (only valid at resolve!)
Implements dd4hep::cond::ConditionResolver.
Definition at line 202 of file ConditionsDependencyHandler.cpp.
|
inlineoverridevirtual |
ConditionResolver implementation: Interface to access conditions.
Implements dd4hep::cond::ConditionResolver.
Definition at line 148 of file ConditionsDependencyHandler.h.
|
overridevirtual |
Interface to access conditions by hash value.
ConditionResolver implementation: Interface to access conditions.
Implements dd4hep::cond::ConditionResolver.
Definition at line 217 of file ConditionsDependencyHandler.cpp.
|
overridevirtual |
Interface to access conditions by hash value.
ConditionResolver implementation: Interface to access conditions.
If we are not already resolving here, we follow the normal procedure
Implements dd4hep::cond::ConditionResolver.
Definition at line 223 of file ConditionsDependencyHandler.cpp.
|
inlineoverridevirtual |
ConditionResolver implementation: Interface to access conditions.
Implements dd4hep::cond::ConditionResolver.
Definition at line 142 of file ConditionsDependencyHandler.h.
|
inlineoverridevirtual |
Interface to access conditions by conditions key.
Implements dd4hep::cond::ConditionResolver.
Definition at line 145 of file ConditionsDependencyHandler.h.
|
overridevirtual |
Interface to access conditions by hash value of the DetElement (only valid at resolve!)
Implements dd4hep::cond::ConditionResolver.
Definition at line 172 of file ConditionsDependencyHandler.cpp.
|
overridevirtual |
Interface to access conditions by hash value of the item (only valid at resolve!)
Implements dd4hep::cond::ConditionResolver.
Definition at line 178 of file ConditionsDependencyHandler.cpp.
|
inlineoverridevirtual |
Access to the conditions manager.
Implements dd4hep::cond::ConditionResolver.
Definition at line 136 of file ConditionsDependencyHandler.h.
|
overridevirtual |
Handle multi-condition inserts by callbacks: block insertions of conditions with identical IOV.
Implements dd4hep::cond::ConditionResolver.
Definition at line 166 of file ConditionsDependencyHandler.cpp.
Interface to handle multi-condition inserts by callbacks: One single insert.
Implements dd4hep::cond::ConditionResolver.
Definition at line 160 of file ConditionsDependencyHandler.cpp.
|
inlineoverridevirtual |
Access to pool IOV.
Implements dd4hep::cond::ConditionResolver.
Definition at line 138 of file ConditionsDependencyHandler.h.
void ConditionsDependencyHandler::resolve | ( | ) |
2nd pass: Handler callback for the second turn to resolve missing dependencies
Definition at line 109 of file ConditionsDependencyHandler.cpp.
|
protected |
Current block work item.
Definition at line 105 of file ConditionsDependencyHandler.h.
|
protected |
Current item of the block.
Definition at line 107 of file ConditionsDependencyHandler.h.
|
protected |
Dependency container to be resolved.
Definition at line 95 of file ConditionsDependencyHandler.h.
|
protected |
Local cacheL pool's IOV type.
Definition at line 99 of file ConditionsDependencyHandler.h.
|
protected |
Reference to conditions manager.
Definition at line 91 of file ConditionsDependencyHandler.h.
|
protected |
Reference to the user pool object.
Definition at line 93 of file ConditionsDependencyHandler.h.
Handler's state.
Definition at line 103 of file ConditionsDependencyHandler.h.
|
protected |
The objects created during processing.
Definition at line 101 of file ConditionsDependencyHandler.h.
|
protected |
User defined optional processing parameter.
Definition at line 97 of file ConditionsDependencyHandler.h.
|
mutable |
Number of callbacks to the handler for monitoring.
Definition at line 110 of file ConditionsDependencyHandler.h.