DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Manager class for condition handles. More...
#include <ConditionsManager.h>
Classes | |
class | Result |
Result of a prepare call to the conditions manager. More... | |
Public Types | |
typedef ConditionsManagerObject | Object |
Standard object type. More... | |
typedef std::vector< IOVType > | IOVTypes |
Public Types inherited from dd4hep::Handle< ConditionsManagerObject > | |
typedef ConditionsManagerObject | Object |
Extern accessible definition of the contained element type. More... | |
typedef Handle< ConditionsManagerObject > | Base |
Self type: used by sub-classes. More... | |
Public Member Functions | |
ConditionsManager (Detector &description) | |
Initializing constructor - used only by examples. More... | |
ConditionsManager (Detector &description, const std::string &factory) | |
Initializing constructor to create a manager from the factory name. More... | |
ConditionsManager ()=default | |
Default constructor. More... | |
ConditionsManager (Object *p) | |
Constructor to be used with valid pointer to object. More... | |
ConditionsManager (const ConditionsManager &c)=default | |
Constructor to assing handle of the same type. More... | |
template<typename Q > | |
ConditionsManager (const Handle< Q > &e) | |
Constructor to be used assigning from different type. More... | |
~ConditionsManager ()=default | |
Default destructor. More... | |
ConditionsManager & | operator= (const ConditionsManager &c)=default |
Assignment operator. More... | |
ConditionsManager & | initialize () |
Initialize the object after having set the properties. More... | |
Detector & | detectorDescription () const |
Access the detector description. More... | |
Property & | operator[] (const std::string &property_name) const |
Access to properties. More... | |
PropertyManager & | properties () const |
Access to the property manager. More... | |
ConditionsDataLoader & | loader () const |
Access the conditions loader. More... | |
const std::vector< const IOVType * > | iovTypesUsed () const |
Access the used/registered IOV types. More... | |
const IOVType * | iovType (const std::string &iov_name) const |
Access IOV by its name. More... | |
ConditionsIOVPool * | iovPool (const IOVType &type) const |
Access conditions multi IOV pool by iov type. More... | |
void | fromString (const std::string &iov_str, IOV &iov) const |
Create IOV from string. More... | |
std::pair< bool, const IOVType * > | registerIOVType (size_t iov_type, const std::string &iov_name) const |
Register new IOV type if it does not (yet) exist. More... | |
ConditionsPool * | registerIOV (const IOV &iov) const |
Register IOV with type and key. More... | |
ConditionsPool * | registerIOV (const IOVType &typ, IOV::Key key) const |
Register IOV with type and key. More... | |
ConditionsPool * | registerIOV (const std::string &iov_rep) const |
Register IOV with type and key. More... | |
bool | registerUnlocked (ConditionsPool &pool, Condition cond) const |
Register new condition with the conditions store. Unlocked version, not multi-threaded. More... | |
size_t | blockRegister (ConditionsPool &pool, const std::vector< Condition > &cond) const |
Register a whole block of conditions with identical IOV. More... | |
void | pushUpdates () const |
Push all pending updates to the conditions store. More... | |
void | adoptCleanup (ConditionsCleanup *cleaner) const |
Adopt cleanup handler. If a handler is registered, it is invoked at every "prepare" step. More... | |
void | clean (const ConditionsCleanup &cleaner) const |
Invoke cache cleanup with user defined policy. More... | |
void | clean (const IOVType *typ, int max_age) const |
Clean conditions, which are above the age limit. More... | |
void | clear () const |
Full cleanup of all managed conditions. More... | |
std::unique_ptr< UserPool > | createUserPool (const IOVType *iovT) const |
Create empty user pool object. More... | |
Result | prepare (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0) const |
Prepare all updates to the clients with the defined IOV. More... | |
Result | load (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0) const |
Load all updates to the clients with the defined IOV (1rst step of prepare) More... | |
Result | compute (const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0) const |
Compute all derived conditions with the defined IOV (2nd step of prepare) More... | |
Public Member Functions inherited from dd4hep::Handle< ConditionsManagerObject > | |
Handle ()=default | |
Default constructor. More... | |
Handle (Handle< ConditionsManagerObject > &&element)=default | |
Copy constructor. More... | |
Handle (const Handle< ConditionsManagerObject > &element)=default | |
Copy constructor. More... | |
Handle (ConditionsManagerObject *element) | |
Initializing constructor from pointer. More... | |
Handle (Q *element) | |
Initializing constructor from unrelated pointer with type checking. More... | |
Handle (const Handle< Q > &element) | |
Initializing constructor from unrelated handle with type checking. More... | |
Handle< ConditionsManagerObject > & | operator= (Handle< ConditionsManagerObject > &&element)=default |
Assignment move operator. More... | |
Handle< ConditionsManagerObject > & | operator= (const Handle< ConditionsManagerObject > &element)=default |
Assignment copy operator. More... | |
bool | operator== (const Handle< ConditionsManagerObject > &element) const |
Boolean operator == used for RB tree insertions. More... | |
bool | operator< (const Handle< ConditionsManagerObject > &element) const |
Boolean operator < used for RB tree insertions. More... | |
bool | operator> (const Handle< ConditionsManagerObject > &element) const |
Boolean operator > used for RB tree insertions. More... | |
bool | isValid () const |
Check the validity of the object held by the handle. More... | |
bool | operator! () const |
Check the validity of the object held by the handle. More... | |
Handle< ConditionsManagerObject > & | clear () |
Release the object held by the handle. More... | |
ConditionsManagerObject * | operator-> () const |
Access the held object using the -> operator. More... | |
operator ConditionsManagerObject & () const | |
Automatic type conversion to an object references. More... | |
ConditionsManagerObject & | operator* () const |
Access the held object using the * operator. More... | |
ConditionsManagerObject * | ptr () const |
Access to the held object. More... | |
Q * | _ptr () const |
Access to an unrelated object type. More... | |
Q * | data () const |
Access to an unrelated object type. More... | |
Q & | object () const |
Access to an unrelated object type. More... | |
ConditionsManagerObject * | access () const |
Checked object access. Throws invalid handle runtime exception if invalid handle. More... | |
const char * | name () const |
Access the object name (or "" if not supported by the object) More... | |
const char * | name () const |
const char * | name () const |
void | assign (Object *n, const std::string &nam, const std::string &title) |
Assign a new named object. Note: object references must be managed by the user. More... | |
void | assign (_Segmentation *s, const std::string &n, const std::string &) |
void | assign (NamedObject *p, const std::string &n, const std::string &t) |
void | destroy () |
Destroy the underlying object (be careful here: things are not reference counted)! More... | |
Static Public Member Functions | |
template<typename T > | |
static ConditionsManager | from (T &host) |
Static accessor if installed as an extension. More... | |
template<> | |
ConditionsManager | from (Detector &host) |
Access specialization. More... | |
Static Public Member Functions inherited from dd4hep::Handle< ConditionsManagerObject > | |
static void | bad_assignment (const std::type_info &from, const std::type_info &to) |
Helper routine called when unrelated types are assigned. More... | |
Additional Inherited Members | |
Public Attributes inherited from dd4hep::Handle< ConditionsManagerObject > | |
ConditionsManagerObject * | m_element |
Single and only data member: Reference to the actual element. More... | |
typedef std::vector<IOVType> dd4hep::cond::ConditionsManager::IOVTypes |
Definition at line 51 of file ConditionsManager.h.
Standard object type.
Definition at line 50 of file ConditionsManager.h.
ConditionsManager::ConditionsManager | ( | Detector & | description | ) |
Initializing constructor - used only by examples.
Default constructor.
Definition at line 163 of file ConditionsManager.cpp.
ConditionsManager::ConditionsManager | ( | Detector & | description, |
const std::string & | factory | ||
) |
Initializing constructor to create a manager from the factory name.
Initializing constructor to create a named manager.
Definition at line 153 of file ConditionsManager.cpp.
|
default |
Default constructor.
|
inline |
Constructor to be used with valid pointer to object.
Definition at line 97 of file ConditionsManager.h.
|
default |
Constructor to assing handle of the same type.
|
inline |
Constructor to be used assigning from different type.
Definition at line 103 of file ConditionsManager.h.
|
default |
Default destructor.
void ConditionsManager::adoptCleanup | ( | ConditionsCleanup * | cleaner | ) | const |
Adopt cleanup handler. If a handler is registered, it is invoked at every "prepare" step.
Note: This may be convenient under certain circumstances, however at the expense of more flexible approaches to perform the conditions data cleanup. Any previously registered instance shall be deleted.
Definition at line 263 of file ConditionsManager.cpp.
std::size_t ConditionsManager::blockRegister | ( | ConditionsPool & | pool, |
const std::vector< Condition > & | cond | ||
) | const |
Register a whole block of conditions with identical IOV.
Definition at line 249 of file ConditionsManager.cpp.
void ConditionsManager::clean | ( | const ConditionsCleanup & | cleaner | ) | const |
Invoke cache cleanup with user defined policy.
Definition at line 273 of file ConditionsManager.cpp.
void ConditionsManager::clean | ( | const IOVType * | typ, |
int | max_age | ||
) | const |
Clean conditions, which are above the age limit.
Definition at line 268 of file ConditionsManager.cpp.
void ConditionsManager::clear | ( | ) | const |
Full cleanup of all managed conditions.
Definition at line 278 of file ConditionsManager.cpp.
ConditionsManager::Result ConditionsManager::compute | ( | const IOV & | required_validity, |
ConditionsSlice & | slice, | ||
ConditionUpdateUserContext * | ctxt = 0 |
||
) | const |
Compute all derived conditions with the defined IOV (2nd step of prepare)
Definition at line 301 of file ConditionsManager.cpp.
Create empty user pool object.
Definition at line 283 of file ConditionsManager.cpp.
dd4hep::Detector & ConditionsManager::detectorDescription | ( | ) | const |
Access the detector description.
Definition at line 173 of file ConditionsManager.cpp.
|
static |
Access specialization.
Definition at line 37 of file ConditionsManager.cpp.
|
static |
Static accessor if installed as an extension.
Note:
There may very well be several instances of a conditions manager. Do not think this is a sort of 'static constructor'. This would be a big mistake!.
void ConditionsManager::fromString | ( | const std::string & | iov_str, |
IOV & | iov | ||
) | const |
Create IOV from string.
Definition at line 244 of file ConditionsManager.cpp.
ConditionsManager & ConditionsManager::initialize | ( | ) |
Initialize the object after having set the properties.
Definition at line 167 of file ConditionsManager.cpp.
ConditionsIOVPool * ConditionsManager::iovPool | ( | const IOVType & | type | ) | const |
Access conditions multi IOV pool by iov type.
Definition at line 204 of file ConditionsManager.cpp.
const dd4hep::IOVType * ConditionsManager::iovType | ( | const std::string & | iov_name | ) | const |
Access IOV by its name.
Definition at line 199 of file ConditionsManager.cpp.
const std::vector< const dd4hep::IOVType * > ConditionsManager::iovTypesUsed | ( | ) | const |
Access the used/registered IOV types.
Definition at line 209 of file ConditionsManager.cpp.
ConditionsManager::Result ConditionsManager::load | ( | const IOV & | required_validity, |
ConditionsSlice & | slice, | ||
ConditionUpdateUserContext * | ctxt = 0 |
||
) | const |
Load all updates to the clients with the defined IOV (1rst step of prepare)
Definition at line 295 of file ConditionsManager.cpp.
ConditionsDataLoader & ConditionsManager::loader | ( | ) | const |
Access the conditions loader.
Definition at line 188 of file ConditionsManager.cpp.
|
default |
Assignment operator.
dd4hep::Property & ConditionsManager::operator[] | ( | const std::string & | property_name | ) | const |
Access to properties.
Definition at line 183 of file ConditionsManager.cpp.
ConditionsManager::Result ConditionsManager::prepare | ( | const IOV & | required_validity, |
ConditionsSlice & | slice, | ||
ConditionUpdateUserContext * | ctxt = 0 |
||
) | const |
Prepare all updates to the clients with the defined IOV.
Definition at line 289 of file ConditionsManager.cpp.
dd4hep::PropertyManager & ConditionsManager::properties | ( | ) | const |
Access to the property manager.
Definition at line 178 of file ConditionsManager.cpp.
void ConditionsManager::pushUpdates | ( | ) | const |
Push all pending updates to the conditions store.
Note: This does not yet make the new conditions availible to the clients
Definition at line 259 of file ConditionsManager.cpp.
ConditionsPool * ConditionsManager::registerIOV | ( | const IOV & | iov | ) | const |
Register IOV with type and key.
Definition at line 231 of file ConditionsManager.cpp.
ConditionsPool * ConditionsManager::registerIOV | ( | const IOVType & | typ, |
IOV::Key | key | ||
) | const |
Register IOV with type and key.
Definition at line 239 of file ConditionsManager.cpp.
ConditionsPool * ConditionsManager::registerIOV | ( | const std::string & | iov_rep | ) | const |
Register IOV with type and key.
Definition at line 220 of file ConditionsManager.cpp.
std::pair< bool, const dd4hep::IOVType * > ConditionsManager::registerIOVType | ( | size_t | iov_type, |
const std::string & | iov_name | ||
) | const |
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.
Definition at line 194 of file ConditionsManager.cpp.
bool ConditionsManager::registerUnlocked | ( | ConditionsPool & | pool, |
Condition | cond | ||
) | const |
Register new condition with the conditions store. Unlocked version, not multi-threaded.
Definition at line 254 of file ConditionsManager.cpp.