23 using ReturnType = std::unique_ptr<CaloSimulationParameters>;
42 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::CaloSimParametersESModule called with dd4hep: " 51 desc.
add<
bool>(
"fromDD4Hep",
false);
52 descriptions.
add(
"caloSimulationParameters", desc);
57 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::produce(const HcalParametersRcd& iRecord)";
60 auto ptp = std::make_unique<CaloSimulationParameters>();
64 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::Try to access cms::DDCompactView";
67 builder.build(&(*cpv), *ptp);
70 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::Try to access DDCompactView";
73 builder.build(&(*cpv), *ptp);
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
std::unique_ptr< CaloSimulationParameters > ReturnType
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Compact representation of the geometrical detector hierarchy.
ReturnType produce(const HcalParametersRcd &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
CaloSimParametersESModule(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &)
~CaloSimParametersESModule(void) override