49 #include "CLHEP/Random/RandGauss.h"
53 findingRecord<SiStripApvGainRcd>();
73 using namespace edm::es;
75 auto apvGain = std::make_unique<SiStripApvGain>();
79 std::vector<float> theSiStripVector;
80 for (
unsigned short j = 0;
j < elm.second.nApvs; ++
j) {
91 <<
", 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";
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
static const IOVSyncValue & endOfTime()
Log< level::Error, false > LogError
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
SiStripDetInfo read(std::string filePath)
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
T getParameter(std::string const &) const
const std::map< uint32_t, DetInfo > & getAllData() const noexcept
std::unique_ptr< SiStripApvGain > ReturnType
ReturnType produce(const SiStripApvGainRcd &)
std::string fullPath() const
SiStripApvGainFakeESSource(const edm::ParameterSet &)