CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventSetupRecordIntervalFinder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Framework
4 // Class : EventSetupRecordIntervalFinder
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Author: Chris Jones
10 // Created: Wed Mar 30 14:27:26 EST 2005
11 //
12 
13 // system include files
14 
15 // user include files
17 #include <cassert>
18 
19 //
20 // constants, enums and typedefs
21 //
22 using namespace edm::eventsetup;
23 namespace edm {
24 //
25 // static data member definitions
26 //
27 
28 //
29 // constructors and destructor
30 //
31 //EventSetupRecordIntervalFinder::EventSetupRecordIntervalFinder()
32 //{
33 //}
34 
35 // EventSetupRecordIntervalFinder::EventSetupRecordIntervalFinder(const EventSetupRecordIntervalFinder& rhs)
36 // {
37 // // do actual copying here;
38 // }
39 
41 {
42 }
43 
44 //
45 // assignment operators
46 //
47 // const EventSetupRecordIntervalFinder& EventSetupRecordIntervalFinder::operator=(const EventSetupRecordIntervalFinder& rhs)
48 // {
49 // //An exception safe implementation is
50 // EventSetupRecordIntervalFinder temp(rhs);
51 // swap(rhs);
52 //
53 // return *this;
54 // }
55 
56 //
57 // member functions
58 //
59 const ValidityInterval&
61  const IOVSyncValue& iInstance)
62 {
63  Intervals::iterator itFound = intervals_.find(iKey);
64  assert(itFound != intervals_.end()) ;
65  if(! itFound->second.validFor(iInstance)) {
66  setIntervalFor(iKey, iInstance, itFound->second);
67  }
68  return itFound->second;
69 }
70 
71 void
73  intervals_.insert(Intervals::value_type(iKey, ValidityInterval()));
74 }
75 
76 void
78 {
79 }
80 
81 //
82 // const member functions
83 //
84 std::set<EventSetupRecordKey>
86 {
87  if(intervals_.empty()) {
88  //we are delaying our reading
89  const_cast<EventSetupRecordIntervalFinder*>(this)->delaySettingRecords();
90  }
91 
92  std::set<EventSetupRecordKey> returnValue;
93 
94  for(Intervals::const_iterator itEntry = intervals_.begin(), itEntryEnd = intervals_.end();
95  itEntry != itEntryEnd;
96  ++itEntry) {
97  returnValue.insert(returnValue.end(), itEntry->first);
98  }
99  return returnValue;
100 }
101 
102 //
103 // static member functions
104 //
105 }
assert(m_qm.get())
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
std::set< eventsetup::EventSetupRecordKey > findingForRecords() const
Container::value_type value_type
const ValidityInterval & findIntervalFor(const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)