64 : fp_(conf_.getParameter<
edm::FileInPath>(
"file")) {
65 edm::LogInfo(
"SiPixelFakeGainESSource::SiPixelFakeGainESSource");
69 findingRecord<SiPixelGainCalibrationRcd>();
76 const std::vector<uint32_t>& DetIds =
reader.getAllDetIds();
79 for (std::vector<uint32_t>::const_iterator detit = DetIds.begin(); detit != DetIds.end(); detit++) {
80 std::vector<char> theSiPixelGainCalibration;
81 const std::pair<int, int>& detUnitDimensions =
reader.getDetUnitDimensions(*detit);
84 for (
int i = 0;
i < detUnitDimensions.first;
i++) {
85 for (
int j = 0;
j < detUnitDimensions.second;
j++) {
88 obj->setData(
ped,
gain, theSiPixelGainCalibration);
95 if (!
obj->put(*detit,
range, detUnitDimensions.first))
97 <<
"[SiPixelFakeGainESSource::produce] detid already exists" << std::endl;
101 return std::unique_ptr<SiPixelGainCalibration>(
obj);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
SiPixelFakeGainESSource(const edm::ParameterSet &)
static const IOVSyncValue & endOfTime()
static const IOVSyncValue & beginOfTime()
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
std::pair< ContainerIterator, ContainerIterator > Range
virtual std::unique_ptr< SiPixelGainCalibration > produce(const SiPixelGainCalibrationRcd &)
const std::string & fullPath() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~SiPixelFakeGainESSource() override=default