CMS 3D CMS Logo

HGCalNumberingInitialization.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HGCalNumberingInitialization
4 // Class: HGCalNumberingInitialization
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 // Created: Tue Mar 21 16:40:29 PDT 2013
16 //
17 
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
28 
32 
33 //#define EDM_ML_DEBUG
34 
36 
37 public:
40 
41  typedef std::unique_ptr<HGCalDDDConstants> ReturnType;
42 
43  ReturnType produce(const IdealGeometryRecord&);
44 
45 private:
48 };
49 
51 
52  name_ = iConfig.getUntrackedParameter<std::string>("Name");
53  edm::LogInfo("HGCalGeom") << "HGCalNumberingInitialization for " << name_;
54 #ifdef EDM_ML_DEBUG
55  std::cout << "HGCalNumberingInitialization for " << name_ << std::endl;
56 #endif
57  setWhatProduced(this, name_);
58 }
59 
61 
62 
63 // ------------ method called to produce the data ------------
66 
67  edm::LogInfo("HGCalGeom") << "in HGCalNumberingInitialization::produce";
68  if (hgcalDDDConst_ == nullptr) {
70  iRecord.get(name_, pHGpar);
71  hgcalDDDConst_ = new HGCalDDDConstants(&(*pHGpar), name_);
72  }
73  return ReturnType(hgcalDDDConst_) ;
74 }
75 
76 //define this as a plug-in
78 
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< HGCalDDDConstants > ReturnType
#define nullptr
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
ReturnType produce(const IdealGeometryRecord &)
HGCalNumberingInitialization(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60