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
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
L1CaloGeometryProd::ReturnType
std::unique_ptr< L1CaloGeometry > ReturnType
Definition: L1CaloGeometryProd.h:39
L1CaloGeometryRecord
Definition: L1CaloGeometryRecord.h:30
edm::ParameterSet
Definition: ParameterSet.h:47
L1CaloGeometryProd::m_geom
L1CaloGeometry m_geom
Definition: L1CaloGeometryProd.h:45
L1CaloGeometry
Definition: L1CaloGeometry.h:33
L1CaloGeometryProd
Definition: L1CaloGeometryProd.h:34
L1CaloGeometryProd.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::es
Definition: es_Label.h:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1CaloGeometryProd::~L1CaloGeometryProd
~L1CaloGeometryProd() override
Definition: L1CaloGeometryProd.cc:58
L1CaloGeometryProd::L1CaloGeometryProd
L1CaloGeometryProd(const edm::ParameterSet &)
Definition: L1CaloGeometryProd.cc:37
L1CaloGeometryProd::produce
ReturnType produce(const L1CaloGeometryRecord &)
Definition: L1CaloGeometryProd.cc:68