CMS 3D CMS Logo

Public Member Functions

SiPixelGainCalibrationService Class Reference

#include <SiPixelGainCalibrationService.h>

Inheritance diagram for SiPixelGainCalibrationService:
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd > SiPixelGainCalibrationServiceBase

List of all members.

Public Member Functions

float getGain (const uint32_t &detID, const int &col, const int &row)
float getPedestal (const uint32_t &detID, const int &col, const int &row)
bool isDead (const uint32_t &detID, const int &col, const int &row)
bool isDeadColumn (const uint32_t &detID, const int &col, const int &row)
bool isNoisy (const uint32_t &detID, const int &col, const int &row)
bool isNoisyColumn (const uint32_t &detID, const int &col, const int &row)
 SiPixelGainCalibrationService (const edm::ParameterSet &conf)
 ~SiPixelGainCalibrationService ()

Detailed Description

Definition at line 21 of file SiPixelGainCalibrationService.h.


Constructor & Destructor Documentation

SiPixelGainCalibrationService::SiPixelGainCalibrationService ( const edm::ParameterSet conf) [inline, explicit]
SiPixelGainCalibrationService::~SiPixelGainCalibrationService ( ) [inline]

Definition at line 26 of file SiPixelGainCalibrationService.h.

{};

Member Function Documentation

float SiPixelGainCalibrationService::getGain ( const uint32_t &  detID,
const int &  col,
const int &  row 
) [virtual]
float SiPixelGainCalibrationService::getPedestal ( const uint32_t &  detID,
const int &  col,
const int &  row 
) [virtual]

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 19 of file SiPixelGainCalibrationService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::throwExepctionForBadRead().

{
   bool isDead = false;
   bool isNoisy = false;
   float pedestalValue = this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
   if (isDead || isNoisy)
   {
      this->throwExepctionForBadRead("FullCalibration getPedestal()",detID, col, row, pedestalValue);
      return 0.0;
   }
   return pedestalValue;
}
bool SiPixelGainCalibrationService::isDead ( const uint32_t &  detID,
const int &  col,
const int &  row 
) [virtual]

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 45 of file SiPixelGainCalibrationService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), isNoisy(), and cms::Exception::what().

Referenced by getGain(), getPedestal(), and isNoisy().

{
   bool isDead = false;
   bool isNoisy = false;
   try  
   {
      this->getPedestalByPixel(detID, col, row, isDead, isNoisy); 
   }
   catch (cms::Exception& e) 
   {
      // Do not stop processing if you check if a nonexistant pixel is dead
      edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is dead.  Exception message: " << e.what();
      isDead = false; 
   }
   return isDead;
}
bool SiPixelGainCalibrationService::isDeadColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
) [virtual]

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 79 of file SiPixelGainCalibrationService.cc.

{
   edm::LogError("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!";
   return false;
}
bool SiPixelGainCalibrationService::isNoisy ( const uint32_t &  detID,
const int &  col,
const int &  row 
) [virtual]

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 62 of file SiPixelGainCalibrationService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), isDead(), and cms::Exception::what().

Referenced by getGain(), getPedestal(), and isDead().

{
   bool isDead = false;
   bool isNoisy = false;
   try  
   {
      this->getPedestalByPixel(detID, col, row, isDead, isNoisy); 
   }
   catch (cms::Exception& e) 
   {
      // Do not stop processing if you check if a nonexistant pixel is noisy
      edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is noisy.  Exception message: " << e.what();
      isNoisy = false; 
   }
   return isNoisy;
}
bool SiPixelGainCalibrationService::isNoisyColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
) [virtual]

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 85 of file SiPixelGainCalibrationService.cc.

{
   edm::LogError("SiPixelGainCalibrationService") << "You attempted to check if an entire column was noisy with a payload that stores information at pixel granularity.  Please check by pixel. THANKS!";
   return false;
}