00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef StFpdTriggerDetector_hh
00025 #define StFpdTriggerDetector_hh
00026 #include "StObject.h"
00027 #include "StEnumerations.h"
00028
00029 class dst_TrgDet_st;
00030 class StTriggerData;
00031
00032 class StFpdTriggerDetector : public StObject {
00033 public:
00034 StFpdTriggerDetector();
00035 StFpdTriggerDetector(const dst_TrgDet_st&);
00036 StFpdTriggerDetector(const StTriggerData&);
00037 StFpdTriggerDetector(const StFpdTriggerDetector&);
00038 StFpdTriggerDetector& operator=(const StFpdTriggerDetector&);
00039 ~StFpdTriggerDetector();
00040
00041 void clear();
00042 void dump() const;
00043 unsigned int numberOfTowers(unsigned int nstbps) const;
00044 unsigned int numberOfModules() const;
00045 unsigned int numberOfLayer1Boards() const;
00046
00047 unsigned int adc(StBeamDirection eastwest, unsigned int nstbps, unsigned int tower) const;
00048 unsigned int layer1(StBeamDirection eastwest, unsigned int nstbps, unsigned int board) const;
00049 unsigned int layer2(StBeamDirection eastwest, unsigned int nstbps) const;
00050
00051 void setAdc(StBeamDirection eastwest, unsigned int nstbps, unsigned int tower, unsigned char v);
00052 void setLayer1(StBeamDirection eastwest, unsigned int nstbps, unsigned int board, unsigned short v);
00053 void setLayer2(StBeamDirection eastwest, unsigned int nstbps, unsigned short v);
00054
00055 protected:
00056 enum {mMaxNS = 49, mMaxTB = 25, mMaxPS = 7, mMaxModule = 6, mMaxBoard = 4};
00057
00058 private:
00059 void init();
00060
00061 private:
00062 char mBeg[1];
00063 unsigned int mMaxTower[mMaxModule];
00064 UChar_t* mAdc[2][mMaxModule];
00065
00066 UChar_t mEN[mMaxNS];
00067 UChar_t mES[mMaxNS];
00068 UChar_t mET[mMaxTB];
00069 UChar_t mEB[mMaxTB];
00070 UChar_t mEPN[mMaxPS];
00071 UChar_t mEPS[mMaxPS];
00072 UChar_t mWN[mMaxNS];
00073 UChar_t mWS[mMaxNS];
00074 UChar_t mWT[mMaxTB];
00075 UChar_t mWB[mMaxTB];
00076 UChar_t mWPN[mMaxPS];
00077 UChar_t mWPS[mMaxPS];
00078 UShort_t mLayer1[2][mMaxModule][mMaxBoard];
00079 UShort_t mLayer2[2][mMaxModule];
00080 char mEnd[1];
00081
00082 ClassDef(StFpdTriggerDetector,2)
00083 };
00084 #endif