32 edm::LogInfo(
"SiPixelFakeGainESSource::SiPixelFakeGainESSource");
36 findingRecord<SiPixelGainCalibrationRcd>();
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);
64 for(
int i=0;
i<detUnitDimensions.first;
i++) {
65 for(
int j=0; j<detUnitDimensions.second; j++) {
69 obj->
setData(ped, gain , theSiPixelGainCalibration);
76 if( !obj->
put(*detit,range,detUnitDimensions.first) )
77 edm::LogError(
"SiPixelFakeGainESSource")<<
"[SiPixelFakeGainESSource::produce] detid already exists"<<std::endl;
84 return std::unique_ptr<SiPixelGainCalibration>(
obj);
bool put(const uint32_t &detID, Range input, const int &nCols)
SiPixelFakeGainESSource(const edm::ParameterSet &)
static const IOVSyncValue & endOfTime()
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
static const IOVSyncValue & beginOfTime()
~SiPixelFakeGainESSource()
std::pair< ContainerIterator, ContainerIterator > Range
virtual std::unique_ptr< SiPixelGainCalibration > produce(const SiPixelGainCalibrationRcd &)
std::string fullPath() const
void setData(float ped, float gain, std::vector< char > &vped, bool thisPixelIsDead=false, bool thisPixelIsNoisy=false)