/* * daq.h * Creation date : Nov 14 2000 * Author : Y.Nakaune */ #ifndef __DAQ_H #define __DAQ_H #include #include #include "setup.h" #define DOT_RAW ".raw" #define DOT_DAT ".dat" #define TGC_CFG_FILE "tgc.cfg" #define TMC_FLG 0xaaaaaaaa #define TMC_END_FLG 0xa0a0a0a0 #define ADC_FLG 0xbbbbbbbb #define ADC_END_FLG 0xb0b0b0b0 #define SCALER_FLG 0x88888888 #define SCALER_END_FLG 0x80808080 #define FILE_FLG 0xcccccccc #define FILE_END_FLG 0xc0c0c0c0 #define TIME_FLG 0xdddddddd #define TIME_END_FLG 0xd0d0d0d0 #define TGC_FLG 0xeeeeeeee #define TGC_END_FLG 0xe0e0e0e0 #define CFG_FLG 0x66666666 #define CFG_END_FLG 0x60606060 #define START_FLG 0x77777777 #define END_FLG 0x70707070 #define EVT_FLG 0x55555555 #define EVT_END_FLG 0x50505050 #define CMT_FLG 0x44444444 #define CMT_END_FLG 0x40404040 #define RUNbegin_FLG 0x33333333 #define RUNbegin_END_FLG 0x30303030 #define RUNend_FLG 0x22222222 #define RUNend_END_FLG 0x20202020 #define RUNerror_FLG 0xffffffff #define ERR_FLG 0x10101010 // for receiving Config data for TGC typedef struct { int pre_doublet_x; int pre_doublet_y; int pre_doublet_z; int pre_triplet_x; int pre_triplet_y; int pre_triplet_z; float HV[5]; int Pressure[5]; int doublet_x; int doublet_y; int doublet_z; int triplet_x; int triplet_y; int triplet_z; } TGC_Cfg; TGC_Cfg tgc_cfg; // for receiving Config data for ADC, TMC typedef struct { int sci_nb[ ADC_MOD ][ ADC_CH ]; int tgc_lay[ ADC_MOD ][ ADC_CH ]; int tgc_ws[ ADC_MOD ][ ADC_CH ]; int tgc_ch[ ADC_MOD ][ ADC_CH ]; } Cfg_adc; typedef struct { int sci_nb[ TMC_MOD ][ TMC_CH ]; int dc_nb[ TMC_MOD ][ TMC_CH ]; int dc_xy[ TMC_MOD ][ TMC_CH ]; int tgc_lay[ TMC_MOD ][ TMC_CH ]; int tgc_ws[ TMC_MOD ][ TMC_CH ]; int tgc_ch[ TMC_MOD ][ TMC_CH ]; } Cfg_tmc; // for receiving ADC module format typedef struct { unsigned short am[ ADC_MOD ][ ADC_CH ]; } Daq_adc; // for receiving TDC module format typedef struct { short tm[ TMC_MOD ][ TMC_CH ]; } Daq_tmc; // for receiving ADC mod(N) & ch(A) unsigned short array_naf[100]; int number_naf_entry; // for local libraray // libetc.c void exit_err( char* ); unsigned int read_flag( FILE* ); void terminate( int ); // cfg_rd.c int read_cfg( Cfg_adc*, Cfg_tmc*, FILE* ); /*---------------------------------------- // daq_rd.c int read_adc( Recnst*, Cfg_adc*, FILE* ); int read_tmc( Recnst*, Cfg_tmc*, FILE* ); ------------------------------------------*/ int signal_term_flag; #endif /* End of File */