20 using ReturnType = std::unique_ptr<EcalSimulationParameters>;
34 : fromDD4hep_(ps.getParameter<bool>(
"fromDD4hep")), name_(ps.getParameter<std::
string>(
"name")) {
43 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersESModule::EcalSimParametersESModule called with dd4hep: "
50 desc.
add<
bool>(
"fromDD4hep",
false);
52 descriptions.
add(
"ecalSimulationParametersEB", desc);
57 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersESModule::produce(const IdealGeometryRecord& iRecord)";
60 auto ptp = std::make_unique<EcalSimulationParameters>();
64 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersESModule::Try to access cms::DDCompactView";
67 builder.build(&(*cpv),
name_, *ptp);
70 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersESModule::Try to access DDCompactView";
73 builder.build(&(*cpv),
name_, *ptp);
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
ReturnType produce(const IdealGeometryRecord &)
Compact representation of the geometrical detector hierarchy.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
static void fillDescriptions(edm::ConfigurationDescriptions &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< EcalSimulationParameters > ReturnType
EcalSimParametersESModule(const edm::ParameterSet &)