CMS 3D CMS Logo

ProducerES.cc
Go to the documentation of this file.
8 
9 #include <memory>
10 
11 using namespace std;
12 using namespace edm;
13 using namespace tt;
14 
15 namespace trackerTFP {
16 
22  class ProducerES : public ESProducer {
23  public:
24  ProducerES(const ParameterSet& iConfig);
25  ~ProducerES() override {}
26  unique_ptr<DataFormats> produce(const DataFormatsRcd& rcd);
27 
28  private:
31  };
32 
33  ProducerES::ProducerES(const ParameterSet& iConfig) : iConfig_(iConfig) {
34  auto cc = setWhatProduced(this);
35  esGetToken_ = cc.consumes();
36  }
37 
38  unique_ptr<DataFormats> ProducerES::produce(const DataFormatsRcd& rcd) {
39  const Setup* setup = &rcd.get(esGetToken_);
40  return make_unique<DataFormats>(iConfig_, setup);
41  }
42 
43 } // namespace trackerTFP
44 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:165
const ParameterSet iConfig_
Definition: ProducerES.cc:29
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
~ProducerES() override
Definition: ProducerES.cc:25
Definition: TTTypes.h:54
Class to produce setup of Track Trigger emulator data formats.
Definition: ProducerES.cc:22
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
unique_ptr< DataFormats > produce(const DataFormatsRcd &rcd)
Definition: ProducerES.cc:38
HLT enums.
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ESGetToken< Setup, SetupRcd > esGetToken_
Definition: ProducerES.cc:30