30 : fp_(conf_.getParameter<
edm::FileInPath>(
"file")) {
31 edm::LogInfo(
"SiPixelFakeGainForHLTESSource::SiPixelFakeGainForHLTESSource");
35 findingRecord<SiPixelGainCalibrationForHLTRcd>();
48 const std::vector<uint32_t>& DetIds =
reader.getAllDetIds();
51 for (std::vector<uint32_t>::const_iterator detit = DetIds.begin(); detit != DetIds.end(); detit++) {
52 std::vector<char> theSiPixelGainCalibration;
53 const std::pair<int, int>& detUnitDimensions =
reader.getDetUnitDimensions(*detit);
57 for (
int i = 0;
i < detUnitDimensions.first;
i++) {
58 float totalGain = 0.0;
60 float totalEntries = 0.0;
61 for (
int j = 0;
j < detUnitDimensions.second;
j++) {
65 if ((
j + 1) % 80 == 0) {
66 float gain = totalGain / totalEntries;
67 float ped = totalPed / totalEntries;
69 obj->setData(
ped,
gain, theSiPixelGainCalibration);
80 int nCols = detUnitDimensions.first;
83 <<
"[SiPixelFakeGainForHLTESSource::produce] detid already exists" << std::endl;
87 return std::unique_ptr<SiPixelGainCalibrationForHLT>(
obj);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
std::string fullPath() const
static const IOVSyncValue & endOfTime()
std::pair< ContainerIterator, ContainerIterator > Range
static const IOVSyncValue & beginOfTime()
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Log< level::Info, false > LogInfo
virtual std::unique_ptr< SiPixelGainCalibrationForHLT > produce(const SiPixelGainCalibrationForHLTRcd &)
~SiPixelFakeGainForHLTESSource() override
SiPixelFakeGainForHLTESSource(const edm::ParameterSet &)