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 // $Id: L1CaloGeometryProd.cc,v 1.4 2009/09/28 23:02:20 wsun Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include "boost/shared_ptr.hpp"
24 
25 // user include files
27 
28 
29 //
30 // constants, enums and typedefs
31 //
32 
33 //
34 // static data member definitions
35 //
36 
37 //
38 // constructors and destructor
39 //
41 {
42  //the following line is needed to tell the framework what
43  // data is being produced
44  setWhatProduced(this);
45 
46  //now do what ever other initialization is needed
47 
48  // This producer should never make more than one version of L1Geometry,
49  // so we can initialize it in the ctor.
50  m_geom =
51  L1CaloGeometry( ps.getParameter<unsigned int>("numberGctEmJetPhiBins"),
52  ps.getParameter<double>("gctEmJetPhiBinOffset"),
53  ps.getParameter<unsigned int>("numberGctEtSumPhiBins"),
54  ps.getParameter<double>("gctEtSumPhiBinOffset"),
55  ps.getParameter<unsigned int>("numberGctHtSumPhiBins"),
56  ps.getParameter<double>("gctHtSumPhiBinOffset"),
57  ps.getParameter<unsigned int>("numberGctCentralEtaBinsPerHalf"),
58  ps.getParameter<unsigned int>("numberGctForwardEtaBinsPerHalf"),
59  ps.getParameter<unsigned int>("etaSignBitOffset"),
60  ps.getParameter< std::vector<double> >("gctEtaBinBoundaries") ) ;
61 }
62 
63 
65 {
66 
67  // do anything here that needs to be done at desctruction time
68  // (e.g. close files, deallocate resources etc.)
69 
70 }
71 
72 
73 //
74 // member functions
75 //
76 
77 // ------------ method called to produce the data ------------
80 {
81  using namespace edm::es;
82  std::auto_ptr<L1CaloGeometry> pL1CaloGeometry ;
83 
84  pL1CaloGeometry = std::auto_ptr< L1CaloGeometry >(
85  new L1CaloGeometry( m_geom ) ) ;
86 
87  return pL1CaloGeometry ;
88 }
89 
90 //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:56