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.
46  m_geom = L1CaloGeometry(ps.getParameter<unsigned int>("numberGctEmJetPhiBins"),
47  ps.getParameter<double>("gctEmJetPhiBinOffset"),
48  ps.getParameter<unsigned int>("numberGctEtSumPhiBins"),
49  ps.getParameter<double>("gctEtSumPhiBinOffset"),
50  ps.getParameter<unsigned int>("numberGctHtSumPhiBins"),
51  ps.getParameter<double>("gctHtSumPhiBinOffset"),
52  ps.getParameter<unsigned int>("numberGctCentralEtaBinsPerHalf"),
53  ps.getParameter<unsigned int>("numberGctForwardEtaBinsPerHalf"),
54  ps.getParameter<unsigned int>("etaSignBitOffset"),
55  ps.getParameter<std::vector<double>>("gctEtaBinBoundaries"));
56 }
57 
59  // do anything here that needs to be done at desctruction time
60  // (e.g. close files, deallocate resources etc.)
61 }
62 
63 //
64 // member functions
65 //
66 
67 // ------------ method called to produce the data ------------
69  using namespace edm::es;
70  std::unique_ptr<L1CaloGeometry> pL1CaloGeometry;
71 
72  pL1CaloGeometry = std::make_unique<L1CaloGeometry>(m_geom);
73 
74  return pL1CaloGeometry;
75 }
76 
77 // define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ReturnType produce(const L1CaloGeometryRecord &)
~L1CaloGeometryProd() override
L1CaloGeometry m_geom
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
L1CaloGeometryProd(const edm::ParameterSet &)
std::unique_ptr< L1CaloGeometry > ReturnType