10 #include <arpa/inet.h>
31 #include <DAQ_ITPC/itpcPed.h>
48 int do_ch(
int fee_id,
int fee_ch, u_int *
data,
int words) ;
49 int do_ch_sim(
int row,
int pad, u_short *tb_buff, u_short *track_id) ;
51 int do_fcf(
void *storage,
int bytes) ;
54 int init(
int sector,
const char *fname=0) ;
57 static int get_bad(
int sec1,
int row1,
int pad1) ;
58 static float get_gain(
int sec1,
int row1,
int pad1) ;
59 static void set_gain(
int sec1,
int row1,
int pad1,
float gain) ;
61 static float get_t0(
int sec1,
int row1,
int pad1) ;
63 static u_char get_flags(
int sec1,
int row1,
int pad1) ;
64 static void set_flags(
int sec1,
int row1,
int pad1, u_char flags) ;
66 void zap_fee(
int sec1,
int rdo1,
int port1) ;
68 static int fcf_decode(
unsigned int *p_buff,
daq_cld *dc,
unsigned int version) ;
69 static int fcf_decode(
unsigned int *p_buff,
daq_sim_cld_x *dc,
unsigned int version) ;
76 int words_per_cluster ;
101 int pad_to_x(
int pad,
int y) ;
103 int x_max(
int slice,
int y) ;
106 static const int MAX_SEC = 24 ;
112 static const int MAX_TB_EVER = 512 ;
113 static const int MAX_BLOB = 16*1024 ;
114 static const int MAX_PEAKS = 1000 ;
115 static const int MAX_BLOB_SIZE = 64*1024 ;
118 static const int MAX_PHYS_ROW = 45 ;
119 static const int MAX_PHYS_PAD = 182 ;
126 int x_min(
int slice,
int y) ;
142 static gain_rp_t *sec_gains[MAX_SEC+1] ;
144 gain_rp_t *get_gain(
int phys_row,
int phys_pad) ;
150 u_short tb_buff[MAX_TB_EVER] ;
159 u_short *row_pad_store ;
161 inline struct rp_t *get_row_pad(
int row,
int pad) ;
164 u_short blob_ix[MAX_BLOB] ;
188 short smooth_dta[MAX_BLOB_SIZE] ;
195 } peaks[MAX_PEAKS+1] ;
208 int do_blobs_stage1(
int row) ;
209 int do_blobs_stage2(
int row) ;
210 int do_blobs_stage3(
int row) ;
213 int do_row_check(
int row) ;