CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 #include <boost/shared_ptr.hpp>
22 
23 // user include files
28 
31 
32 //#define DebugLog
33 
35 
36 public:
39 
40  typedef boost::shared_ptr<HcalDDDSimConstants> ReturnType;
41 
43 
45 
47 
48 private:
50 };
51 
53 #ifdef DebugLog
54  std::cout <<"constructing HcalDDDSimConstantsESModule" << std::endl;
55 #endif
57 }
58 
60 
63  descriptions.add( "hcalDDDSimConstants", desc );
64 }
65 
66 // ------------ method called to produce the data ------------
69 #ifdef DebugLog
70  std::cout << "in HcalDDDSimConstantsESModule::produce" << std::endl;
71 #endif
72  if (hcalDDDConst_ == 0) {
73  edm::LogError("HCalGeom") << "HcalDDDSimConstantsESModule::produceHcalDDDSimConstants has NOT been initialized!";
74  throw cms::Exception("DDException") << "HcalDDDSimConstantsESModule::Cannot produce HcalDDDSimConstnats";
75  }
77 }
78 
80 
81  std::string label_;
83  igr.get(label_, parHandle);
84 #ifdef DebugLog
85  std::cout << "in HcalDDDSimConstantsESModule::initializeHcalDDDSimConstants" << std::endl;
86 #endif
87  if ( hcalDDDConst_ != 0 ) {
88  delete hcalDDDConst_;
89  }
90  const HcalParameters* hpar = &(*parHandle);
91 #ifdef DebugLog
92  std::cout << "about to make my new hcalDDDConst_ with " << hpar << std::endl;
93 #endif
95 }
96 
97 //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 &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
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)
boost::shared_ptr< HcalDDDSimConstants > ReturnType
tuple cout
Definition: gather_cfg.py:121