10 #include <sys/types.h>
20 #define FCF_DOUBLE_PAD 2
21 #define FCF_DOUBLE_T 4
23 #define FCF_ROW_EDGE 16 // touched end of row
24 #define FCF_BROKEN_EDGE 32 // touches one of the mezzanine edges
25 #define FCF_DEAD_EDGE 64 // touches a dead pad
26 #define FCF_IGNORE 128
29 #define FCF_PARAM1 2 // was 2
30 #define FCF_MIN_ADC_T 3 // was 3
31 #define FCF_MIN_ADC_PAD 12 // was 12
34 #define FCF_GAIN_SHIFT 6 // shift left/righ
35 #define FCF_GAIN_FACTOR (1<<FCF_GAIN_SHIFT) // 64!!!
38 #define FCF_WORDS_PER_CLUSTER 2
41 #if defined(__unix) || defined(__ROOT__) || defined(__CINT__)
43 typedef unsigned int u_int;
44 typedef unsigned short u_short;
45 typedef unsigned char u_char;
51 #ifdef FCF_ANNOTATE_CLUSTERS
52 #undef FCF_ANNOTATE_CLUSTERS
55 #ifdef FCF_DEBUG_OUTPUT
56 #undef FCF_DEBUG_OUTPUT
84 #ifdef FCF_ANNOTATE_CLUSTERS
104 fcfClass(
int det, u_short *table = NULL) ;
151 u_short *startFlags ;
160 int finder(u_char *adcin, u_short *cppin, u_int *outres) ;
163 inline int saveRes(
struct fcfResx *res_p[],
int cou, u_int *output) ;
164 void set8to10(u_short *extTable) ;
170 int noADCconversion ;
173 u_short adc8to10_storage[256] ;
175 u_int chargeMinCorrect ;
186 u_short p1,p2,t1,t2 ;
194 enum {kMax_fcfHit = 200};
199 int burn(u_int *ptr_res[3], u_int *ptr_simu_res[3] = NULL) ;
201 int compare(u_int *p1[3], u_int *p2[3]) ;
203 void decode(u_int *
data,
fcfHit *h, u_int *sim = 0) ;
204 void print_hit(
const char *,
fcfHit *
hit) ;
211 void setVerbose(
bool v) { verbose = v; };
215 u_int last_n, last_i, last_count, last_stage ;
220 struct fcfHit broken[4][kMax_fcfHit] ;
221 u_int cou_broken[4] ;