CMS 3D CMS Logo

SiPixelGainCalibrationService.cc

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *       Filename:  SiPixelGainCalibrationServic.cc
00005  *
00006  *    Description:  
00007  *
00008  *        Version:  1.0 (some functionality moved from ../interface/SiPixelGainCalibrationService.h)
00009  *        Created:  04/16/2008 10:35:35 AM
00010  *
00011  *         Author:  Evan Friis (evan.klose.friis@cern.ch)
00012  *                  University of California, Davis
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 

Generated on Tue Jun 9 17:26:57 2009 for CMSSW by  doxygen 1.5.4