00001 #ifndef _DAQ_FGT_H_
00002 #define _DAQ_FGT_H_
00003
00004
00005 #include <DAQ_READER/daq_det.h>
00006
00007
00008 #define FGT_RDO_COU 2
00009 #define FGT_ARM_COU 6
00010 #define FGT_APV_COU 24
00011 #define FGT_CH_COU 128
00012
00013 #define FGT_TB_COU 10 //???
00014
00015
00016
00017
00018 #define FGT_DISK_COU 6 // 0..5
00019 #define FGT_QUADRANT_COU 4 // A-D
00020 #define FGT_STRIP_TYPE_COU 2 // 2 types: see below
00021 #define FGT_STRIP_TYPE_R 0
00022 #define FGT_STRIP_TYPE_PHI 1
00023
00024 #define FGT_STRIP_R_COU 326
00025 #define FGT_STRIP_PHI_COU 1138
00026
00027
00028
00029
00030 struct fgt_adc_t {
00031 unsigned short ch ;
00032 unsigned char tb ;
00033 unsigned short adc ;
00034 } ;
00035
00036
00037 struct fgt_pedrms_t {
00038 unsigned short ch ;
00039 unsigned char tb ;
00040 float ped ;
00041 float rms ;
00042 } ;
00043
00044 class daq_fgt : public daq_det {
00045 private:
00046 class daq_dta *handle_raw(int rdo) ;
00047
00048 class daq_dta *handle_phys(int disk, int quadrant, int strip_type) ;
00049 class daq_dta *handle_ped(int rdo) ;
00050
00051 class daq_dta *raw ;
00052 class daq_dta *adc ;
00053 class daq_dta *phys ;
00054 class daq_dta *ped ;
00055
00056 static const char *help_string ;
00057
00058 protected:
00059
00060
00061 public:
00062 daq_fgt(daqReader *rts_caller=0) ;
00063 ~daq_fgt() ;
00064
00065
00066 daq_dta *get(const char *bank="*",int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
00067
00068 int get_l2(char *buff, int buff_bytes, struct daq_trg_word *trg, int prompt) ;
00069
00070 const char *GetCVS() const {
00071 static const char cvs[]="Tag $Name: $Id: built "__DATE__" "__TIME__ ; return cvs;
00072 }
00073
00074
00075 class daq_dta *handle_adc(int rdo, char *rdobuff = 0 ) ;
00076
00077 #if 0
00078 struct fgt_adc_to_phys_t {
00079 char disk ;
00080 unsigned char quadrant ;
00081 unsigned char type ;
00082 unsigned short strip ;
00083 } adc_to_phys[FGT_RDO_COU][FGT_ARM_COU][FGT_APV_COU][FGT_CH_COU] ;
00084
00085
00086 struct fgt_phys_to_adc_t {
00087 char rdo ;
00088 unsigned char arm ;
00089 unsigned char apv ;
00090 unsigned char ch ;
00091 } phys_to_adc[FGT_DISK_COU][FGT_QUADRANT_COU][FGT_STRIP_TYPE_COU][FGT_STRIP_PHI_COU] ;
00092 #endif
00093
00094 u_int rdo_warns[3] ;
00095 u_char rdo_id[3] ;
00096 u_int t_data ;
00097 } ;
00098
00099
00100 #endif // _DAQ_FGT_H_