CMS 3D CMS Logo

L1CaloGeometryProd.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1GeometryProducers
4 // Class: L1CaloGeometryProd
5 //
14 //
15 // Original Author: Werner Sun
16 // Created: Tue Oct 24 00:00:00 EDT 2006
17 //
18 //
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
25 
26 //
27 // constants, enums and typedefs
28 //
29 
30 //
31 // static data member definitions
32 //
33 
34 //
35 // constructors and destructor
36 //
38  // the following line is needed to tell the framework what
39  // data is being produced
40  setWhatProduced(this);
41 
42  // now do what ever other initialization is needed
43 
44  // This producer should never make more than one version of L1Geometry,
45  // so we can initialize it in the ctor.
47  ps.getParameter<unsigned int>("numberGctEmJetPhiBins"),
48  ps.getParameter<double>("gctEmJetPhiBinOffset"),
49  ps.getParameter<unsigned int>("numberGctEtSumPhiBins"),
50  ps.getParameter<double>("gctEtSumPhiBinOffset"),
51  ps.getParameter<unsigned int>("numberGctHtSumPhiBins"),
52  ps.getParameter<double>("gctHtSumPhiBinOffset"),
53  ps.getParameter<unsigned int>("numberGctCentralEtaBinsPerHalf"),
54  ps.getParameter<unsigned int>("numberGctForwardEtaBinsPerHalf"),
55  ps.getParameter<unsigned int>("etaSignBitOffset"),
56  ps.getParameter<std::vector<double>>("gctEtaBinBoundaries"));
57 }
58 
60 
61  // do anything here that needs to be done at desctruction time
62  // (e.g. close files, deallocate resources etc.)
63 }
64 
65 //
66 // member functions
67 //
68 
69 // ------------ method called to produce the data ------------
72  using namespace edm::es;
73  std::unique_ptr<L1CaloGeometry> pL1CaloGeometry;
74 
75  pL1CaloGeometry = std::unique_ptr<L1CaloGeometry>(new L1CaloGeometry(m_geom));
76 
77  return pL1CaloGeometry;
78 }
79 
80 // define this as a plug-in
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
ReturnType produce(const L1CaloGeometryRecord &)
~L1CaloGeometryProd() override
L1CaloGeometry m_geom
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1CaloGeometryProd(const edm::ParameterSet &)
std::unique_ptr< L1CaloGeometry > ReturnType