7 #define TPX_GAIN_MASTER_FILE "/RTS/conf/tpx/tpx_gains.txt" // global -- read only AFAIK this code is concerned!
8 #define TPX_CONFIG_FILE "/RTS/conf/tpx/tpx_config_%03d"
9 #define TPX_REMAP_FILE "/RTS/conf/tpx/tpx_remap.txt"
11 #define TPX_ALTRO_DO_CHECK (1<<0) // check altro data
12 #define TPX_ALTRO_DO_ADC (1<<1) // dump the ADCs into the altro_struct
13 #define TPX_ALTRO_DO_FCF (1<<2) // run the CLUSTERfinder as well...
15 #define TPX_MAX_PAD 182
26 #define TPX_MAX_TB 420
27 #define TPX_DEF_TB 400
32 #include <TPX/tpx_rdo.h>
35 u_char tpc_fee_padplane ;
40 u_char altro_id_padplane ;
104 inline int tpx36_from_real(
int s36,
int s_real,
int r_real)
108 if(s36 <= 24)
return r_real ;
110 if((s_real % 2)==0) {
111 r0_logical = (r_real-4)+2 ;
114 r0_logical = (r_real - 4) ;
117 if((r0_logical < 1) || (r0_logical > 4)) {
118 LOG(ERR,
"Mismap: s36 %d, Shw %02d:%d = %d",s36,s_real,r_real,r0_logical) ;
126 inline void tpx36_to_real(
int s36,
int r1,
int &s_real,
int &r_real)
128 s_real = r_real = 1 ;
143 s_real = (s36-24)*2 - 1 ;
147 s_real = (s36-24)*2 - 1 ;
151 s_real = (s36-24)*2 ;
155 s_real = (s36-24)*2 ;
158 LOG(ERR,
"Mismap: S%02d:%d",s36,r1) ;
171 extern int tpx_get_start(
char *buff, u_int words,
struct tpx_rdo_event *rdo,
int do_log) ;
172 extern u_int *tpx_scan_to_next(u_int *now, u_int *data_start,
struct tpx_altro_struct *a) ;
174 extern void tpx_from_altro(
int rdo,
int a,
int ch,
int &row,
int &pad) ;
175 extern void tpx_to_altro(
int row,
int pad,
int &rdo,
int &a,
int &ch) ;
176 extern int tpx_altro_to_fee(
int rdo,
int a) ;
177 extern u_char tpx_rdo_fees(
int rdo,
int cou) ;
180 extern void tpx_analyze_log(
int sector,
int rdo,
char *buff) ;
181 extern int tpx_analyze_msc(
int sector,
int rdo,
char *buff,
int *altro_list=0) ;
182 extern int tpx_show_status(
int sector,
int rb_mask,
int *altro_list=0) ;
186 extern int tpx_fee_check ;
189 extern int tpx_odd_fee_count ;
191 extern int *tpx_altro_to_row_override ;
192 extern int tpx_fy16_map ;
193 extern int tpx_is_stgc ;
194 extern int tpx_rdo_override ;