CMS 3D CMS Logo

HcalDDDSimConstantsESModule.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalDDDSimConstantsESModule
4 // Class: HcalDDDSimConstantsESModule
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 // Created: Tue Dec 24 16:40:29 PDT 2013
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
27 
30 
31 //#define EDM_ML_DEBUG
32 
34 
35 public:
38 
39  typedef std::shared_ptr<HcalDDDSimConstants> ReturnType;
40 
42 
43  ReturnType produce(const HcalSimNumberingRecord&);
44 
46 
47 private:
49 };
50 
52 #ifdef EDM_ML_DEBUG
53  edm::LogVerbatim("HcalGeom") <<"constructing HcalDDDSimConstantsESModule";
54 #endif
56 }
57 
59 
62  descriptions.add( "hcalDDDSimConstants", desc );
63 }
64 
65 // ------------ method called to produce the data ------------
68 #ifdef EDM_ML_DEBUG
69  edm::LogVerbatim("HcalGeom") << "in HcalDDDSimConstantsESModule::produce";
70 #endif
71  if (hcalDDDConst_ == nullptr) {
72  edm::LogError("HCalGeom") << "HcalDDDSimConstantsESModule::produceHcalDDDSimConstants has NOT been initialized!";
73  throw cms::Exception("DDException") << "HcalDDDSimConstantsESModule::Cannot produce HcalDDDSimConstnats";
74  }
76 }
77 
79 
80  std::string label_;
82  igr.get(label_, parHandle);
83 #ifdef EDM_ML_DEBUG
84  edm::LogVerbatim("HcalGeom") << "in HcalDDDSimConstantsESModule::initializeHcalDDDSimConstants";
85 #endif
86  const HcalParameters* hpar = &(*parHandle);
87 #ifdef EDM_ML_DEBUG
88  edm::LogVerbatim("HcalGeom") << "about to make my new hcalDDDConst_ with "
89  << hpar;
90 #endif
92 }
93 
94 //define this as a plug-in
static void fillDescriptions(edm::ConfigurationDescriptions &)
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
ReturnType produce(const HcalSimNumberingRecord &)
#define nullptr
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
std::shared_ptr< HcalDDDSimConstants > ReturnType
HcalDDDSimConstantsESModule(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void initializeHcalDDDSimConstants(const HcalParametersRcd &igr)