#include <CastorQIEShape.h>
Public Member Functions | |
CastorQIEShape () | |
float | center (unsigned fAdc) const |
float | highEdge (unsigned fAdc) const |
unsigned | local (unsigned fAdc) const |
float | lowEdge (unsigned fAdc) const |
unsigned | range (unsigned fAdc) const |
bool | setLowEdges (const float fValue[32]) |
~CastorQIEShape () | |
Private Member Functions | |
void | expand () |
bool | setLowEdge (float fValue, unsigned fAdc) |
Private Attributes | |
float | mValues [129] |
Definition at line 14 of file CastorQIEShape.h.
CastorQIEShape::CastorQIEShape | ( | ) |
CastorQIEShape::~CastorQIEShape | ( | ) |
Definition at line 27 of file CastorQIEShape.cc.
{}
float CastorQIEShape::center | ( | unsigned | fAdc | ) | const |
Definition at line 47 of file CastorQIEShape.cc.
References mValues.
Referenced by CastorQIECoder::charge().
void CastorQIEShape::expand | ( | ) | [private] |
Definition at line 29 of file CastorQIEShape.cc.
References i, getHLTprescales::index, mValues, and range().
Referenced by CastorQIEShape(), and setLowEdges().
{ int scale = 1; for (unsigned range = 1; range < 4; range++) { scale = scale * 5; unsigned index = range * 32; mValues [index] = mValues [index - 2]; // link to previous range for (unsigned i = 1; i < 32; i++) { mValues [index + i] = mValues [index + i - 1] + scale * (mValues [i] - mValues [i - 1]); } } mValues [128] = 2 * mValues [127] - mValues [126]; // extrapolate }
float CastorQIEShape::highEdge | ( | unsigned | fAdc | ) | const |
Definition at line 55 of file CastorQIEShape.cc.
References mValues.
Referenced by CastorQIECoder::adc().
unsigned CastorQIEShape::local | ( | unsigned | fAdc | ) | const [inline] |
Definition at line 23 of file CastorQIEShape.h.
{return fAdc & 0x1f;}
float CastorQIEShape::lowEdge | ( | unsigned | fAdc | ) | const |
Definition at line 42 of file CastorQIEShape.cc.
References mValues.
{ if (fAdc < 128) return mValues [fAdc]; return 0.; }
unsigned CastorQIEShape::range | ( | unsigned | fAdc | ) | const [inline] |
bool CastorQIEShape::setLowEdge | ( | float | fValue, |
unsigned | fAdc | ||
) | [private] |
Definition at line 62 of file CastorQIEShape.cc.
References mValues.
Referenced by setLowEdges().
{ if (fAdc >= 32) return false; mValues [fAdc] = fValue; return true; }
bool CastorQIEShape::setLowEdges | ( | const float | fValue[32] | ) |
Definition at line 68 of file CastorQIEShape.cc.
References ecalMGPA::adc(), expand(), query::result, and setLowEdge().
float CastorQIEShape::mValues[129] [private] |
Definition at line 28 of file CastorQIEShape.h.
Referenced by CastorQIEShape(), center(), expand(), highEdge(), lowEdge(), and setLowEdge().