CMS 3D CMS Logo

ESRecordsToProxyIndices.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_ESRecordsToProxyIndices_h
2 #define FWCore_Framework_ESRecordsToProxyIndices_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : ESRecordsToProxyIndices
7 //
16 //
17 // Author: Chris Jones
18 // Created: Tues Feb 12 14:31:03 EST 2019
19 //
20 
21 // system include files
22 #include <limits>
23 
24 // user include files
28 
29 #include <vector>
30 // forward declarations
31 namespace edm::eventsetup {
32  struct ComponentDescription;
33 
35  public:
36  ESRecordsToProxyIndices(std::vector<EventSetupRecordKey> iRecords);
37 
38  // ---------- const member functions ---------------------
40  ESProxyIndex indexInRecord(EventSetupRecordKey const& iRK, DataKey const& iDK) const noexcept;
41 
42  ComponentDescription const* component(EventSetupRecordKey const& iRK, DataKey const& iDK) const noexcept;
43 
47  }
48 
50  // ---------- member functions ---------------------------
53  unsigned int dataKeysInRecord(unsigned int iRecordIndex,
54  EventSetupRecordKey const& iRecord,
55  std::vector<DataKey> const& iDataKeys,
56  std::vector<ComponentDescription const*> const& iComponents);
57 
58  private:
59  // ---------- member data --------------------------------
60  std::vector<EventSetupRecordKey> recordKeys_;
61  //for each item in recordKeys_ this holds the index to the first
62  // DataKey for that item in dataKeys_
63  // recordOffset_ is 1 size larger than recordKeys_ with the
64  // last entry being dataKeys_.size()
65  std::vector<unsigned int> recordOffsets_;
66  std::vector<DataKey> dataKeys_;
67  std::vector<ComponentDescription const*> components_;
68  };
69 
70 } // namespace edm::eventsetup
71 #endif
std::vector< EventSetupRecordKey > recordKeys_
unsigned int dataKeysInRecord(unsigned int iRecordIndex, EventSetupRecordKey const &iRecord, std::vector< DataKey > const &iDataKeys, std::vector< ComponentDescription const * > const &iComponents)
std::vector< ComponentDescription const * > components_
ESRecordIndex recordIndexFor(EventSetupRecordKey const &iRK) const noexcept
static constexpr ESProxyIndex missingProxyIndex() noexcept
#define noexcept
ESProxyIndex indexInRecord(EventSetupRecordKey const &iRK, DataKey const &iDK) const noexcept
If the index is not found, returns missingProxyIndex()
ComponentDescription const * component(EventSetupRecordKey const &iRK, DataKey const &iDK) const noexcept
ESRecordsToProxyIndices(std::vector< EventSetupRecordKey > iRecords)
#define constexpr
static constexpr ESRecordIndex missingRecordIndex() noexcept