22 using namespace DD4hep;
23 using namespace DD4hep::Conditions;
29 namespace Conditions {
35 except(
"ConditionsManager",
"+++ Failed to access manager from LCDD.");
42 ConditionsManager::ConditionsManager(LCDD& lcdd) {
43 assign(
new Object(lcdd),
"ConditionsManager",
"");
53 return access()->properties();
57 Property& ConditionsManager::operator[](
const std::string& property_name)
const {
58 return access()->properties().property(property_name);
63 return access()->loader();
67 pair<bool, const IOVType*>
68 ConditionsManager::registerIOVType(
size_t iov_type,
const string& iov_name) {
69 return access()->registerIOVType(iov_type, iov_name);
73 const IOVType* ConditionsManager::iovType (
const string& iov_name)
const {
74 return access()->iovType(iov_name);
79 return access()->m_rawPool[iov_type.
type];
83 const vector<const IOVType*> ConditionsManager::iovTypesUsed()
const {
85 vector<const IOVType*> result;
87 for(IOVTypes::const_iterator i=types.begin(); i!=types.end(); ++i)
88 if (
int((*i).type) != IOVType::UNKNOWN_IOV ) result.push_back(&(*i));
94 return access()->registerIOV(typ, key);
98 void ConditionsManager::fromString(
const string& iov_str,
IOV& iov) {
99 access()->fromString(iov_str, iov);
104 return access()->registerUnlocked(pool, cond);
108 void ConditionsManager::clean(
const IOVType* typ,
int max_age) {
109 access()->clean(typ, max_age);
113 void ConditionsManager::clear() {
118 long ConditionsManager::prepare(
const IOV& required_validity,
121 return access()->prepare(required_validity, keys, user_pool);
126 long ConditionsManager::prepare(
const IOV& required_validity,
130 bool verify_dependencies) {
131 return access()->prepare(required_validity, keys, user_pool, dependencies, verify_dependencies);
136 return access()->prepare(required_validity, user_pool);
140 long ConditionsManager::prepare(
const IOV& required_validity,
143 bool verify_dependencies) {
144 return access()->prepare(required_validity, user_pool, dependencies, verify_dependencies);
const IOVTypes & iovTypes() const
Access IOV by its type.
The property class to assign options to actions.
Collection of condition dependencies.
std::vector< IOVType > IOVTypes
Main condition object handle.
Out version of the std auto_ptr implementation base either on auto_ptr or unique_ptr.
ConditionsManager & initialize()
Initialize the object after having set the properties.
int except(const std::string &src, const std::string &fmt,...)
Calls the display action with ERROR and throws an std::runtime_error exception.
Class describing the interval of validty.
Manager class for condition handles.
Class describing the interval of validty type.
virtual void clear()=0
Full cleanup of all managed conditions.
Conditions internal namespace declaration.
unsigned int type
integer identifier ised internally
Class implementing the conditions collection for a given IOV type.
std::set< ConditionKey > ConditionKeys
Pool of conditions satisfying one IOV type (epoch, run, fill, etc)
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
void * extension(const std::type_info &info, bool alert) const
Access an existing extension object from the detector element.
std::pair< Key_first_type, Key_second_type > Key
Manager to ease the handling of groups of properties.