46 #include "CLHEP/Random/RandGauss.h" 51 findingRecord<SiStripApvGainRcd>();
74 auto apvGain = std::make_unique<SiStripApvGain>();
79 for (
const auto& elm :
reader.getAllData() ) {
80 std::vector<float> theSiStripVector;
81 for (
unsigned short j=0; j < elm.second.nApvs; ++j ){
91 LogDebug(
"SiStripApvGain") <<
"ERROR: wrong genMode specifier : " <<
m_genMode <<
", please select one of \"default\" or \"gaussian\"";
96 edm::LogInfo(
"SiStripApvGainGenerator") <<
"detid: " << elm.first <<
" Apv: " << j <<
" gain: " << gainValue;
98 theSiStripVector.push_back(gainValue);
102 if ( ! apvGain->put(elm.first,
SiStripApvGain::Range{theSiStripVector.begin(),theSiStripVector.end()}) ) {
103 edm::LogError(
"SiStripApvGainGenerator") <<
" detid already exists";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static const IOVSyncValue & endOfTime()
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
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 &)
std::string fullPath() const
SiStripApvGainFakeESSource(const edm::ParameterSet &)