42 template <
typename Record>
55 template <
typename Record>
68 auto apvGainLabels = iConfig.getParameter<std::vector<edm::ParameterSet>>(
"APVGain");
69 if (apvGainLabels.empty()) {
70 throw cms::Exception(
"Configuration") <<
"Got empty APVGain vector, but need at least one entry";
74 for (
const auto& gainPSet : apvGainLabels) {
78 if (
record ==
"SiStripApvGainRcd")
80 else if (
record ==
"SiStripApvGain2Rcd")
82 else if (
record ==
"SiStripApvGain3Rcd")
86 <<
"SiStripGainESProducer::ctor ERROR: unrecognized record name " <<
record << std::endl
87 <<
"please specify one of: SiStripApvGainRcd, SiStripApvGain2Rcd, SiStripApvGain3Rcd";
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
std::unique_ptr< SiStripGain > produce(const SiStripGainRcd &)
~SiStripGainESProducer() override
virtual const SiStripApvGain & gain(const SiStripGainRcd &rcd) const =0
GainGetter(std::string record, std::string label)
auto consumesFrom(ESInputTag const &tag)
void push_back_norm(double norm)
SiStripGainESProducer(const edm::ParameterSet &)
std::pair< std::string, std::string > recordLabel_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::vector< std::unique_ptr< GainGetter > > gainGetters_
const auto & recordLabel() const
edm::ESGetToken< SiStripApvGain, Record > token_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
virtual ~GainGetter()=default
const SiStripApvGain & gain(const SiStripGainRcd &rcd) const override
double get(const SiStripApvGain &gain, const int apvGainIndex) const
GainGetterT(edm::ESConsumesCollector &cc, std::string record, std::string label)
SiStripGainFactor factor_
auto make_GainGetter(edm::ESConsumesCollector &cc, std::string record, std::string label)