CMS 3D CMS Logo

ProducerDemonstrator.cc
Go to the documentation of this file.
6 
7 #include <memory>
8 
9 using namespace std;
10 using namespace edm;
11 using namespace tt;
12 
13 namespace trackerTFP {
14 
21  public:
22  ProducerDemonstrator(const ParameterSet& iConfig);
23  ~ProducerDemonstrator() override {}
24  unique_ptr<Demonstrator> produce(const DemonstratorRcd& rcd);
25 
26  private:
29  };
30 
31  ProducerDemonstrator::ProducerDemonstrator(const ParameterSet& iConfig) : iConfig_(&iConfig) {
32  auto cc = setWhatProduced(this);
33  esGetToken_ = cc.consumes();
34  }
35 
36  unique_ptr<Demonstrator> ProducerDemonstrator::produce(const DemonstratorRcd& rcd) {
37  const Setup* setup = &rcd.get(esGetToken_);
38  return make_unique<Demonstrator>(*iConfig_, setup);
39  }
40 
41 } // namespace trackerTFP
42 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
Definition: TTTypes.h:54
Class to demontrate correctness of track trigger emulators.
ESGetToken< Setup, SetupRcd > esGetToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
HLT enums.
unique_ptr< Demonstrator > produce(const DemonstratorRcd &rcd)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const