CMS 3D CMS Logo

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  // assignment operators
44  //
45  // const EventSetupRecordIntervalFinder& EventSetupRecordIntervalFinder::operator=(const EventSetupRecordIntervalFinder& rhs)
46  // {
47  // //An exception safe implementation is
48  // EventSetupRecordIntervalFinder temp(rhs);
49  // swap(rhs);
50  //
51  // return *this;
52  // }
53 
54  //
55  // member functions
56  //
58  const IOVSyncValue& iInstance) {
59  Intervals::iterator itFound = intervals_.find(iKey);
60  assert(itFound != intervals_.end());
61  if (!itFound->second.validFor(iInstance)) {
62  setIntervalFor(iKey, iInstance, itFound->second);
63  }
64  return itFound->second;
65  }
66 
68  intervals_.insert(Intervals::value_type(iKey, ValidityInterval()));
69  }
70 
72 
73  //
74  // const member functions
75  //
76  std::set<EventSetupRecordKey> EventSetupRecordIntervalFinder::findingForRecords() const {
77  if (intervals_.empty()) {
78  //we are delaying our reading
79  const_cast<EventSetupRecordIntervalFinder*>(this)->delaySettingRecords();
80  }
81 
82  std::set<EventSetupRecordKey> returnValue;
83 
84  for (Intervals::const_iterator itEntry = intervals_.begin(), itEntryEnd = intervals_.end(); itEntry != itEntryEnd;
85  ++itEntry) {
86  returnValue.insert(returnValue.end(), itEntry->first);
87  }
88  return returnValue;
89  }
90 
91  //
92  // static member functions
93  //
94 } // namespace edm
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
std::set< eventsetup::EventSetupRecordKey > findingForRecords() const
#define noexcept
const ValidityInterval & findIntervalFor(const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
HLT enums.
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)