CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDDDRecConstantsESMoudle.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalDDDRecConstantsESModule
4 // Class: HcalDDDRecConstantsESModule
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 // Created: Tue Dec 24 16:40:29 PDT 2013
16 // $Id: HcalDDDRecConstantsESModule.cc,v 1.0 2013/12/24 12:47:41 sunanda Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include <boost/shared_ptr.hpp>
24 
25 // user include files
30 
35 
36 //#define DebugLog
37 
39 
40 public:
43 
44  typedef boost::shared_ptr<HcalDDDRecConstants> ReturnType;
45 
47 
49 
50 private:
52 };
53 
55 #ifdef DebugLog
56  std::cout <<"constructing HcalDDDRecConstantsESModule" << std::endl;
57 #endif
58  setWhatProduced(this);
59 }
60 
62 
65  descriptions.add( "hcalDDDRecConstants", desc );
66 }
67 
68 // ------------ method called to produce the data ------------
71 #ifdef DebugLog
72  std::cout << "in HcalDDDRecConstantsESModule::produce" << std::endl;
73 #endif
74  if (hcalDDDConst_ == 0) {
76  iRecord.getRecord<HcalParametersRcd>().get(parHandle);
78  iRecord.getRecord<HcalSimNumberingRecord>().get(hdc);
79  hcalDDDConst_ = new HcalDDDRecConstants(&(*parHandle), *hdc);
80  }
82 }
83 
84 //define this as a plug-in
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
static void fillDescriptions(edm::ConfigurationDescriptions &)
boost::shared_ptr< HcalDDDRecConstants > ReturnType
ReturnType produce(const HcalRecNumberingRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HcalDDDRecConstantsESModule(const edm::ParameterSet &)
tuple cout
Definition: gather_cfg.py:145