00001 #ifndef EEstarTrig_h
00002 #define EEstarTrig_h
00003
00004
00005
00006
00007
00008
00009 #include <TObject.h>
00010 #include <string.h>
00011 #define u_int unsigned int
00012 #define u_char unsigned char
00013 #define u_short unsigned short
00014
00015 class EEstarTrig : public TObject {
00016 private:
00017 public:
00018 u_int bX48hi, bX48lo, bX7bit;
00019
00020
00021 u_int daqbits ;
00022 u_short offline_id[32] ;
00023
00024
00025 u_char EEMC[144] ;
00026 u_short EEMC_l1[16] ;
00027
00028
00029 u_char BEMC[2][240] ;
00030 u_short BEMC_l1[48] ;
00031
00032
00033 u_char CTB[240] ;
00034 u_short lastDSM[8];
00035 u_short npre,npost;
00036 u_short VTX[8];
00037 u_short EMC[8];
00038
00039 u_char spinBits() const { return (lastDSM[7]>>4) & 0xff; }
00040 u_short bbcTimeDiff() const { return VTX[3] & 0x1ff; }
00041 int isTrigID(int id);
00042 int get48bXing() const;
00043 EEstarTrig();
00044 virtual ~EEstarTrig();
00045 void print(int k=0, FILE *fd=stdout) const;
00046 void clear();
00047 ClassDef(EEstarTrig,3)
00048
00049 };
00050 #endif
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 #if 0 // probably all is wrong, JB
00089 u_char bitYellFill() const { return ( spinBits()>>0) & 0x1; }
00090 u_char bitYellUp() const { return ( spinBits()>>1) & 0x1; }
00091 u_char bitYellDown() const { return ( spinBits()>>2) & 0x1; }
00092 u_char bitYellUnpol() const { return ( spinBits()>>3) & 0x1; }
00093 u_char bitBlueFill() const { return ( spinBits()>>4) & 0x1; }
00094 u_char bitBlueUp() const { return ( spinBits()>>5) & 0x1; }
00095 u_char bitBlueDown() const { return ( spinBits()>>6) & 0x1; }
00096 u_char bitBlueUnpol() const { return ( spinBits()>>7) & 0x1;}
00097 #endif