23 using ReturnType = std::unique_ptr<CaloSimulationParameters>;
44 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::CaloSimParametersESModule called with dd4hep: "
53 desc.
add<
bool>(
"fromDD4hep",
false);
54 descriptions.
add(
"caloSimulationParameters", desc);
59 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::produce(const HcalParametersRcd& iRecord)";
62 auto ptp = std::make_unique<CaloSimulationParameters>();
66 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::Try to access cms::DDCompactView";
69 builder.build(&(*cpv), *ptp);
72 edm::LogVerbatim(
"HCalGeom") <<
"CaloSimParametersESModule::Try to access DDCompactView";
75 builder.build(&(*cpv), *ptp);
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
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)
T getParameter(std::string const &) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
CaloSimParametersESModule(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
~CaloSimParametersESModule(void) override