00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef StRichPixel_hh
00041 #define StRichPixel_hh
00042
00043 #include "StObject.h"
00044 #include "StEnumerations.h"
00045
00046 class StRichPixel : public StObject {
00047 public:
00048 StRichPixel();
00049 StRichPixel(unsigned int packedData);
00050
00051
00052 ~StRichPixel();
00053
00054 int operator==(const StRichPixel&) const;
00055 int operator!=(const StRichPixel&) const;
00056
00057 void setPackedData(unsigned int);
00058
00059 unsigned short pad() const;
00060 unsigned short row() const;
00061 unsigned short adc() const;
00062
00063 protected:
00064 UInt_t mPackedData;
00065
00066 ClassDef(StRichPixel,1)
00067 };
00068
00069 inline void
00070 StRichPixel::setPackedData(unsigned int pixel)
00071 {
00072 mPackedData = pixel;
00073 }
00074
00075 inline unsigned short
00076 StRichPixel::pad() const
00077 {
00078 return (mPackedData & 0xff);
00079 }
00080
00081 inline unsigned short
00082 StRichPixel::row() const
00083 {
00084 return ( (mPackedData>>8) & 0xff);
00085 }
00086
00087 inline unsigned short
00088 StRichPixel::adc() const
00089 {
00090
00091
00092
00093
00094
00095
00096 return ( ( (mPackedData>>26) & 0x1) ? 1024 : ( (mPackedData>>16) & 0x3ff) );
00097
00098 }
00099
00100 #endif