CMS 3D CMS Logo

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 // system include files
21 #include <memory>
22 
23 // user include files
27 
32 
33 //#define EDM_ML_DEBUG
34 
36 public:
39 
40  using ReturnType = std::unique_ptr<HcalDDDRecConstants>;
41 
43 
45 
46 private:
49 };
50 
52 #ifdef EDM_ML_DEBUG
53  edm::LogVerbatim("HcalGeom") << "constructing HcalDDDRecConstantsESModule";
54 #endif
55  auto cc = setWhatProduced(this);
58 }
59 
61 
64  descriptions.add("hcalDDDRecConstants", desc);
65 }
66 
67 // ------------ method called to produce the data ------------
69 #ifdef EDM_ML_DEBUG
70  edm::LogVerbatim("HcalGeom") << "in HcalDDDRecConstantsESModule::produce";
71 #endif
72  const auto& par = iRecord.get(parToken_);
73  const auto& hdc = iRecord.get(hdcToken_);
74 
75  return std::make_unique<HcalDDDRecConstants>(&par, hdc);
76 }
77 
78 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< HcalParameters, HcalParametersRcd > parToken_
std::unique_ptr< HcalDDDRecConstants > ReturnType
static void fillDescriptions(edm::ConfigurationDescriptions &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > hdcToken_
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 &)