CMS 3D CMS Logo

L1TMuonEndCapParamsESProducer.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <memory>
3 #include <iostream>
4 
9 
13 
15 
16 using namespace std;
17 
18 // Class declaration
19 
21 public:
24 
25  using ReturnType = std::unique_ptr<L1TMuonEndCapParams>;
26 
27  ReturnType produce(const L1TMuonEndCapParamsRcd&);
28 
29 private:
31 };
32 
33 // Constructor
34 
36  : data_(new L1TMuonEndCapParams()) {
37  // The following line is needed to tell the framework what data is being produced
38  setWhatProduced(this);
39 
40  data_.SetPtAssignVersion(iConfig.getParameter<int>("PtAssignVersion"));
41  data_.SetFirmwareVersion(iConfig.getParameter<int>("FirmwareVersion"));
42  data_.SetPrimConvVersion(iConfig.getParameter<int>("PrimConvVersion"));
43 }
44 
45 // Destructor
46 
48 
49 // Member functions
50 
51 // ------------ method called to produce the data ------------
53  return std::make_unique<L1TMuonEndCapParams>(*data_.getWriteInstance());
54 }
55 
56 // Define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
L1TMuonEndCapParamsESProducer(const edm::ParameterSet &)
ReturnType produce(const L1TMuonEndCapParamsRcd &)
void SetFirmwareVersion(unsigned version)
void SetPtAssignVersion(unsigned version)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
std::unique_ptr< L1TMuonEndCapParams > ReturnType
void SetPrimConvVersion(unsigned version)
L1TMuonEndCapParams * getWriteInstance()