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  // The following line is needed to tell the framework what data is being produced
39  setWhatProduced(this);
40 
41  data_.SetPtAssignVersion(iConfig.getParameter<int>("PtAssignVersion"));
42  data_.SetFirmwareVersion(iConfig.getParameter<int>("FirmwareVersion"));
43  data_.SetPrimConvVersion(iConfig.getParameter<int>("PrimConvVersion"));
44 }
45 
46 // Destructor
47 
49 
50 // Member functions
51 
52 // ------------ method called to produce the data ------------
54  return std::make_unique<L1TMuonEndCapParams>(*data_.getWriteInstance());
55 }
56 
57 // Define this as a plug-in
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
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()