File indexing completed on 2025-02-21 09:58:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef DDCOND_CONDITIONSDATALOADER_H
0014 #define DDCOND_CONDITIONSDATALOADER_H
0015
0016
0017 #include "DD4hep/Conditions.h"
0018 #include "DD4hep/NamedObject.h"
0019 #include "DD4hep/ComponentProperties.h"
0020 #include "DDCond/ConditionsSlice.h"
0021 #include "DDCond/ConditionsManager.h"
0022
0023
0024 #include <list>
0025 #include <set>
0026
0027
0028 namespace dd4hep {
0029
0030
0031 namespace cond {
0032
0033
0034 class Entry;
0035 typedef std::list<Entry*> ConditionsStack;
0036 class ConditionsSlice;
0037 class ConditionsDescriptor;
0038
0039
0040
0041
0042
0043
0044
0045
0046 class ConditionsDataLoader : public NamedObject, public PropertyConfigurable {
0047 public:
0048 typedef std::pair<std::string, IOV> Source;
0049 typedef std::vector<Source> Sources;
0050 typedef ConditionsDataLoader base_t;
0051 typedef Condition::key_type key_type;
0052
0053 typedef std::map<key_type,Condition> LoadedItems;
0054 typedef std::vector<std::pair<key_type,ConditionsLoadInfo*> > RequiredItems;
0055
0056 protected:
0057
0058 Detector& m_detector;
0059
0060 ConditionsManager m_mgr;
0061
0062 Sources m_sources;
0063
0064 protected:
0065
0066
0067
0068 void pushUpdates();
0069
0070 public:
0071
0072 ConditionsDataLoader(Detector& description, ConditionsManager mgr, const std::string nam);
0073
0074 virtual ~ConditionsDataLoader();
0075
0076 virtual void initialize() {}
0077
0078 ConditionsManager manager() const { return m_mgr; }
0079
0080 Property& operator[](const std::string& property_name);
0081
0082 const Property& operator[](const std::string& property_name) const;
0083
0084 void addSource(const std::string& source);
0085
0086 void addSource(const std::string& source, const IOV& iov);
0087 #if 0
0088
0089 virtual size_t load_single(key_type key,
0090 const IOV& req_validity,
0091 RangeConditions& conditions) = 0;
0092
0093 virtual size_t load_range( key_type key,
0094 const IOV& req_validity,
0095 RangeConditions& conditions) = 0;
0096 #endif
0097
0098 virtual size_t load_many( const IOV& req_validity,
0099 RequiredItems& work,
0100 LoadedItems& loaded,
0101 IOV& combined_validity) = 0;
0102 };
0103 }
0104 }
0105 #endif