DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
ConditionsDataLoader.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DDCOND_CONDITIONSDATALOADER_H
14 #define DDCOND_CONDITIONSDATALOADER_H
15 
16 // Framework include files
17 #include "DD4hep/Conditions.h"
18 #include "DD4hep/NamedObject.h"
20 #include "DDCond/ConditionsSlice.h"
22 
23 // C/C++ include files
24 #include <list>
25 #include <set>
26 
28 namespace dd4hep {
29 
31  namespace cond {
32 
33  // Forward declarations
34  class Entry;
35  typedef std::list<Entry*> ConditionsStack;
36  class ConditionsSlice;
37  class ConditionsDescriptor;
38 
40 
47  public:
48  typedef std::pair<std::string, IOV> Source;
49  typedef std::vector<Source> Sources;
52 
53  typedef std::map<key_type,Condition> LoadedItems;
54  typedef std::vector<std::pair<key_type,ConditionsLoadInfo*> > RequiredItems;
55 
56  protected:
63 
64  protected:
66  //Condition queueUpdate(Entry* data);
68  void pushUpdates();
69 
70  public:
72  ConditionsDataLoader(Detector& description, ConditionsManager mgr, const std::string nam);
74  virtual ~ConditionsDataLoader();
76  virtual void initialize() {}
78  ConditionsManager manager() const { return m_mgr; }
80  Property& operator[](const std::string& property_name);
82  const Property& operator[](const std::string& property_name) const;
84  void addSource(const std::string& source);
86  void addSource(const std::string& source, const IOV& iov);
87 #if 0
88  virtual size_t load_single(key_type key,
90  const IOV& req_validity,
91  RangeConditions& conditions) = 0;
93  virtual size_t load_range( key_type key,
94  const IOV& req_validity,
95  RangeConditions& conditions) = 0;
96 #endif
97  virtual size_t load_many( const IOV& req_validity,
99  RequiredItems& work,
100  LoadedItems& loaded,
101  IOV& combined_validity) = 0;
102  };
103  } /* End namespace cond */
104 } /* End namespace dd4hep */
105 #endif // DDCOND_CONDITIONSDATALOADER_H
dd4hep::cond::ConditionsDataLoader::key_type
Condition::key_type key_type
Definition: ConditionsDataLoader.h:51
dd4hep::RangeConditions
std::vector< Condition > RangeConditions
Definition: Conditions.h:491
ConditionsSlice.h
cond
AlignmentCondition::Object * cond
Definition: AlignmentsCalculator.cpp:68
dd4hep::cond::ConditionsDataLoader::pushUpdates
void pushUpdates()
Queue update to manager.
Definition: ConditionsDataLoader.cpp:63
dd4hep::Property
The property class to assign options to actions.
Definition: ComponentProperties.h:48
dd4hep::PropertyConfigurable
Property object as base class for all objects supporting properties.
Definition: ComponentProperties.h:258
Entry
GlobalAlignmentStack::StackEntry Entry
Definition: GlobalAlignmentCache.cpp:25
dd4hep::cond::ConditionsDataLoader::m_sources
Sources m_sources
Property: input data source definitions.
Definition: ConditionsDataLoader.h:62
dd4hep::cond::ConditionsDataLoader::operator[]
Property & operator[](const std::string &property_name)
Access to properties.
Definition: ConditionsDataLoader.cpp:38
ConditionsManager.h
dd4hep::cond::ConditionsDataLoader::addSource
void addSource(const std::string &source)
Add data source definition to loader.
Definition: ConditionsDataLoader.cpp:53
dd4hep::cond::ConditionsDataLoader::ConditionsDataLoader
ConditionsDataLoader(Detector &description, ConditionsManager mgr, const std::string nam)
Default constructor.
Definition: ConditionsDataLoader.cpp:26
dd4hep::cond::ConditionsDataLoader::manager
ConditionsManager manager() const
Access conditions manager.
Definition: ConditionsDataLoader.h:78
dd4hep::IOV
Class describing the interval of validty.
Definition: IOV.h:67
ComponentProperties.h
dd4hep::cond::ConditionsDataLoader::m_mgr
ConditionsManager m_mgr
Reference to conditions manager used to queue update requests.
Definition: ConditionsDataLoader.h:60
dd4hep::cond::ConditionsDataLoader::RequiredItems
std::vector< std::pair< key_type, ConditionsLoadInfo * > > RequiredItems
Definition: ConditionsDataLoader.h:54
dd4hep::cond::ConditionsDataLoader::load_many
virtual size_t load_many(const IOV &req_validity, RequiredItems &work, LoadedItems &loaded, IOV &combined_validity)=0
Load a number of conditions items from the persistent medium according to the required IOV.
NamedObject.h
Conditions.h
dd4hep::cond::ConditionsStack
std::list< Entry * > ConditionsStack
Definition: ConditionsDataLoader.h:34
dd4hep::Condition::key_type
unsigned long long int key_type
Forward definition of the key type.
Definition: Conditions.h:54
dd4hep::cond::ConditionsManager
Manager class for condition handles.
Definition: ConditionsManager.h:46
key
unsigned char key
Definition: AlignmentsCalculator.cpp:69
dd4hep::cond::ConditionsDataLoader
Interface for a generic conditions loader.
Definition: ConditionsDataLoader.h:46
dd4hep::cond::ConditionsDataLoader::m_detector
Detector & m_detector
Reference to main detector description object.
Definition: ConditionsDataLoader.h:58
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::NamedObject
Implementation of a named object.
Definition: NamedObject.h:30
dd4hep::cond::ConditionsDataLoader::initialize
virtual void initialize()
Optional initialization for sub-classes.
Definition: ConditionsDataLoader.h:76
dd4hep::cond::ConditionsDataLoader::Source
std::pair< std::string, IOV > Source
Definition: ConditionsDataLoader.h:48
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::cond::ConditionsDataLoader::LoadedItems
std::map< key_type, Condition > LoadedItems
Definition: ConditionsDataLoader.h:53
dd4hep::cond::ConditionsDataLoader::base_t
ConditionsDataLoader base_t
Definition: ConditionsDataLoader.h:50
dd4hep::cond::ConditionsDataLoader::Sources
std::vector< Source > Sources
Definition: ConditionsDataLoader.h:49
dd4hep::cond::ConditionsSlice
Conditions slice object. Defines which conditions should be loaded by the ConditionsManager.
Definition: ConditionsSlice.h:53
dd4hep::cond::ConditionsDataLoader::~ConditionsDataLoader
virtual ~ConditionsDataLoader()
Default destructor.
Definition: ConditionsDataLoader.cpp:34