00001 #ifndef _DAQ_TRG_H_
00002 #define _DAQ_TRG_H_
00003
00004 #include <stdio.h>
00005 #include <DAQ_READER/daq_det.h>
00006
00007
00008
00009 struct trg_t {
00010 int mode ;
00011 u_int max_channels ;
00012 u_int channels ;
00013
00014 u_short tcubits ;
00015 u_short detlive ;
00016 u_int daqbits ;
00017 u_char *trgc ;
00018
00019 u_int offline_id[32] ;
00020
00021 void *trg_sum ;
00022 void *trgd ;
00023
00024 u_int xing_hi, xing_lo ;
00025 u_short npre, npost ;
00026 u_short phys_word, trg_word ;
00027
00028
00029 u_char CTB[240] ;
00030
00031 u_char MWC[96] ;
00032
00033 u_char MTD[32];
00034 u_char VPD[64];
00035 u_char P2P[32];
00036 u_char TOF[16];
00037
00038 u_char BEMC[2][240] ;
00039 u_short BEMC_l1[48] ;
00040
00041 u_char EEMC[144] ;
00042 u_short EEMC_l1[16] ;
00043
00044 u_char FPD[2][2][112] ;
00045 u_char FPD_l1[2][2][8] ;
00046
00047 u_char FPDW[256];
00048
00049 u_char BBC[96] ;
00050 u_short BBC_l1[16] ;
00051
00052 u_char ZDC[16] ;
00053 u_short ZDC_l1[8] ;
00054 u_char ZDCSMD[32] ;
00055
00056 u_short QQTdataBytes;
00057 u_int QQTdata[1600];
00058 } ;
00059
00060
00061
00062 class daq_trg : public daq_det {
00063 private:
00064 class daq_dta *handle_legacy() ;
00065 class daq_dta *handle_raw() ;
00066
00067 class daq_dta *legacy ;
00068 class daq_dta *raw ;
00069
00070 static const char *help_string ;
00071 protected:
00072
00073
00074 public:
00075 daq_trg(daqReader *rts_caller=0) ;
00076 ~daq_trg() ;
00077
00078
00079 daq_dta *get(const char *bank="*",int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
00080
00081 void help() const {
00082 printf("%s\n%s\n",GetCVS(),help_string) ;
00083 }
00084
00085 const char *GetCVS() const {
00086 static const char cvs[]="Tag $Name: $Id: built "__DATE__" "__TIME__ ; return cvs;
00087 }
00088
00089 } ;
00090
00091
00092 #endif // _DAQ_TRG_H_