DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Conditions slice object. Defines which conditions should be loaded by the ConditionsManager. More...
#include <ConditionsSlice.h>
Classes | |
class | Inserter |
Helper to simplify the registration of new condtitions from arbitrary containers. More... | |
Public Types | |
enum | ManageFlag { REGISTER_MANAGER = 1<<0, REGISTER_POOL = 1<<1, REGISTER_FULL = REGISTER_MANAGER|REGISTER_POOL } |
enum | LoadFlags { REF_POOLS = 1<<1 } |
typedef Condition::key_type | key_type |
typedef std::vector< std::shared_ptr< ConditionsPool > > | ContainedPools |
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 | |
ConditionsSlice ()=delete | |
Default constructor. More... | |
ConditionsSlice (ConditionsManager m) | |
Initializing constructor. More... | |
ConditionsSlice (ConditionsManager m, const std::shared_ptr< ConditionsContent > &c) | |
Initializing constructor. More... | |
ConditionsSlice (const ConditionsSlice ©) | |
Copy constructor (Special, partial copy only. Hence no assignment!) More... | |
virtual | ~ConditionsSlice () |
Default destructor. More... | |
size_t | size () const |
Total size of all conditions contained in the slice. More... | |
void | refPools () |
Set flag to reference the used pools during prepare. More... | |
void | derefPools () |
Set flag to not reference the used pools during prepare (and drop possibly pending) More... | |
const ConditionsContent::Conditions & | conditions () const |
Access the map of conditions from the desired content. More... | |
const ConditionsContent::Dependencies & | derived () const |
Access the map of computational conditions from the desired content. More... | |
ConditionsContent::Conditions & | missingConditions () |
Access the map of missing conditions (only valid after preparation) More... | |
ConditionsContent::Dependencies & | missingDerivations () |
Access the map of missing computational conditions (only valid after preparation) More... | |
const IOV & | iov () const |
Access the combined IOV of the slice from the pool. More... | |
void | reset () |
Clear the conditions content and the user pool. More... | |
template<typename T > | |
void | manage (const T &conds, ManageFlag flg) |
Insert a set of conditions to the slice AND register them to the conditions manager. More... | |
virtual bool | manage (Condition condition, ManageFlag flg) |
Insert a set of conditions to the slice AND register them to the conditions manager. More... | |
std::vector< Condition > | get (DetElement detector) const |
Access all conditions from a given detector element. More... | |
virtual bool | insert (DetElement detector, Condition::itemkey_type key, Condition condition) override |
ConditionsMap overload: Add a condition directly to the slice. More... | |
virtual Condition | get (DetElement detector, Condition::itemkey_type key) const override |
ConditionsMap overload: Access a condition. More... | |
virtual std::vector< Condition > | get (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper) const override |
No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper]. More... | |
virtual void | scan (const Condition::Processor &processor) const override |
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 override |
ConditionsMap overload: Interface to partially scan data content of the conditions mapping. More... | |
Public Member Functions inherited from dd4hep::ConditionsMap | |
virtual | ~ConditionsMap ()=default |
Standard destructor. More... | |
Public Attributes | |
ConditionsManager | manager |
Reference to the conditions manager. More... | |
std::unique_ptr< UserPool > | pool |
Reference to the user pool managing all conditions of this slice. More... | |
std::shared_ptr< ConditionsContent > | content |
Container of conditions required by this slice. More... | |
ConditionsManager::Result | status |
Store the result of the prepare step. More... | |
ContainedPools | used_pools |
If requested refence the used pools with a shared pointer to inhibit cleanup. More... | |
unsigned long | flags = 0 |
Flag to steer conditions management. More... | |
Protected Member Functions | |
ConditionsSlice & | operator= (const ConditionsSlice ©)=delete |
Default assignment operator. More... | |
virtual bool | manage (ConditionsPool *pool, Condition condition, ManageFlag flg) |
Local optimization: Insert a set of conditions to the slice AND register them to the conditions manager. More... | |
Static Protected Member Functions | |
static Condition | select_cond (Condition c) |
template<typename T > | |
static Condition | select_cond (const std::pair< T, Condition > &c) |
Protected Attributes | |
ConditionsContent::Conditions | m_missingConditions |
If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not loaded. More... | |
ConditionsContent::Dependencies | m_missingDerivations |
If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not computed. More... | |
Conditions slice object. Defines which conditions should be loaded by the ConditionsManager.
Object contains set of required conditions keys to be loaded to the user pool. It alkso contains the load information for the required conditions (conditions addresses). The address objects depend on the actual loader mechanism and must be specified the user. The information is then chained through the calls and made availible to the loader object.
On return it contains the individual condition load information.
Referenced by: ConditonsUserPool, ConditionsManager
Definition at line 53 of file ConditionsSlice.h.
typedef std::vector<std::shared_ptr<ConditionsPool> > dd4hep::cond::ConditionsSlice::ContainedPools |
Definition at line 56 of file ConditionsSlice.h.
Definition at line 55 of file ConditionsSlice.h.
Enumerator | |
---|---|
REF_POOLS |
Definition at line 63 of file ConditionsSlice.h.
Enumerator | |
---|---|
REGISTER_MANAGER | |
REGISTER_POOL | |
REGISTER_FULL |
Definition at line 58 of file ConditionsSlice.h.
|
delete |
Default constructor.
ConditionsSlice::ConditionsSlice | ( | ConditionsManager | m | ) |
Initializing constructor.
Definition at line 23 of file ConditionsSlice.cpp.
ConditionsSlice::ConditionsSlice | ( | ConditionsManager | m, |
const std::shared_ptr< ConditionsContent > & | c | ||
) |
Initializing constructor.
Definition at line 29 of file ConditionsSlice.cpp.
ConditionsSlice::ConditionsSlice | ( | const ConditionsSlice & | copy | ) |
Copy constructor (Special, partial copy only. Hence no assignment!)
Definition at line 37 of file ConditionsSlice.cpp.
|
virtual |
Default destructor.
Definition at line 44 of file ConditionsSlice.cpp.
|
inline |
Access the map of conditions from the desired content.
Definition at line 153 of file ConditionsSlice.h.
void ConditionsSlice::derefPools | ( | ) |
Set flag to not reference the used pools during prepare (and drop possibly pending)
Definition at line 50 of file ConditionsSlice.cpp.
|
inline |
Access the map of computational conditions from the desired content.
Definition at line 155 of file ConditionsSlice.h.
std::vector< dd4hep::Condition > ConditionsSlice::get | ( | DetElement | detector | ) | const |
Access all conditions from a given detector element.
Definition at line 108 of file ConditionsSlice.cpp.
|
overridevirtual |
ConditionsMap overload: Access a condition.
Implements dd4hep::ConditionsMap.
Definition at line 142 of file ConditionsSlice.cpp.
|
overridevirtual |
No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper].
Reimplemented from dd4hep::ConditionsMap.
Definition at line 113 of file ConditionsSlice.cpp.
|
overridevirtual |
ConditionsMap overload: Add a condition directly to the slice.
ConditionsMap interface implementation:
Implements dd4hep::ConditionsMap.
Definition at line 120 of file ConditionsSlice.cpp.
const dd4hep::IOV & ConditionsSlice::iov | ( | ) | const |
Access the combined IOV of the slice from the pool.
Definition at line 56 of file ConditionsSlice.cpp.
|
virtual |
Insert a set of conditions to the slice AND register them to the conditions manager.
Note: The conditions already require a valid hash key
Definition at line 102 of file ConditionsSlice.cpp.
|
protectedvirtual |
Local optimization: Insert a set of conditions to the slice AND register them to the conditions manager.
Note: The conditions already require a valid hash key
Definition at line 70 of file ConditionsSlice.cpp.
|
inline |
Insert a set of conditions to the slice AND register them to the conditions manager.
Note: The conditions already require a valid hash key
Definition at line 167 of file ConditionsSlice.h.
|
inline |
Access the map of missing conditions (only valid after preparation)
Definition at line 157 of file ConditionsSlice.h.
|
inline |
Access the map of missing computational conditions (only valid after preparation)
Definition at line 159 of file ConditionsSlice.h.
|
protecteddelete |
Default assignment operator.
|
inline |
Set flag to reference the used pools during prepare.
Definition at line 149 of file ConditionsSlice.h.
void ConditionsSlice::reset | ( | ) |
Clear the conditions content and the user pool.
Clear the conditions access and the user pool.
Definition at line 64 of file ConditionsSlice.cpp.
|
overridevirtual |
ConditionsMap overload: Interface to scan data content of the conditions mapping.
Implements dd4hep::ConditionsMap.
Definition at line 147 of file ConditionsSlice.cpp.
|
overridevirtual |
ConditionsMap overload: Interface to partially scan data content of the conditions mapping.
Reimplemented from dd4hep::ConditionsMap.
Definition at line 152 of file ConditionsSlice.cpp.
Definition at line 131 of file ConditionsSlice.h.
|
inlinestaticprotected |
Definition at line 133 of file ConditionsSlice.h.
|
inline |
Total size of all conditions contained in the slice.
Definition at line 147 of file ConditionsSlice.h.
std::shared_ptr<ConditionsContent> dd4hep::cond::ConditionsSlice::content |
Container of conditions required by this slice.
Definition at line 109 of file ConditionsSlice.h.
unsigned long dd4hep::cond::ConditionsSlice::flags = 0 |
Flag to steer conditions management.
Definition at line 116 of file ConditionsSlice.h.
|
protected |
If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not loaded.
Definition at line 120 of file ConditionsSlice.h.
|
protected |
If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not computed.
Definition at line 122 of file ConditionsSlice.h.
ConditionsManager dd4hep::cond::ConditionsSlice::manager |
Reference to the conditions manager.
Not used by the object, simple for convenience. Then all actors are lumped together, which are used by the client code.
Definition at line 105 of file ConditionsSlice.h.
std::unique_ptr<UserPool> dd4hep::cond::ConditionsSlice::pool |
Reference to the user pool managing all conditions of this slice.
Definition at line 107 of file ConditionsSlice.h.
ConditionsManager::Result dd4hep::cond::ConditionsSlice::status |
Store the result of the prepare step.
Definition at line 112 of file ConditionsSlice.h.
ContainedPools dd4hep::cond::ConditionsSlice::used_pools |
If requested refence the used pools with a shared pointer to inhibit cleanup.
Definition at line 114 of file ConditionsSlice.h.