45 #include "CLHEP/Random/RandGauss.h" 50 findingRecord<SiStripApvGainRcd>();
72 auto apvGain = std::make_unique<SiStripApvGain>();
76 for (
const auto& elm : reader->getAllData() ) {
77 std::vector<float> theSiStripVector;
78 for (
unsigned short j=0; j < elm.second.nApvs; ++j ){
88 LogDebug(
"SiStripApvGain") <<
"ERROR: wrong genMode specifier : " <<
m_genMode <<
", please select one of \"default\" or \"gaussian\"";
93 edm::LogInfo(
"SiStripApvGainGenerator") <<
"detid: " << elm.first <<
" Apv: " << j <<
" gain: " << gainValue;
95 theSiStripVector.push_back(gainValue);
99 if ( ! apvGain->put(elm.first,
SiStripApvGain::Range{theSiStripVector.begin(),theSiStripVector.end()}) ) {
100 edm::LogError(
"SiStripApvGainGenerator") <<
" detid already exists";
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
static const IOVSyncValue & endOfTime()
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
static const IOVSyncValue & beginOfTime()
~SiStripApvGainFakeESSource() override
std::pair< ContainerIterator, ContainerIterator > Range
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
std::unique_ptr< SiStripApvGain > ReturnType
ReturnType produce(const SiStripApvGainRcd &)
SiStripApvGainFakeESSource(const edm::ParameterSet &)