43 template <
typename Record>
56 template <
typename Record>
67 auto cc = setWhatProduced(
this);
69 auto apvGainLabels = iConfig.getParameter<std::vector<edm::ParameterSet>>(
"APVGain");
70 if (apvGainLabels.empty()) {
71 throw cms::Exception(
"Configuration") <<
"Got empty APVGain vector, but need at least one entry";
75 for (
const auto& gainPSet : apvGainLabels) {
79 if (
record ==
"SiStripApvGainRcd")
80 gainGetters_.emplace_back(make_GainGetter<SiStripApvGainRcd>(
cc,
record,
label));
81 else if (
record ==
"SiStripApvGain2Rcd")
82 gainGetters_.emplace_back(make_GainGetter<SiStripApvGain2Rcd>(
cc,
record,
label));
83 else if (
record ==
"SiStripApvGain3Rcd")
84 gainGetters_.emplace_back(make_GainGetter<SiStripApvGain3Rcd>(
cc,
record,
label));
87 <<
"SiStripGainESProducer::ctor ERROR: unrecognized record name " <<
record << std::endl
88 <<
"please specify one of: SiStripApvGainRcd, SiStripApvGain2Rcd, SiStripApvGain3Rcd";
89 factor_.push_back_norm(gainPSet.getUntrackedParameter<
double>(
"NormalizationFactor", 1.));
91 factor_.resetIfBadNorm();