00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "CondTools/SiPixel/interface/SiPixelGainCalibrationService.h"
00018
00019 float SiPixelGainCalibrationService::getPedestal( const uint32_t& detID,const int& col, const int& row)
00020 {
00021 bool isDead = false;
00022 float pedestalValue = this->getPedestalByPixel(detID, col, row, isDead);
00023 if (isDead)
00024 {
00025 this->throwExepctionForBadRead("FullCalibration getPedestal()",detID, col, row, pedestalValue);
00026 return 0.0;
00027 }
00028 return pedestalValue;
00029 }
00030
00031 float SiPixelGainCalibrationService::getGain( const uint32_t& detID,const int& col, const int& row)
00032 {
00033 bool isDead = false;
00034 float gainValue = this->getGainByColumn(detID, col, row, isDead);
00035 if (isDead)
00036 {
00037 this->throwExepctionForBadRead("FullCalibration getGain()",detID, col, row, gainValue);
00038 return 0.0;
00039 }
00040 return gainValue;
00041 }
00042
00043 bool SiPixelGainCalibrationService::isDead( const uint32_t& detID,const int& col, const int& row)
00044 {
00045 bool isDead = false;
00046 this->getPedestalByPixel(detID, col, row, isDead);
00047 return isDead;
00048 }
00049
00050 bool SiPixelGainCalibrationService::isDeadColumn( const uint32_t& detID,const int& col, const int& row)
00051 {
00052 throw cms::Exception("SiPixelGainCalibrationService") << "You attempted to check if an entire column was dead with a payload that stores information at pixel granularity. Please check by pixel. THANKS!";
00053 return false;
00054 }
00055