CMS 3D CMS Logo

HcalSimulationConstantsESModule.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalSimulationConstantsESModule
4 // Class: HcalSimulationConstantsESModule
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 // Created: Mon Aug 12 16:40:29 PDT 2019
16 //
17 //
18 
19 #include <memory>
20 
24 
27 
28 //#define EDM_ML_DEBUG
29 
31 public:
33 
34  using ReturnType = std::unique_ptr<HcalSimulationConstants>;
35 
37 
39 
40 private:
42 };
43 
45 #ifdef EDM_ML_DEBUG
46  edm::LogVerbatim("HCalGeom") << "constructing HcalSimulationConstantsESModule";
47 #endif
48  auto cc = setWhatProduced(this);
50 }
51 
54  descriptions.add("hcalSimulationConstants", desc);
55 }
56 
57 // ------------ method called to produce the data ------------
59  const HcalSimNumberingRecord& iRecord) {
60  const auto& parSim = iRecord.get(parSimToken_);
61  return std::make_unique<HcalSimulationConstants>(&parSim);
62 }
63 
64 //define this as a plug-in
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::ESGetToken< HcalSimulationParameters, HcalParametersRcd > parSimToken_
std::unique_ptr< HcalSimulationConstants > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
ReturnType produce(const HcalSimNumberingRecord &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
HcalSimulationConstantsESModule(const edm::ParameterSet &)