File indexing completed on 2025-01-18 09:13:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "DDCond/ConditionsDataLoader.h"
0016 #include "DDCond/ConditionsManagerObject.h"
0017 #include "DD4hep/detail/Handle.inl"
0018 #include "DD4hep/Printout.h"
0019
0020 using std::string;
0021 using namespace dd4hep::cond;
0022
0023 DD4HEP_INSTANTIATE_HANDLE_NAMED(ConditionsDataLoader);
0024
0025
0026 ConditionsDataLoader::ConditionsDataLoader(Detector& description, ConditionsManager mgr, const string nam)
0027 : NamedObject(nam,"ConditionsDataLoader"), m_detector(description), m_mgr(mgr)
0028 {
0029 if ( m_mgr.isValid() ) return;
0030 except("ConditionsDataLoader","+++ Cannot create loader without a valid conditions manager handle!");
0031 }
0032
0033
0034 ConditionsDataLoader::~ConditionsDataLoader() {
0035 }
0036
0037
0038 dd4hep::Property& ConditionsDataLoader::operator[](const std::string& property_name) {
0039 return properties().property(property_name);
0040 }
0041
0042
0043 const dd4hep::Property& ConditionsDataLoader::operator[](const std::string& property_name) const {
0044 return properties().property(property_name);
0045 }
0046
0047
0048 void ConditionsDataLoader::addSource(const string& source, const IOV& iov) {
0049 m_sources.emplace_back(source,iov);
0050 }
0051
0052
0053 void ConditionsDataLoader::addSource(const string& source) {
0054 m_sources.emplace_back(source,IOV(0,0));
0055 }
0056
0057
0058
0059
0060
0061
0062
0063 void ConditionsDataLoader::pushUpdates() {
0064 m_mgr->pushUpdates();
0065 }