30 fp_(conf_.getParameter<
edm::FileInPath>(
"file"))
32 edm::LogInfo(
"SiPixelFakeGainForHLTESSource::SiPixelFakeGainForHLTESSource");
36 findingRecord<SiPixelGainCalibrationForHLTRcd>();
51 unsigned int nmodules = 0;
52 uint32_t nchannels = 0;
55 const std::vector<uint32_t>& DetIds =
reader.getAllDetIds();
58 for(std::vector<uint32_t>::const_iterator detit=DetIds.begin(); detit!=DetIds.end(); detit++) {
60 std::vector<char> theSiPixelGainCalibration;
61 const std::pair<int, int> & detUnitDimensions =
reader.getDetUnitDimensions(*detit);
65 for(
int i=0;
i<detUnitDimensions.first;
i++) {
66 float totalGain = 0.0;
68 float totalEntries=0.0;
69 for(
int j=0; j<detUnitDimensions.second; j++) {
75 float gain = totalGain/totalEntries;
76 float ped = totalPed/totalEntries;
78 obj->
setData(ped,gain, theSiPixelGainCalibration);
89 int nCols = detUnitDimensions.first;
90 if( !obj->
put(*detit,range,nCols) )
91 edm::LogError(
"SiPixelFakeGainForHLTESSource")<<
"[SiPixelFakeGainForHLTESSource::produce] detid already exists"<<std::endl;
98 return std::unique_ptr<SiPixelGainCalibrationForHLT>(
obj);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void setData(float ped, float gain, std::vector< char > &vped, bool thisColumnIsDead=false, bool thisColumnIsNoisy=false)
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
bool put(const uint32_t &detID, Range input, const int &nCols)
virtual std::unique_ptr< SiPixelGainCalibrationForHLT > produce(const SiPixelGainCalibrationForHLTRcd &)
~SiPixelFakeGainForHLTESSource() override
std::string fullPath() const
SiPixelFakeGainForHLTESSource(const edm::ParameterSet &)