CMS 3D CMS Logo

ProducerChannelAssignment.cc
Go to the documentation of this file.
7 
8 #include <memory>
9 
10 using namespace std;
11 using namespace edm;
12 using namespace tt;
13 
14 namespace trklet {
15 
23  public:
26  unique_ptr<ChannelAssignment> produce(const ChannelAssignmentRcd& rcd);
27 
28  private:
31  };
32 
33  ProducerChannelAssignment::ProducerChannelAssignment(const ParameterSet& iConfig) : iConfig_(&iConfig) {
34  auto cc = setWhatProduced(this);
35  esGetToken_ = cc.consumes();
36  }
37 
38  unique_ptr<ChannelAssignment> ProducerChannelAssignment::produce(const ChannelAssignmentRcd& rcd) {
39  const Setup* setup = &rcd.get(esGetToken_);
40  return make_unique<ChannelAssignment>(*iConfig_, setup);
41  }
42 
43 } // namespace trklet
44 
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
Creates ChannelAssignment class that assigns tracklet tracks and stubs to output channel as well as D...
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
ESGetToken< Setup, SetupRcd > esGetToken_
HLT enums.
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
unique_ptr< ChannelAssignment > produce(const ChannelAssignmentRcd &rcd)