9 #define TPX_CLOCK_TCU_LOC 9215889 // exactly
10 #define TPX_CLOCK_TCU_RHIC 9381000 // typical value
11 #define TPX_CLOCK_TCD_OLD 9434800 // exactly; with the old, pre FY11, TCD
12 #define TPX_CLOCK_TCD 9370000 // exactly
13 #define TPX_CLOCK_NEW_TCD 9383000 // exactly
16 #define TPX_TCU_LOC_PED_STOP 96
17 #define TPX_TCU_LOC_START 97
18 #define TPX_TCU_LOC_STOP 101
19 #define TPX_TCU_LOC_TIME_0 98.668442 // measured with run 10346005
23 #define TPX_TCU_RHIC_PED_STOP 97
24 #define TPX_TCU_RHIC_START 98
25 #define TPX_TCU_RHIC_STOP 102
26 #define TPX_TCU_RHIC_TIME_0 99.0 // some number....
60 #define TPX_TCD_PED_STOP 174
61 #define TPX_TCD_START 179
62 #define TPX_TCD_STOP 181
63 #define TPX_TCD_TIME_0 179.679
66 #define TPX_NEW_TCD_PED_STOP 175
67 #define TPX_NEW_TCD_START 178
68 #define TPX_NEW_TCD_STOP 182
69 #define TPX_NEW_TCD_TIME_0 178.679
78 #define TPX_TCD_OLD_START 100
79 #define TPX_TCD_OLD_STOP 103
80 #define TPX_TCD_OLD_TIME_0 100.84 // or perhaps 100.90?
91 #define TPX_PULSER_PED_START 166
92 #define TPX_PULSER_PED_STOP 182
111 void set_row_max(
int max) {
116 void add_sector(
int sec1) {
130 for(
int s=min_s;s<=max_s;s++) {
140 void set_gains(
int s,
int r,
int p,
float g,
float t0) {
141 struct gains *gs = get_gains(s,r,p) ;
147 struct gains *get_gains(
int s,
int r,
int p) {
152 return (gains[s-1] + r*TPX_MAX_PAD + (p-1)) ;
155 int from_file(
const char *fname,
int sector = 0) ;
159 u_int bad_fee[25][7][37] ;
162 u_int bad_rdo_mask[25] ;
166 char *raw_gains_fname ;
176 u_int adc_store[20] ;
180 struct aux *get_aux(
int s,
int r,
int p) {
181 return (
aux + (s-1)*46*TPX_MAX_PAD + r*TPX_MAX_PAD + (p-1)) ;
192 struct means *get_means(
int s,
int r) {
193 return (
means + (s-1)*46 + r) ;
199 int ch_count[256][16] ;
202 struct fee_found_t *get_fee_found(
int s,
int rdo) {
203 return (fee_found + (s-1)*7 + rdo) ;
209 int to_file(
const char *fname) ;
211 void init(
int sec=0) ;
212 void accum(
char *evbuff,
int bytes) ;
217 void compare(
char *fname,
int mysec=0) ;
218 int summarize(
char *fname, FILE *log_file=0,
int gain_mode=0) ;
227 int pulser_ped_stop ;
230 double pulser_time_0 ;
232 void set_clock_mode(
int mode) ;
235 void do_default(
int sector) ;
239 int tpx_pulser_peak[25][46] ;
243 int tb_start, tb_stop ;
247 struct gains dummy_gain ;