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 #include "TXMLEngine.h"
16 
17 using namespace std;
18 
19 // Class declaration
20 
22 public:
25 
26  using ReturnType = std::unique_ptr<L1TMuonEndCapParams>;
27 
28  ReturnType produce(const L1TMuonEndCapParamsRcd&);
29 
30 private:
32 };
33 
34 // Constructor
35 
37  data_(new L1TMuonEndCapParams())
38 {
39  // The following line is needed to tell the framework what data is being produced
40  setWhatProduced(this);
41 
42  data_.SetPtAssignVersion(iConfig.getParameter<int>("PtAssignVersion"));
43  data_.SetFirmwareVersion(iConfig.getParameter<int>("FirmwareVersion"));
44  data_.SetPrimConvVersion(iConfig.getParameter<int>("PrimConvVersion"));
45 
46 }
47 
48 // Destructor
49 
51 {
52 }
53 
54 // Member functions
55 
56 // ------------ method called to produce the data ------------
59 {
60  return std::make_unique<L1TMuonEndCapParams>(*data_.getWriteInstance());
61 }
62 
63 // Define this as a plug-in
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
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:60
std::unique_ptr< L1TMuonEndCapParams > ReturnType
void SetPrimConvVersion(unsigned version)
L1TMuonEndCapParams * getWriteInstance()