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  typedef std::shared_ptr<L1TMuonEndCapParams> ReturnType;
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  using namespace edm::es;
61  auto pEMTFParams = std::make_shared<L1TMuonEndCapParams>(*data_.getWriteInstance());
62  return pEMTFParams;
63 
64 }
65 
66 // Define this as a plug-in
T getParameter(std::string const &) const
L1TMuonEndCapParamsESProducer(const edm::ParameterSet &)
ReturnType produce(const L1TMuonEndCapParamsRcd &)
void SetFirmwareVersion(unsigned version)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void SetPtAssignVersion(unsigned version)
void SetPrimConvVersion(unsigned version)
L1TMuonEndCapParams * getWriteInstance()
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
std::shared_ptr< L1TMuonEndCapParams > ReturnType