CMS 3D CMS Logo

HcalDDDSimulationConstantsESModule.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalDDDSimulationConstantsESModule
4 // Class: HcalDDDSimulationConstantsESModule
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<HcalDDDSimulationConstants>;
35 
37 
39 
40 private:
42 };
43 
45 #ifdef EDM_ML_DEBUG
46  edm::LogVerbatim("HcalGeom") << "constructing HcalDDDSimulationConstantsESModule";
47 #endif
48  auto cc = setWhatProduced(this);
50 }
51 
54  descriptions.add("hcalDDDSimulationConstants", 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<HcalDDDSimulationConstants>(&parSim);
62 }
63 
64 //define this as a plug-in
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
HcalDDDSimulationConstantsESModule::produce
ReturnType produce(const HcalSimNumberingRecord &)
Definition: HcalDDDSimulationConstantsESModule.cc:58
HcalSimNumberingRecord.h
HcalDDDSimulationConstantsESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: HcalDDDSimulationConstantsESModule.cc:52
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
HcalDDDSimulationConstants.h
HcalParametersRcd
Definition: HcalParametersRcd.h:8
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
HcalDDDSimulationConstantsESModule::HcalDDDSimulationConstantsESModule
HcalDDDSimulationConstantsESModule(const edm::ParameterSet &)
Definition: HcalDDDSimulationConstantsESModule.cc:44
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogVerbatim
Definition: MessageLogger.h:297
HcalDDDSimulationConstantsESModule::parSimToken_
edm::ESGetToken< HcalSimulationParameters, HcalParametersRcd > parSimToken_
Definition: HcalDDDSimulationConstantsESModule.cc:41
cc
edm::ESGetToken< HcalSimulationParameters, HcalParametersRcd >
ModuleFactory.h
HcalDDDSimulationConstantsESModule
Definition: HcalDDDSimulationConstantsESModule.cc:30
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESProducer
Definition: ESProducer.h:101
HcalSimNumberingRecord
Definition: HcalSimNumberingRecord.h:25
HcalSimulationParameters
Definition: HcalSimulationParameters.h:6
HcalDDDSimulationConstantsESModule::ReturnType
std::unique_ptr< HcalDDDSimulationConstants > ReturnType
Definition: HcalDDDSimulationConstantsESModule.cc:34