CMS 3D CMS Logo

HcalCalibrationQIECoder Class Reference

#include <CondFormats/HcalObjects/interface/HcalCalibrationQIECoder.h>

List of all members.

Public Member Functions

unsigned adc (const float fCharge) const
 fC -> ADC conversion
float charge (const unsigned fAdc) const
 ADC [0..31] -> fC conversion.
 HcalCalibrationQIECoder (unsigned long fId=0)
float minCharge (unsigned fBin) const
const float * minCharges () const
uint32_t rawId () const
void setMinCharge (unsigned fBin, float fValue)
void setMinCharges (const float fValue[32])

Private Member Functions

float * base ()
const float * base () const

Private Attributes

float bin0
float bin1
float bin10
float bin11
float bin12
float bin13
float bin14
float bin15
float bin16
float bin17
float bin18
float bin19
float bin2
float bin20
float bin21
float bin22
float bin23
float bin24
float bin25
float bin26
float bin27
float bin28
float bin29
float bin3
float bin30
float bin31
float bin4
float bin5
float bin6
float bin7
float bin8
float bin9
uint32_t mId


Detailed Description

Definition at line 15 of file HcalCalibrationQIECoder.h.


Constructor & Destructor Documentation

HcalCalibrationQIECoder::HcalCalibrationQIECoder ( unsigned long  fId = 0  )  [inline]

Definition at line 17 of file HcalCalibrationQIECoder.h.

00017 : mId (fId) {}


Member Function Documentation

unsigned HcalCalibrationQIECoder::adc ( const float  fCharge  )  const

fC -> ADC conversion

Definition at line 18 of file HcalCalibrationQIECoder.cc.

References base(), and data.

00018                                                           {
00019   const float* data = base ();
00020   unsigned adc = 1;
00021   for (; adc < 32; adc++) {
00022     if (fCharge < data[adc]) return adc-1;
00023   }
00024   return 31; // overflow
00025 }

float* HcalCalibrationQIECoder::base (  )  [inline, private]

Definition at line 65 of file HcalCalibrationQIECoder.h.

References bin0.

00065 {return &bin0;}

const float* HcalCalibrationQIECoder::base (  )  const [inline, private]

Definition at line 64 of file HcalCalibrationQIECoder.h.

References bin0.

Referenced by adc(), charge(), minCharge(), minCharges(), setMinCharge(), and setMinCharges().

00064 {return &bin0;}

float HcalCalibrationQIECoder::charge ( const unsigned  fAdc  )  const

ADC [0..31] -> fC conversion.

Definition at line 12 of file HcalCalibrationQIECoder.cc.

References base(), and data.

00012                                                           {
00013   const float* data = base ();
00014   if (fAdc >= 31) return (3*data[31]-data[30])/2.; // extrapolation
00015   return (data[fAdc]+data[fAdc+1])/2;
00016 }

float HcalCalibrationQIECoder::minCharge ( unsigned  fBin  )  const

Definition at line 27 of file HcalCalibrationQIECoder.cc.

References base(), and data.

00027                                                              {
00028   const float* data = base ();
00029   return fBin < 32 ? data[fBin] : data[31];
00030 }

const float * HcalCalibrationQIECoder::minCharges (  )  const

Definition at line 32 of file HcalCalibrationQIECoder.cc.

References base(), and data.

00032                                                         {
00033   const float* data = base ();
00034   return data;
00035 }

uint32_t HcalCalibrationQIECoder::rawId (  )  const [inline]

Definition at line 29 of file HcalCalibrationQIECoder.h.

References mId.

00029 {return mId;}

void HcalCalibrationQIECoder::setMinCharge ( unsigned  fBin,
float  fValue 
)

Definition at line 38 of file HcalCalibrationQIECoder.cc.

References base(), and data.

00038                                                                        {
00039   float* data = base ();
00040   if (fBin < 32) data [fBin] = fValue;
00041 }

void HcalCalibrationQIECoder::setMinCharges ( const float  fValue[32]  ) 

Definition at line 43 of file HcalCalibrationQIECoder.cc.

References base(), data, and i.

Referenced by HcalDbOnline::getObject().

00043                                                                     {
00044   float* data = base ();
00045   for (int i = 0; i < 32; i++) data[i] = fValue[i];
00046 }


Member Data Documentation

float HcalCalibrationQIECoder::bin0 [private]

Definition at line 32 of file HcalCalibrationQIECoder.h.

Referenced by base().

float HcalCalibrationQIECoder::bin1 [private]

Definition at line 33 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin10 [private]

Definition at line 42 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin11 [private]

Definition at line 43 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin12 [private]

Definition at line 44 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin13 [private]

Definition at line 45 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin14 [private]

Definition at line 46 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin15 [private]

Definition at line 47 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin16 [private]

Definition at line 48 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin17 [private]

Definition at line 49 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin18 [private]

Definition at line 50 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin19 [private]

Definition at line 51 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin2 [private]

Definition at line 34 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin20 [private]

Definition at line 52 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin21 [private]

Definition at line 53 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin22 [private]

Definition at line 54 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin23 [private]

Definition at line 55 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin24 [private]

Definition at line 56 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin25 [private]

Definition at line 57 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin26 [private]

Definition at line 58 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin27 [private]

Definition at line 59 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin28 [private]

Definition at line 60 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin29 [private]

Definition at line 61 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin3 [private]

Definition at line 35 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin30 [private]

Definition at line 62 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin31 [private]

Definition at line 63 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin4 [private]

Definition at line 36 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin5 [private]

Definition at line 37 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin6 [private]

Definition at line 38 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin7 [private]

Definition at line 39 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin8 [private]

Definition at line 40 of file HcalCalibrationQIECoder.h.

float HcalCalibrationQIECoder::bin9 [private]

Definition at line 41 of file HcalCalibrationQIECoder.h.

uint32_t HcalCalibrationQIECoder::mId [private]

Definition at line 31 of file HcalCalibrationQIECoder.h.

Referenced by rawId().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:29 2009 for CMSSW by  doxygen 1.5.4