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);
void setData(float ped, float gain, std::vector< char > &vped, bool thisColumnIsDead=false, bool thisColumnIsNoisy=false)
static const IOVSyncValue & endOfTime()
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
std::pair< ContainerIterator, ContainerIterator > Range
static const IOVSyncValue & beginOfTime()
~SiPixelFakeGainForHLTESSource()
bool put(const uint32_t &detID, Range input, const int &nCols)
virtual std::unique_ptr< SiPixelGainCalibrationForHLT > produce(const SiPixelGainCalibrationForHLTRcd &)
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
std::string fullPath() const
SiPixelFakeGainForHLTESSource(const edm::ParameterSet &)