Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:13:29

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
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 /// Default constructor
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 /// Default destructor
0034 ConditionsDataLoader::~ConditionsDataLoader()   {
0035 }
0036 
0037 /// Access to properties
0038 dd4hep::Property& ConditionsDataLoader::operator[](const std::string& property_name)  {
0039   return properties().property(property_name);
0040 }
0041 
0042 /// Access to properties (CONST)
0043 const dd4hep::Property& ConditionsDataLoader::operator[](const std::string& property_name)  const   {
0044   return properties().property(property_name);
0045 }
0046 
0047 /// Add data source definition to loader
0048 void ConditionsDataLoader::addSource(const string& source, const IOV& iov)   {
0049   m_sources.emplace_back(source,iov);
0050 }
0051 
0052 /// Add data source definition to loader
0053 void ConditionsDataLoader::addSource(const string& source)   {
0054   m_sources.emplace_back(source,IOV(0,0));
0055 }
0056 
0057 /// Queue update to manager.
0058 //Condition ConditionsDataLoader::queueUpdate(Entry* data)   {
0059 //  return m_mgr->__queue_update(data);
0060 //}
0061 
0062 /// Push update to manager.
0063 void ConditionsDataLoader::pushUpdates()   {
0064   m_mgr->pushUpdates();
0065 }