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
ESHandle.h
L1TMuonEndCapParamsESProducer::L1TMuonEndCapParamsESProducer
L1TMuonEndCapParamsESProducer(const edm::ParameterSet &)
Definition: L1TMuonEndCapParamsESProducer.cc:35
l1t::EndCapParamsHelper::SetPtAssignVersion
void SetPtAssignVersion(unsigned version)
Definition: EndCapParamsHelper.h:49
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESProducer.h
l1t::EndCapParamsHelper::getWriteInstance
L1TMuonEndCapParams * getWriteInstance()
Definition: EndCapParamsHelper.h:64
L1TMuonEndCapParams.h
L1TMuonEndCapParamsESProducer::~L1TMuonEndCapParamsESProducer
~L1TMuonEndCapParamsESProducer() override
Definition: L1TMuonEndCapParamsESProducer.cc:47
L1TMuonEndCapParamsESProducer::produce
ReturnType produce(const L1TMuonEndCapParamsRcd &)
Definition: L1TMuonEndCapParamsESProducer.cc:52
l1t::EndCapParamsHelper
Definition: EndCapParamsHelper.h:36
L1TMuonEndCapParamsESProducer
Definition: L1TMuonEndCapParamsESProducer.cc:20
L1TMuonEndCapParamsESProducer::data_
l1t::EndCapParamsHelper data_
Definition: L1TMuonEndCapParamsESProducer.cc:30
FileInPath.h
ESProducts.h
edm::ParameterSet
Definition: ParameterSet.h:47
L1TMuonEndCapParamsRcd
Definition: L1TMuonEndCapParamsRcd.h:11
L1TMuonEndCapParamsESProducer::ReturnType
std::unique_ptr< L1TMuonEndCapParams > ReturnType
Definition: L1TMuonEndCapParamsESProducer.cc:25
EndCapParamsHelper.h
L1TMuonEndCapParams
Definition: L1TMuonEndCapParams.h:15
L1TMuonEndCapParamsRcd.h
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
l1t::EndCapParamsHelper::SetFirmwareVersion
void SetFirmwareVersion(unsigned version)
Definition: EndCapParamsHelper.h:50
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESProducer
Definition: ESProducer.h:104
l1t::EndCapParamsHelper::SetPrimConvVersion
void SetPrimConvVersion(unsigned version)
Definition: EndCapParamsHelper.h:53