File indexing completed on 2023-03-17 10:46:36
0001 #ifndef CastorQIEShape_h
0002 #define CastorQIEShape_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <vector>
0011 #include <algorithm>
0012
0013
0014 class CastorQIEShape {
0015 public:
0016 CastorQIEShape();
0017 ~CastorQIEShape();
0018 float lowEdge(unsigned fAdc) const;
0019 float highEdge(unsigned fAdc) const;
0020 float center(unsigned fAdc) const;
0021 bool setLowEdges(const float fValue[32]);
0022 unsigned range(unsigned fAdc) const { return (fAdc >> 5) & 0x3; }
0023 unsigned local(unsigned fAdc) const { return fAdc & 0x1f; }
0024
0025 protected:
0026 private:
0027 void expand();
0028 bool setLowEdge(float fValue, unsigned fAdc);
0029 float mValues[129];
0030 };
0031
0032 #endif