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 
24 // user include files
29 
34 
35 //#define EDM_ML_DEBUG
36 
38 
39 public:
42 
43  typedef std::shared_ptr<HcalDDDRecConstants> ReturnType;
44 
46 
48 
49 private:
51 };
52 
54 #ifdef EDM_ML_DEBUG
55  std::cout <<"constructing HcalDDDRecConstantsESModule" << std::endl;
56 #endif
57  setWhatProduced(this);
58 }
59 
61 
64  descriptions.add( "hcalDDDRecConstants", desc );
65 }
66 
67 // ------------ method called to produce the data ------------
70 #ifdef EDM_ML_DEBUG
71  std::cout << "in HcalDDDRecConstantsESModule::produce" << std::endl;
72 #endif
73  if (hcalDDDConst_ == 0) {
75  iRecord.getRecord<HcalParametersRcd>().get(parHandle);
77  iRecord.getRecord<HcalSimNumberingRecord>().get(hdc);
78  hcalDDDConst_ = new HcalDDDRecConstants(&(*parHandle), *hdc);
79  }
81 }
82 
83 //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 &)
ReturnType produce(const HcalRecNumberingRecord &)
std::shared_ptr< HcalDDDRecConstants > ReturnType
#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