|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
13 #ifndef DDCOND_CONDITIONSMANAGEROBJECT_H
14 #define DDCOND_CONDITIONSMANAGEROBJECT_H
38 class ConditionsIOVPool;
39 class ConditionsListener;
57 typedef std::pair<ConditionsListener*,void*>
Listener;
59 typedef std::unique_ptr<ConditionsDataLoader>
Loader;
125 virtual const std::vector<IOVType>&
iovTypes ()
const = 0;
137 virtual std::pair<bool, const IOVType*>
registerIOVType(
size_t iov_type,
const std::string& iov_name) = 0;
196 virtual std::pair<int,int>
clear() = 0;
201 #endif // DDCOND_CONDITIONSMANAGEROBJECT_H
std::vector< Condition > RangeConditions
AlignmentCondition::Object * cond
virtual ConditionsIOVPool * iovPool(const IOVType &type) const =0
Access conditions multi IOV pool by iov type.
virtual bool registerUnlocked(ConditionsPool &pool, Condition cond)=0
Register new condition with the conditions store. Unlocked version, not multi-threaded.
virtual 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)
virtual ~ConditionsManagerObject()
Default destructor.
virtual std::unique_ptr< UserPool > createUserPool(const IOVType *iovT) const =0
Create empty user pool object.
Loader m_loader
Reference to the data loader userd by this instance.
Property object as base class for all objects supporting properties.
virtual const std::vector< IOVType > & iovTypes() const =0
Access IOV by its type.
virtual const IOVType * iovType(size_t iov_type) const =0
Access IOV by its type.
std::pair< Key_value_type, Key_value_type > Key
bool doOutputUnloaded() const
Access to flag to indicate if unloaded items should be saved to the slice (or not)
virtual std::pair< bool, const IOVType * > registerIOVType(size_t iov_type, const std::string &iov_name)=0
Register new IOV type if it does not (yet) exist.
ConditionUpdateUserContext class used by the derived conditions calculation mechanism.
Listeners m_onRegister
Conditions listeners on registration of new conditions.
Class describing the interval of validty type.
virtual const IOVType * iovType(const std::string &iov_name) const =0
Access IOV by its name.
virtual void adoptCleanup(ConditionsCleanup *cleaner)=0
Adopt cleanup handler. If a handler is registered, it is invoked at every "prepare" step.
void fromString(const std::string &iov_str, IOV &iov)
Create IOV from string.
Basic conditions manager implementation.
Main condition object handle.
Class describing the interval of validty.
Detector & detectorDescription() const
Access to the detector description instance.
virtual size_t blockRegister(ConditionsPool &pool, const std::vector< Condition > &cond) const =0
Register a whole block of conditions with identical IOV.
Listeners m_onRemove
Conditions listeners on de-registration of new conditions.
const std::vector< const IOVType * > iovTypesUsed() const
Access the used/registered IOV types.
virtual void initialize()=0
Initialize the object after having set the properties.
void registerCallee(Listeners &listeners, const Listener &callee, bool add)
Register callback listener object.
Class implementing the conditions collection for a given IOV type.
Condition::key_type key_type
void onRegister(Condition condition)
Listener invocation when a condition is registered to the cache.
virtual void pushUpdates()=0
Push all pending updates to the conditions store.
ConditionsManager::Result Result
virtual Result prepare(const IOV &req_iov, ConditionsSlice &slice, ConditionUpdateUserContext *ctx=0)=0
Prepare all updates to the clients with the defined IOV.
std::pair< ConditionsListener *, void * > Listener
bool doLoadConditions() const
Access to load flag.
virtual Result compute(const IOV &required_validity, ConditionsSlice &slice, ConditionUpdateUserContext *ctxt=0)=0
Compute all derived conditions with the defined IOV (2nd step of prepare)
Detector & m_detDesc
Reference to main detector description object.
virtual ConditionsPool * registerIOV(const IOVType &typ, IOV::Key key)=0
Register IOV with type and key (much more performant...)
unsigned long long int key_type
Forward definition of the key type.
ConditionsPool * registerIOV(const std::string &data)
Register IOV using new string data.
void callOnRegister(const Listener &callee, bool add)
(Un)Registration of conditions listeners with callback when a new condition is registered
Result of a prepare call to the conditions manager.
Interface for a generic conditions loader.
Base class to handle conditions cleanups.
ConditionsManagerObject(Detector &description)
Default constructor.
Namespace for the AIDA detector description toolkit.
Implementation of a named object.
void onRemove(Condition condition)
Listener invocation when a condition is deregistered from the cache.
std::set< Listener > Listeners
ConditionsDataLoader * loader() const
Access to the data loader.
The main interface to the dd4hep detector description package.
virtual std::pair< int, int > clean(const ConditionsCleanup &cleaner)=0
Invoke cache cleanup with user defined policy.
void callOnRemove(const Listener &callee, bool add)
(Un)Registration of conditions listeners with callback when a condition is unregistered
std::string type
The object type.
Pool of conditions satisfying one IOV type (epoch, run, fill, etc)
std::unique_ptr< ConditionsDataLoader > Loader
virtual int clean(const IOVType *typ, int max_age)=0
Clean conditions, which are above the age limit.
bool m_doLoad
Property: Flag to indicate if items should be loaded (or not)
Conditions slice object. Defines which conditions should be loaded by the ConditionsManager.
virtual std::pair< int, int > clear()=0
Full cleanup of all managed conditions.
bool m_doOutputUnloaded
Property: Flag to indicate if unloaded items should be saved to the slice (or not)