StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFpdTriggerDetector.h
1 
5 /***************************************************************************
6  *
7  * $Id: StFpdTriggerDetector.h,v 2.2 2007/07/11 23:06:45 perev Exp $
8  *
9  * Author: Akio Ogawa, Jul 2004
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StFpdTriggerDetector.h,v $
17  * Revision 2.2 2007/07/11 23:06:45 perev
18  * Cleanup+fix StXXXTriggerDetector
19  *
20  * Revision 2.1 2004/08/03 17:20:33 ullrich
21  * Initial Revision.
22  *
23  **************************************************************************/
24 #ifndef StFpdTriggerDetector_hh
25 #define StFpdTriggerDetector_hh
26 #include "StObject.h"
27 #include "StEnumerations.h"
28 
29 class dst_TrgDet_st;
30 class StTriggerData;
31 
33 public:
35  StFpdTriggerDetector(const dst_TrgDet_st&);
38  StFpdTriggerDetector& operator=(const StFpdTriggerDetector&);
40 
41  void clear();
42  void dump() const;
43  unsigned int numberOfTowers(unsigned int nstbps) const;
44  unsigned int numberOfModules() const;
45  unsigned int numberOfLayer1Boards() const;
46 
47  unsigned int adc(StBeamDirection eastwest, unsigned int nstbps, unsigned int tower) const;
48  unsigned int layer1(StBeamDirection eastwest, unsigned int nstbps, unsigned int board) const;
49  unsigned int layer2(StBeamDirection eastwest, unsigned int nstbps) const;
50 
51  void setAdc(StBeamDirection eastwest, unsigned int nstbps, unsigned int tower, unsigned char v);
52  void setLayer1(StBeamDirection eastwest, unsigned int nstbps, unsigned int board, unsigned short v);
53  void setLayer2(StBeamDirection eastwest, unsigned int nstbps, unsigned short v);
54 
55 protected:
56  enum {mMaxNS = 49, mMaxTB = 25, mMaxPS = 7, mMaxModule = 6, mMaxBoard = 4};
57 
58 private:
59  void init();
60 
61 private:
62  char mBeg[1];
63  unsigned int mMaxTower[mMaxModule];
64  UChar_t* mAdc[2][mMaxModule];
65 
66  UChar_t mEN[mMaxNS];
67  UChar_t mES[mMaxNS];
68  UChar_t mET[mMaxTB];
69  UChar_t mEB[mMaxTB];
70  UChar_t mEPN[mMaxPS];
71  UChar_t mEPS[mMaxPS];
72  UChar_t mWN[mMaxNS];
73  UChar_t mWS[mMaxNS];
74  UChar_t mWT[mMaxTB];
75  UChar_t mWB[mMaxTB];
76  UChar_t mWPN[mMaxPS];
77  UChar_t mWPS[mMaxPS];
78  UShort_t mLayer1[2][mMaxModule][mMaxBoard];
79  UShort_t mLayer2[2][mMaxModule];
80  char mEnd[1];
81 
82  ClassDef(StFpdTriggerDetector,2)
83 };
84 #endif