CMS 3D CMS Logo

ESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Framework
4 // Class : ESProducer
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Author: Chris Jones
10 // Created: Sat Apr 16 10:19:37 EDT 2005
11 //
12 
13 // system include files
14 
15 // user include files
18 
19 //
20 // constants, enums and typedefs
21 //
22 namespace edm {
23  //
24  // static data member definitions
25  //
26 
27  //
28  // constructors and destructor
29  //
30  ESProducer::ESProducer() : consumesInfos_{} {}
31 
32  // ESProducer::ESProducer(const ESProducer& rhs)
33  // {
34  // // do actual copying here;
35  // }
36 
38 
39  //
40  // assignment operators
41  //
42  // const ESProducer& ESProducer::operator=(const ESProducer& rhs)
43  // {
44  // //An exception safe implementation is
45  // ESProducer temp(rhs);
46  // swap(rhs);
47  //
48  // return *this;
49  // }
50 
51  //
52  // member functions
53  //
55  itemsToGetFromRecords_.reserve(consumesInfos_.size());
56  recordsUsedDuringGet_.reserve(consumesInfos_.size());
57 
58  for (auto& info : consumesInfos_) {
59  auto& items = itemsToGetFromRecords_.emplace_back();
60  items.reserve(info->size());
61  auto& records = recordsUsedDuringGet_.emplace_back();
62  records.reserve(info->size());
63  for (auto& proxyInfo : *info) {
64  auto index = iProxyToIndices.indexInRecord(std::get<0>(proxyInfo), std::get<1>(proxyInfo));
66  if (not std::get<2>(proxyInfo).empty()) {
67  auto component = iProxyToIndices.component(std::get<0>(proxyInfo), std::get<1>(proxyInfo));
68  if (nullptr == component) {
70  } else {
71  if (component->label_.empty()) {
72  if (component->type_ != std::get<2>(proxyInfo)) {
74  }
75  } else if (component->label_ != std::get<2>(proxyInfo)) {
77  }
78  }
79  }
80  }
81  items.push_back(index);
83  records.push_back(iProxyToIndices.recordIndexFor(std::get<0>(proxyInfo)));
84  }
85  }
86  }
87  }
88 
89  //
90  // const member functions
91  //
92 
93  //
94  // static member functions
95  //
96 } // namespace edm
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< std::vector< ESRecordIndex > > recordsUsedDuringGet_
Definition: ESProducer.h:218
void updateLookup(eventsetup::ESRecordsToProxyIndices const &) final
Definition: ESProducer.cc:54
std::vector< std::unique_ptr< ESConsumesInfo > > consumesInfos_
Definition: ESProducer.h:214
~ESProducer()(false) override
Definition: ESProducer.cc:37
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()
HLT enums.
ComponentDescription const * component(EventSetupRecordKey const &iRK, DataKey const &iDK) const noexcept
std::vector< std::vector< ESProxyIndex > > itemsToGetFromRecords_
Definition: ESProducer.h:215