00001 #ifndef _EMC_READER_H_
00002 #define _EMC_READER_H_
00003
00004 #include <sys/types.h>
00005 #include "daqFormats.h"
00006
00007
00008 #define BTOW_MAXFEE 30
00009 #define BTOW_PRESIZE 4
00010 #define BTOW_DATSIZE 160
00011
00012
00013 #define ETOW_MAXFEE 6
00014 #define ETOW_PRESIZE 4
00015 #define ETOW_DATSIZE 160
00016 #define ESMD_MAXFEE 48 // used to be 30
00017 #define ESMD_PRESIZE 4
00018 #define ESMD_DATSIZE 192
00019
00020 struct emc_t {
00021 emc_t();
00022 void reset();
00023 int check();
00024
00025 int fenceA;
00026 u_char btow_in ;
00027 u_short btow_max_ch ;
00028 u_short btow_ch ;
00029 u_short btow[4800] ; int fenceB;
00030 u_short *btow_raw ;
00031
00032 u_short btow_new[BTOW_MAXFEE][BTOW_DATSIZE] ;
00033 u_short btow_pre[BTOW_MAXFEE][BTOW_PRESIZE] ;
00034
00035 u_char bsmd_in ;
00036 u_short bsmd_max_ch ;
00037 u_short bsmd_ch ;
00038 u_short bsmd[EMC_FIBER_NUM][4800] ;int fenceC;
00039 u_char bsmd_cap[EMC_FIBER_NUM] ;int fenceD;
00040
00041 #if 0
00042
00043 u_char bpre_in ;
00044 u_short bpre_max_ch ;
00045 u_short bpre_ch ;
00046 u_short bpre[4800] ;
00047 #endif
00048
00049
00050 u_char etow_in ;
00051 u_short etow_max_ch ;
00052
00053 u_short etow_ch ;
00054 u_short etow[ETOW_MAXFEE][ETOW_DATSIZE] ; int fenceE;
00055 u_short etow_pre[ETOW_MAXFEE][ETOW_PRESIZE]; int fenceF;
00056 u_short *etow_raw ;
00057
00058
00059
00060
00061 u_char esmd_in ;
00062 u_short esmd_max_ch ;
00063 u_short esmd_ch ;
00064 u_short esmd_max_fee ;
00065 u_short esmd [ESMD_MAXFEE][ESMD_DATSIZE]; int fenceG;
00066 u_short esmd_pre[ESMD_MAXFEE][ESMD_PRESIZE]; int fenceH;
00067 u_short *esmd_raw ;
00068 int fenceZ;
00069
00070
00071 } ;
00072
00073 namespace OLDEVP {
00074 extern struct emc_t emc ;
00075
00076 extern int emcReader(char *mem) ;
00077 }
00078
00079 #endif