StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StL0Trigger.h
1 
5 /***************************************************************************
6  *
7  * $Id: StL0Trigger.h,v 2.10 2005/10/10 19:24:38 ullrich Exp $
8  *
9  * Author: Thomas Ullrich, Sep 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StL0Trigger.h,v $
17  * Revision 2.10 2005/10/10 19:24:38 ullrich
18  * run number range check, and updated for run5.
19  *
20  * Revision 2.9 2004/08/03 17:22:16 ullrich
21  * Major update by Akio and Marco.
22  *
23  * Revision 2.8 2003/07/29 19:50:53 ullrich
24  * Fix for spin bits added.
25  *
26  * Revision 2.7 2002/11/26 02:19:11 perev
27  * StEventMaker ITTF modif
28  *
29  * Revision 2.6 2002/02/22 22:56:48 jeromel
30  * Doxygen basic documentation in all header files. None of this is required
31  * for QM production.
32  *
33  * Revision 2.5 2002/02/15 00:18:13 ullrich
34  * Changed signature of bunchCrossingId7bit().
35  *
36  * Revision 2.4 2002/01/09 15:37:12 ullrich
37  * Bunch crossing id and spin bit extraction functions added.
38  *
39  * Revision 2.3 2001/07/21 00:46:54 ullrich
40  * Changed nMaxBcData from 8 to 16 since table changed.
41  *
42  * Revision 2.2 2001/07/19 00:04:07 ullrich
43  * Updated to handle new trigger info.
44  *
45  * Revision 2.1 2001/04/05 04:00:38 ullrich
46  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
47  *
48  * Revision 2.0 1999/10/12 18:42:26 ullrich
49  * Completely Revised for New Version
50  *
51  **************************************************************************/
52 #ifndef StL0Trigger_hh
53 #define StL0Trigger_hh
54 #include "StTrigger.h"
55 
56 class dst_L0_Trigger_st;
57 class dst_TrgDet_st;
58 class StTriggerData;
59 
60 class StL0Trigger : public StTrigger {
61 public:
62  StL0Trigger();
63  void set(const dst_L0_Trigger_st*);
64  void set(const dst_TrgDet_st *);
65  void set(const StTriggerData *);
66  // StL0Trigger(const StL0Trigger&); use default
67  // StL0Trigger& operator=(const StL0Trigger&); use default
68  ~StL0Trigger();
69 
70  unsigned int coarsePixelArraySize();
71  int coarsePixelArray(unsigned int);
72  int mwcCtbMultiplicity() const;
73  int mwcCtbDipole() const;
74  int mwcCtbTopology() const;
75  int mwcCtbMoment() const;
76  unsigned short dsmInput() const;
77  unsigned char detectorBusy() const;
78  unsigned short triggerToken() const;
79  unsigned short dsmAddress() const;
80  unsigned char addBits() const;
81  unsigned int lastDsmArraySize() const;
82  unsigned short lastDsmArray(unsigned int);
83  unsigned int bcDataArraySize() const;
84  unsigned short bcDataArray(unsigned int);
85 
86  unsigned int bunchCrossingId7bit(int) const;
87  unsigned int bunchCrossingId() const;
88 
89  int spinBits(int) const;
90  int spinBitYellowUp(int) const;
91  int spinBitYellowDown(int) const;
92  int spinBitBlueUp(int) const;
93  int spinBitBlueDown(int) const;
94 
95  void setMwcCtbMultiplicity(int);
96  void setMwcCtbDipole(int);
97  void setMwcCtbTopology(int);
98  void setMwcCtbMoment(int);
99  void setCoarsePixelArray(unsigned int, int);
100  void setDsmInput(unsigned short);
101  void setDetectorBusy(unsigned char);
102  void setTriggerToken(unsigned short);
103  void setDsmAddress(unsigned short);
104  void setAddBits(unsigned char);
105  void setLastDsmArray(unsigned int, unsigned short);
106  void setBcDataArray(unsigned int, unsigned short);
107 
108 protected:
109  enum {mMaxPixels = 32, mMaxLastDsm = 8, mMaxBcData = 16};
110 
111 private:
112  Int_t mCoarsePixelArray[mMaxPixels];
113  Int_t mMwcCtbMultiplicity;
114  Int_t mMwcCtbDipole;
115  Int_t mMwcCtbTopology;
116  Int_t mMwcCtbMoment;
117  UShort_t mDsmInput;
118  UChar_t mDetectorBusy;
119  UShort_t mTriggerToken;
120  UShort_t mDsmAddress;
121  UChar_t mAddBits;
122  UShort_t mLastDsmArray[mMaxLastDsm];
123  UShort_t mBcDataArray[mMaxBcData];
124 
125  ClassDef(StL0Trigger,2)
126 };
127 #endif