DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
The data class behind a conditions manager handle. More...
#include <Manager_Type1.h>
Public Types | |
typedef std::vector< ConditionsIOVPool * > | TypedConditionPool |
Public Types inherited from dd4hep::cond::ConditionsManagerObject | |
typedef Condition::key_type | key_type |
typedef std::pair< ConditionsListener *, void * > | Listener |
typedef std::set< Listener > | Listeners |
typedef std::unique_ptr< ConditionsDataLoader > | Loader |
typedef ConditionsManager::Result | Result |
Public Member Functions | |
Manager_Type1 (Detector &description) | |
Standard constructor. More... | |
virtual | ~Manager_Type1 () |
Default destructor. More... | |
void | initialize () |
Access to managed pool of typed conditions indexed by IOV-type and IOV key. More... | |
virtual std::pair< bool, const IOVType * > | registerIOVType (size_t iov_index, const std::string &iov_name) final |
Register new IOV type if it does not (yet) exist. More... | |
virtual const std::vector< IOVType > & | iovTypes () const final |
Access IOV by its type. More... | |
virtual const IOVType * | iovType (size_t iov_index) const final |
Access IOV by its type. More... | |
virtual const IOVType * | iovType (const std::string &iov_name) const final |
Access IOV by its name. More... | |
virtual ConditionsPool * | registerIOV (const IOVType &typ, IOV::Key key) final |
Register IOV with type and key. More... | |
virtual ConditionsIOVPool * | iovPool (const IOVType &type) const final |
Access conditions multi IOV pool by iov type. More... | |
virtual bool | registerUnlocked (ConditionsPool &pool, Condition cond) final |
Register new condition with the conditions store. Unlocked version, not multi-threaded. More... | |
virtual size_t | blockRegister (ConditionsPool &pool, const std::vector< Condition > &cond) const final |
Register a whole block of conditions with identical IOV. More... | |
virtual void | adoptCleanup (ConditionsCleanup *cleaner) final |
Adopt cleanup handler. If a handler is registered, it is invoked at every "prepare" step. More... | |
virtual int | clean (const IOVType *typ, int max_age) final |
Clean conditions, which are above the age limit. More... | |
virtual std::pair< int, int > | clean (const ConditionsCleanup &cleaner) final |
Invoke cache cleanup with user defined policy. More... | |
virtual std::pair< int, int > | clear () final |
Full cleanup of all managed conditions. More... | |
virtual void | pushUpdates () final |
Push all pending updates to the conditions store. More... | |
virtual std::unique_ptr< UserPool > | createUserPool (const IOVType *iovT) const |
Create empty user pool object. More... | |
virtual Result | prepare (const IOV &req_iov, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt) final |
Prepare all updates for the given keys to the clients with the defined IOV. More... | |
virtual Result | load (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0) final |
Load all updates to the clients with the defined IOV (1rst step of prepare) More... | |
virtual Result | compute (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0) final |
Compute all derived conditions with the defined IOV (2nd step of prepare) More... | |
Public Member Functions inherited from dd4hep::cond::ConditionsManagerObject | |
ConditionsManagerObject (Detector &description) | |
Default constructor. More... | |
virtual | ~ConditionsManagerObject () |
Default destructor. More... | |
Detector & | detectorDescription () const |
Access to the detector description instance. More... | |
ConditionsDataLoader * | loader () const |
Access to the data loader. More... | |
bool | doLoadConditions () const |
Access to load flag. More... | |
bool | doOutputUnloaded () const |
Access to flag to indicate if unloaded items should be saved to the slice (or not) More... | |
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... | |
void | callOnRegister (const Listener &callee, bool add) |
(Un)Registration of conditions listeners with callback when a new condition is registered More... | |
void | callOnRemove (const Listener &callee, bool add) |
(Un)Registration of conditions listeners with callback when a condition is unregistered More... | |
const std::vector< const IOVType * > | iovTypesUsed () const |
Access the used/registered IOV types. More... | |
void | fromString (const std::string &iov_str, IOV &iov) |
Create IOV from string. More... | |
ConditionsPool * | registerIOV (const std::string &data) |
Register IOV using new string data. 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 Member Functions inherited from dd4hep::PropertyConfigurable | |
PropertyConfigurable () | |
Standard constructor. More... | |
virtual | ~PropertyConfigurable () |
Default destructor. More... | |
virtual PropertyManager & | properties () override |
Access to the properties of the object. More... | |
virtual const PropertyManager & | properties () const override |
Access to the properties of the object. More... | |
virtual bool | hasProperty (const std::string &name) const override |
Check property for existence. More... | |
virtual Property & | property (const std::string &name) override |
Access single property. More... | |
template<typename T > | |
void | declareProperty (const std::string &nam, T &val) |
Declare property. More... | |
template<typename T > | |
void | declareProperty (const char *nam, T &val) |
Declare property. More... | |
Public Member Functions inherited from dd4hep::PropertyInterface | |
virtual | ~PropertyInterface ()=default |
Default destructor. More... | |
Public Member Functions inherited from dd4hep::ObjectExtensions | |
ObjectExtensions (const std::type_info &parent_type) | |
Default constructor. More... | |
ObjectExtensions (const ObjectExtensions ©)=delete | |
Copy constructor. More... | |
virtual | ~ObjectExtensions () |
Default destructor. More... | |
ObjectExtensions & | operator= (const ObjectExtensions ©)=delete |
Assignment operator. More... | |
void | initialize () |
Initialize non-persistent object containers (e.g. after loading from ROOT file) More... | |
void | move (ObjectExtensions ©) |
Move extensions to target object. More... | |
void | clear (bool destroy=true) |
Clear all extensions. More... | |
void | copyFrom (const std::map< unsigned long long int, ExtensionEntry * > &ext, void *arg) |
Copy object extensions from another object. Hosting type must be identical! More... | |
void * | addExtension (unsigned long long int key, ExtensionEntry *entry) |
Add an extension object to the detector element. More... | |
void * | removeExtension (unsigned long long int key, bool destroy) |
Remove an existing extension object from the instance. More... | |
void * | extension (unsigned long long int key, bool alert) const |
Access an existing extension object from the detector element. More... | |
void * | extension (unsigned long long int key) const |
Access an existing extension object from the detector element. More... | |
Public Attributes | |
TypedConditionPool | m_rawPool |
Managed pool of typed conditions indexed by IOV-type and IOV key. More... | |
int | m_locked |
Public access: if locked, DetElements stay intact and are not altered. More... | |
Public Attributes inherited from dd4hep::NamedObject | |
std::string | name |
The object name. More... | |
std::string | type |
The object type. More... | |
Public Attributes inherited from dd4hep::ObjectExtensions | |
std::map< unsigned long long int, ExtensionEntry * > | extensions |
The extensions object. More... | |
Protected Member Functions | |
bool | select (key_type key, const IOV &req_validity, RangeConditions &conditions) |
Retrieve a condition set given a Detector Element and the conditions name according to their validity. More... | |
bool | select_range (key_type key, const IOV &req_validity, RangeConditions &conditions) |
Retrieve a condition set given a Detector Element and the conditions name according to their validity. More... | |
void | __get_checked_pool (const IOV &required_validity, std::unique_ptr< UserPool > &user_pool) |
Register a set of new managed condition for an IOV range. Called by __load_immediate. More... | |
Condition | __queue_update (cond::Entry *data) |
Protected Member Functions inherited from dd4hep::cond::ConditionsManagerObject | |
void | registerCallee (Listeners &listeners, const Listener &callee, bool add) |
Register callback listener object. More... | |
Protected Attributes | |
int | m_maxIOVTypes |
Property: maximal number of IOV types to be handled. More... | |
std::string | m_poolType |
Property: ConditionsPool constructor type (default: empty. MUST BE SET!) More... | |
std::string | m_updateType |
Property: UpdatePool constructor type (default: DD4hep_ConditionsLinearUpdatePool) More... | |
std::string | m_userType |
Property: UserPool constructor type (default: DD4hep_ConditionsLinearUserPool) More... | |
std::string | m_loaderType |
Property: Conditions loader type (default: "multi" -> DD4hep_Conditions_multi_Loader) More... | |
std::vector< IOVType > | m_iovTypes |
Collection of IOV types managed. More... | |
dd4hep_mutex_t | m_updateLock |
Lock to protect the update/delayed conditions pool. More... | |
dd4hep_mutex_t | m_poolLock |
Lock to protect the pool of all known conditions. More... | |
std::unique_ptr< UpdatePool > | m_updatePool |
Reference to update conditions pool. More... | |
std::unique_ptr< ConditionsCleanup > | m_cleaner |
Reference to the default conditions cleanup object (if registered) More... | |
Protected Attributes inherited from dd4hep::cond::ConditionsManagerObject | |
Detector & | m_detDesc |
Reference to main detector description object. More... | |
Listeners | m_onRegister |
Conditions listeners on registration of new conditions. More... | |
Listeners | m_onRemove |
Conditions listeners on de-registration of new conditions. More... | |
Loader | m_loader |
Reference to the data loader userd by this instance. More... | |
bool | m_doLoad = true |
Property: Flag to indicate if items should be loaded (or not) More... | |
bool | m_doOutputUnloaded = false |
Property: Flag to indicate if unloaded items should be saved to the slice (or not) More... | |
Protected Attributes inherited from dd4hep::PropertyConfigurable | |
PropertyManager | m_properties |
Property pool. More... | |
The data class behind a conditions manager handle.
For convenience, the class definition is here. See ConditionsManager.cpp for the implementation.
Definition at line 45 of file Manager_Type1.h.
typedef std::vector<ConditionsIOVPool*> dd4hep::cond::Manager_Type1::TypedConditionPool |
Definition at line 49 of file Manager_Type1.h.
Manager_Type1::Manager_Type1 | ( | Detector & | description | ) |
Standard constructor.
Definition at line 136 of file Manager_Type1.cpp.
|
virtual |
Default destructor.
Definition at line 151 of file Manager_Type1.cpp.
|
protected |
Register a set of new managed condition for an IOV range. Called by __load_immediate.
Helper to check iov and user pool and create user pool if not present.
Helper to check iov and user pool and create user pool if not present
Definition at line 324 of file Manager_Type1.cpp.
|
protected |
Generic interface of any concrete instance
Set a single conditions value to be managed. Requires EXTERNALLY held lock on update pool!
Set a single conditions value to be managed. Requires external lock on update pool!
Definition at line 292 of file Manager_Type1.cpp.
|
finalvirtual |
Adopt cleanup handler. If a handler is registered, it is invoked at every "prepare" step.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 343 of file Manager_Type1.cpp.
|
finalvirtual |
Register a whole block of conditions with identical IOV.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 270 of file Manager_Type1.cpp.
|
finalvirtual |
Invoke cache cleanup with user defined policy.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 359 of file Manager_Type1.cpp.
|
finalvirtual |
Clean conditions, which are above the age limit.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 348 of file Manager_Type1.cpp.
|
finalvirtual |
Full cleanup of all managed conditions.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 372 of file Manager_Type1.cpp.
|
finalvirtual |
Compute all derived conditions with the defined IOV (2nd step of prepare)
Invoke auto cleanup if registered
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 534 of file Manager_Type1.cpp.
Create empty user pool object.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 544 of file Manager_Type1.cpp.
|
virtual |
Access to managed pool of typed conditions indexed by IOV-type and IOV key.
Initialize object and define factories
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 156 of file Manager_Type1.cpp.
|
finalvirtual |
Access conditions multi IOV pool by iov type.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 238 of file Manager_Type1.cpp.
|
finalvirtual |
Access IOV by its name.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 208 of file Manager_Type1.cpp.
|
finalvirtual |
Access IOV by its type.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 198 of file Manager_Type1.cpp.
|
inlinefinalvirtual |
Access IOV by its type.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 125 of file Manager_Type1.h.
|
finalvirtual |
Load all updates to the clients with the defined IOV (1rst step of prepare)
First push any pending updates and register them to pending pools...
Now update/fill the user pool
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 523 of file Manager_Type1.cpp.
|
finalvirtual |
Prepare all updates for the given keys to the clients with the defined IOV.
First push any pending updates and register them to pending pools...
Now update/fill the user pool
Invoke auto cleanup if registered
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 507 of file Manager_Type1.cpp.
|
finalvirtual |
Push all pending updates to the conditions store.
Note: This does not yet make the new conditions availible to the clients
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 385 of file Manager_Type1.cpp.
|
finalvirtual |
Register IOV with type and key.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 216 of file Manager_Type1.cpp.
|
finalvirtual |
Register new IOV type if it does not (yet) exist.
Returns (false,pointer) if IOV existed and (true,pointer) if new IOV was registered to the manager.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 175 of file Manager_Type1.cpp.
|
finalvirtual |
Register new condition with the conditions store. Unlocked version, not multi-threaded.
Implements dd4hep::cond::ConditionsManagerObject.
Definition at line 243 of file Manager_Type1.cpp.
|
protected |
Retrieve a condition set given a Detector Element and the conditions name according to their validity.
Definition at line 408 of file Manager_Type1.cpp.
|
protected |
Retrieve a condition set given a Detector Element and the conditions name according to their validity.
Definition at line 425 of file Manager_Type1.cpp.
|
protected |
Reference to the default conditions cleanup object (if registered)
Definition at line 77 of file Manager_Type1.h.
|
protected |
Collection of IOV types managed.
Definition at line 67 of file Manager_Type1.h.
|
protected |
Property: Conditions loader type (default: "multi" -> DD4hep_Conditions_multi_Loader)
Definition at line 64 of file Manager_Type1.h.
int dd4hep::cond::Manager_Type1::m_locked |
Public access: if locked, DetElements stay intact and are not altered.
Definition at line 83 of file Manager_Type1.h.
|
protected |
Property: maximal number of IOV types to be handled.
Generic interface of any concrete instance
Definition at line 56 of file Manager_Type1.h.
|
protected |
Lock to protect the pool of all known conditions.
Definition at line 73 of file Manager_Type1.h.
|
protected |
Property: ConditionsPool constructor type (default: empty. MUST BE SET!)
Definition at line 58 of file Manager_Type1.h.
TypedConditionPool dd4hep::cond::Manager_Type1::m_rawPool |
Managed pool of typed conditions indexed by IOV-type and IOV key.
Definition at line 81 of file Manager_Type1.h.
|
protected |
Lock to protect the update/delayed conditions pool.
Specialized interface only used by this implementation
Definition at line 71 of file Manager_Type1.h.
|
protected |
Reference to update conditions pool.
Definition at line 75 of file Manager_Type1.h.
|
protected |
Property: UpdatePool constructor type (default: DD4hep_ConditionsLinearUpdatePool)
Definition at line 60 of file Manager_Type1.h.
|
protected |
Property: UserPool constructor type (default: DD4hep_ConditionsLinearUserPool)
Definition at line 62 of file Manager_Type1.h.