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 
21 // system include files
22 #include <memory>
23 
24 // user include files
28 
33 
34 //#define EDM_ML_DEBUG
35 
37 
38 public:
41 
42  using ReturnType = std::unique_ptr<HcalDDDRecConstants>;
43 
45 
47 
48 private:
51 };
52 
54 #ifdef EDM_ML_DEBUG
55  edm::LogVerbatim("HcalGeom") <<"constructing HcalDDDRecConstantsESModule";
56 #endif
57  auto cc = setWhatProduced(this);
60 }
61 
63 
66  descriptions.add( "hcalDDDRecConstants", desc );
67 }
68 
69 // ------------ method called to produce the data ------------
72 #ifdef EDM_ML_DEBUG
73  edm::LogVerbatim("HcalGeom") << "in HcalDDDRecConstantsESModule::produce";
74 #endif
75  const auto& par = iRecord.get(parToken_);
76  const auto& hdc = iRecord.get(hdcToken_);
77 
78  return std::make_unique<HcalDDDRecConstants>(&par, hdc);
79 }
80 
81 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
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 &)