test
CMS 3D CMS Logo

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