Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
56 | f9daq | 1 | /*CMZ : 23/02/2008 09.20.45 by Samo Korpar*/ |
2 | /*CMZ : 0.02/00 04/07/2001 00.52.00 by Samo Korpar*/ |
||
3 | /*CMZ : 0.01/00 29/11/99 13.07.26 by Samo Korpar*/ |
||
4 | /*CMZ : 0.00/00 08/10/99 13.05.24 by Samo Korpar*/ |
||
5 | /*-- Author :*/ |
||
6 | #include <stdlib.h> |
||
7 | #include <stdio.h> |
||
8 | #include <stdint.h> |
||
9 | #include <string.h> |
||
10 | #include <time.h> |
||
11 | #include <tcl.h> |
||
12 | #include <tk.h> |
||
13 | |||
14 | extern int hvslow(char *sn); |
||
15 | extern int hvslowChannel(char *sn); |
||
16 | |||
17 | /*KEEP,evdp,T=C++.*/ |
||
18 | #include "evdp.h" |
||
19 | /*KEEP,evd,T=C++.*/ |
||
20 | #include "evd.h" |
||
21 | /*KEND.*/ |
||
22 | #include <blt.h> |
||
23 | |||
24 | #define CMDLEN 300 |
||
25 | |||
26 | /* parameters for the detector display */ |
||
27 | |||
28 | #define FPXOFF 4 |
||
29 | #define FPYOFF 17 |
||
30 | #define SMXOFF 49 |
||
31 | #define SMYOFF 138 |
||
32 | #define BBXS 8 |
||
33 | #define BBYS 8 |
||
34 | #define SMXS 48 |
||
35 | #define SMYS 128 |
||
36 | |||
37 | static int curev; |
||
38 | static char hotchannels[MAXFED][128]; |
||
39 | static int m4x[16],m4y[16],m4c[4][4]; |
||
40 | static int m16x[4][16],m16y[4][16],m16a[8][8],m16c[8][8]; |
||
41 | static int m4pm[16],m4pc[16],m16pm[4][16],m16pc[4][16]; |
||
42 | static FPL_data fplch[14][6][16]; |
||
43 | static FED_data fedch[MAXFED][64]; |
||
44 | static FED_record fedr[MAXFED]; |
||
45 | static FED_hist hits; |
||
46 | |||
47 | |||
48 | |||
49 | #ifdef __cplusplus |
||
50 | extern "C" { |
||
51 | #endif |
||
52 | |||
53 | void mask_hot(int fed, char *data) |
||
54 | { |
||
55 | int i; |
||
56 | |||
57 | for (i=0;i<128;i++) |
||
58 | *(data++)&=hotchannels[fed][i]; |
||
59 | return; |
||
60 | } |
||
61 | |||
62 | int find_hot() |
||
63 | { |
||
64 | int i, j, k, ii, jj, nr, pos, nh, nhot; |
||
65 | int sm, pr=0, pc=0, ch=0; |
||
66 | unsigned int nev; |
||
67 | unsigned char b, *hch; |
||
68 | FILE *fhot; |
||
69 | |||
70 | hch=(unsigned char *) hotchannels; |
||
71 | for (i=0;i<128*MAXFED;i++) *(hch++)=0xFF; |
||
72 | |||
73 | for (k=0;k<MAXFED;k++) |
||
74 | for (i=0;i<64;i++) |
||
75 | for (j=0;j<16;j++) |
||
76 | hits.data[k][i][j]=0; |
||
77 | |||
78 | if (reopen_data_file()) exit(1); |
||
79 | |||
80 | nev=0; |
||
81 | |||
82 | while ((nr=get_nextev(fedr, 0x500, 0)) && (nev<1000)) |
||
83 | { |
||
84 | nh=0; |
||
85 | for (k=0;k<nr;k++) |
||
86 | for (ii=0;ii<128;ii++) |
||
87 | { |
||
88 | i=ii/2; |
||
89 | if (fedr[k].data[ii] && fedch[fedr[k].fedid][i].pmt) |
||
90 | for (jj=0,j=8*(ii%2),b=1;jj<8;jj++,j++,b<<=1) |
||
91 | if (fedr[k].data[ii]&b) nh++; |
||
92 | } |
||
93 | if (nh > 1000) continue; |
||
94 | for (k=0;k<nr;k++) |
||
95 | for (ii=0;ii<128;ii++) |
||
96 | { |
||
97 | i=ii/2; |
||
98 | if (fedr[k].data[ii] && fedch[fedr[k].fedid][i].pmt) |
||
99 | for (jj=0,j=8*(ii%2),b=1;jj<8;jj++,j++,b<<=1) |
||
100 | if (fedr[k].data[ii]&b) hits.data[fedr[k].fedid][i][j]++; |
||
101 | } |
||
102 | nev++; |
||
103 | } |
||
104 | if ((nev/=10) < 5) return 1; |
||
105 | fhot=fopen("hotchannels","w"); |
||
106 | nhot=0; |
||
107 | for (k=0;k<MAXFED;k++) |
||
108 | for (ii=0;ii<128;ii++) |
||
109 | { |
||
110 | i=ii/2; |
||
111 | for (jj=0,j=8*(ii%2),b=1;jj<8;jj++,j++,b<<=1) |
||
112 | if (hits.data[k][i][j] > nev) |
||
113 | { |
||
114 | nhot++; |
||
115 | sm=fedch[k][i].sm; |
||
116 | switch (fedch[k][i].pmt) |
||
117 | { |
||
118 | case 4: |
||
119 | pr=2*fedch[k][i].bbr+m4pm[j]/2; |
||
120 | pc=2*fedch[k][i].bbc+m4pm[j]%2; |
||
121 | ch=m4pc[j]; |
||
122 | break; |
||
123 | case 16: |
||
124 | pr=2*fedch[k][i].bbr+m16pm[fedch[k][i].asd][j]/2; |
||
125 | pc=2*fedch[k][i].bbc+m16pm[fedch[k][i].asd][j]%2; |
||
126 | ch=m16pc[fedch[k][i].asd][j]; |
||
127 | break; |
||
128 | } |
||
129 | if (sm>6) |
||
130 | { |
||
131 | sm=20-sm; |
||
132 | pr=31-pr; |
||
133 | pc=11-pc; |
||
134 | } |
||
135 | fprintf(fhot, "%d%.2d%.2d%.2d 1\n", sm, pr, pc, ch); |
||
136 | hotchannels[k][ii]&=(~b); |
||
137 | } |
||
138 | } |
||
139 | fclose(fhot); |
||
140 | fhot=fopen("hotchannels.raw","w"); |
||
141 | fwrite ((void *) hotchannels, 1, MAXFED*128, fhot); |
||
142 | fclose(fhot); |
||
143 | printf("%d hot channels found\n", nhot); |
||
144 | if (reclose_data_file()) exit(1); |
||
145 | return 0; |
||
146 | } |
||
147 | int Evd_evinit( ClientData clientData, Tcl_Interp *interp, |
||
148 | int argc, CONST char *argv[]) |
||
149 | { |
||
150 | int pmt, asd, sm, bbr, bbc, mb, db, con, x0, y0, fx0, fy0, pmc; |
||
151 | int status, i, j, k, ii, jj, ccon, fpon, casd, px, py; |
||
152 | float sc; |
||
153 | char cmd[CMDLEN], s1[10]; |
||
154 | FILE *fid; |
||
155 | |||
156 | sscanf(argv[3]," %f ", &sc); |
||
157 | sscanf(Tcl_GetVar(interp, "evmap", TCL_GLOBAL_ONLY), " %d ", &fpon); |
||
158 | |||
159 | sprintf(cmd, "%s/m4wiremap.dat", |
||
160 | Tcl_GetVar(interp, "config_dir", TCL_GLOBAL_ONLY)); |
||
161 | |||
162 | if ((fid=fopen(cmd, "r")) == NULL) { |
||
163 | fprintf(stderr,"%s %d: File not found %s\n",__FILE__, __LINE__, cmd); |
||
164 | return TCL_ERROR; |
||
165 | |||
166 | } |
||
167 | while ( fgets( cmd, 100, fid) != NULL) |
||
168 | if ((status=sscanf( cmd," %d %d %d ",&pmt,&pmc,&con))==3) |
||
169 | { |
||
170 | /* printf("con=%d pmt=%d pmc=%d\n",con,pmt,pmc); */ |
||
171 | m4pm[con]=pmt; |
||
172 | m4pc[con]=pmc; |
||
173 | if (fpon) |
||
174 | { |
||
175 | px=2*(pmt%2)+1-(pmc%2); |
||
176 | py=3-(2*(pmt/2)+1-(pmc/2)); |
||
177 | } |
||
178 | else |
||
179 | { |
||
180 | px=2*(pmt%2)+(pmc%2); |
||
181 | py=3-(2*(pmt/2)+(pmc/2)); |
||
182 | } |
||
183 | m4c[px][py]=con; |
||
184 | /* printf("px=%d py=%d con=%d \n", px, py, con); fflush(stdout); */ |
||
185 | m4x[con]=2*px; |
||
186 | m4y[con]=2*py; |
||
187 | } |
||
188 | fclose(fid); |
||
189 | |||
190 | sprintf(cmd, "%s/m16wiremap.dat", |
||
191 | Tcl_GetVar(interp, "config_dir", TCL_GLOBAL_ONLY)); |
||
192 | if ((fid=fopen(cmd, "r")) == NULL) return TCL_ERROR; |
||
193 | while ( fgets( cmd, 100, fid) != NULL) |
||
194 | if ((status=sscanf(cmd," %d %d ASD%d %d ",&pmt,&pmc,&asd,&con))==4) |
||
195 | { |
||
196 | /* printf("asd=%d con=%d pmt=%d bbc=%d\n",asd,con,pmt,pmc); */ |
||
197 | m16pm[asd][con]=pmt; |
||
198 | m16pc[asd][con]=pmc; |
||
199 | if (fpon) |
||
200 | { |
||
201 | px=4*(pmt%2)+3-(pmc%4); |
||
202 | py=7-(4*(pmt/2)+3-(pmc/4)); |
||
203 | } |
||
204 | else |
||
205 | { |
||
206 | px=4*(pmt%2)+(pmc%4); |
||
207 | py=7-(4*(pmt/2)+(pmc/4)); |
||
208 | } |
||
209 | m16a[px][py]=asd; |
||
210 | m16c[px][py]=con; |
||
211 | m16x[asd][con]=px; |
||
212 | m16y[asd][con]=py; |
||
213 | } |
||
214 | fclose(fid); |
||
215 | |||
216 | for (i=0;i<MAXFED;i++) |
||
217 | for (j=0;j<64;j++) |
||
218 | { |
||
219 | fedch[i][j].pmt=0; |
||
220 | fedch[i][j].fx0=3+140*(i%2)+(j/16)*34; |
||
221 | fedch[i][j].fy0=5+(i/2)*52+(j%16)*3; |
||
222 | } |
||
223 | for (i=0;i<14;i++) |
||
224 | for (j=0;j<6;j++) |
||
225 | for (k=0;k<16;k++) |
||
226 | { |
||
227 | fplch[i][j][k].pmt=0; |
||
228 | fplch[i][j][k].mb[0]=-1; |
||
229 | fplch[i][j][k].mb[1]=-1; |
||
230 | fplch[i][j][k].mb[2]=-1; |
||
231 | fplch[i][j][k].mb[3]=-1; |
||
232 | fplch[i][j][k].sn[0][0][0]=0; |
||
233 | fplch[i][j][k].sn[0][1][0]=0; |
||
234 | fplch[i][j][k].sn[1][0][0]=0; |
||
235 | fplch[i][j][k].sn[1][1][0]=0; |
||
236 | } |
||
237 | |||
238 | for (i=0;i<14;i++) |
||
239 | { |
||
240 | x0=FPXOFF+SMXOFF*(i%7); |
||
241 | y0=FPYOFF+SMYOFF*(i/7); |
||
242 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
243 | "-fill #AABBCC -outline \"\" -tags \"sm\"", |
||
244 | argv[1], sc*x0, sc*y0, sc*(x0+SMXS), sc*(y0+SMYS)); |
||
245 | Tcl_Eval(interp, cmd); |
||
246 | } |
||
247 | |||
248 | sprintf(cmd, "%s/ASD.dat", |
||
249 | Tcl_GetVar(interp, "config_dir", TCL_GLOBAL_ONLY)); |
||
250 | if ((fid=fopen(cmd, "r")) == NULL) return TCL_ERROR; |
||
251 | while ( fgets( cmd, 100, fid) != NULL) |
||
252 | if ((status=sscanf( cmd," M%d ASD%d %d %d %d %d %d %d ", |
||
253 | &pmt,&asd,&sm,&bbr,&bbc,&mb,&db,&con))==8) |
||
254 | { |
||
255 | if (sm>6) |
||
256 | { |
||
257 | sm=20-sm; |
||
258 | bbr=15-bbr; |
||
259 | bbc=5-bbc; |
||
260 | } |
||
261 | ccon=db*16+con; |
||
262 | x0=FPXOFF+SMXOFF*(sm%7)+BBXS*bbc; |
||
263 | y0=FPYOFF+SMYS+SMYOFF*(sm/7)-BBYS*(bbr+1); |
||
264 | |||
265 | fx0=fedch[mb][ccon].fx0; |
||
266 | fy0=fedch[mb][ccon].fy0; |
||
267 | |||
268 | if (fedch[mb][ccon].pmt) |
||
269 | { |
||
270 | printf("evinit: channel already mapped\n"); |
||
271 | printf(">>\n"); |
||
272 | } |
||
273 | else if (fplch[sm][bbc][bbr].mb[asd] != -1) |
||
274 | { |
||
275 | printf("evinit: area already mapped\n"); |
||
276 | printf(">>\n"); |
||
277 | } |
||
278 | else |
||
279 | { |
||
280 | fedch[mb][ccon].pmt=pmt; |
||
281 | fedch[mb][ccon].asd=asd; |
||
282 | fedch[mb][ccon].sm=sm; |
||
283 | fedch[mb][ccon].bbr=bbr; |
||
284 | fedch[mb][ccon].bbc=bbc; |
||
285 | fedch[mb][ccon].x0=x0; |
||
286 | fedch[mb][ccon].y0=y0; |
||
287 | fplch[sm][bbc][bbr].pmt=pmt; |
||
288 | fplch[sm][bbc][bbr].mb[asd]=mb; |
||
289 | fplch[sm][bbc][bbr].wi[asd]=ccon; |
||
290 | if (!asd) |
||
291 | { |
||
292 | fplch[sm][bbc][bbr].x0=x0; |
||
293 | fplch[sm][bbc][bbr].y0=y0; |
||
294 | } |
||
295 | /* |
||
296 | fplch[sm][bbc][bbr].x0=fx0; |
||
297 | fplch[sm][bbc][bbr].y0=fy0; |
||
298 | */ |
||
299 | /* printf("mb=%d con=%d pmt=%d\n",mb,con,pmt); */ |
||
300 | } |
||
301 | switch (pmt) |
||
302 | { |
||
303 | case 4: |
||
304 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
305 | "-fill $m4color -outline \"\" -tags \"m4\"", |
||
306 | argv[1], sc*x0, sc*y0, sc*(x0+BBXS), sc*(y0+BBYS)); |
||
307 | Tcl_Eval(interp, cmd); |
||
308 | sscanf((char *) Tcl_GetStringResult(interp)," %d ", &fedch[mb][ccon].id); |
||
309 | sprintf (cmd, "%s create rectangle %d %d %d %d " |
||
310 | "-fill $m4color -outline \"\" -tags \"m4\"", |
||
311 | argv[2], fx0, fy0, fx0+32, fy0+2); |
||
312 | Tcl_Eval(interp, cmd); |
||
313 | sscanf((char *) Tcl_GetStringResult(interp)," %d ", &fplch[sm][bbc][bbr].id[asd]); |
||
314 | break; |
||
315 | case 16: |
||
316 | if (fpon) casd=asd^1; else casd=asd; |
||
317 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
318 | "-fill $m16color -outline \"\" -tags \"m16\"", |
||
319 | argv[1], sc*(x0+casd*BBXS/4), sc*y0, |
||
320 | sc*(x0+(casd+1)*BBXS/4), sc*(y0+BBYS)); |
||
321 | Tcl_Eval(interp, cmd); |
||
322 | sscanf( (char *) Tcl_GetStringResult(interp)," %d ", &fedch[mb][ccon].id); |
||
323 | sprintf (cmd, "%s create rectangle %d %d %d %d " |
||
324 | "-fill $m16color -outline \"\" -tags \"m16\"", |
||
325 | argv[2], fx0, fy0, fx0+32, fy0+2); |
||
326 | Tcl_Eval(interp, cmd); |
||
327 | sscanf((char *) Tcl_GetStringResult(interp)," %d ", &fplch[sm][bbc][bbr].id[asd]); |
||
328 | } |
||
329 | } |
||
330 | fclose(fid); |
||
331 | |||
332 | sprintf(cmd, "%s/pm.dat", |
||
333 | Tcl_GetVar(interp, "config_dir", TCL_GLOBAL_ONLY)); |
||
334 | if ((fid=fopen(cmd, "r")) == NULL) return TCL_ERROR; |
||
335 | while ( fgets( cmd, 100, fid) != NULL) |
||
336 | if (cmd[1]=='#') |
||
337 | { |
||
338 | fgets( cmd, 100, fid); |
||
339 | if ((fgets( cmd, 100, fid))&& |
||
340 | ((status=sscanf(cmd,"\t type R5600-00-M%d", &pmt))==1)) |
||
341 | if ((fgets( cmd, 100, fid))&& |
||
342 | ((status=sscanf(cmd,"\t serial_no\t%s", s1))==1)) |
||
343 | if ((fgets( cmd, 100, fid))&& |
||
344 | ((status=sscanf(cmd,"\t position\t%d\t%d\t%d", &sm, &bbr, &bbc))==3)) |
||
345 | { |
||
346 | if (sm>6) |
||
347 | { |
||
348 | sm=20-sm; |
||
349 | bbr=31-bbr; |
||
350 | bbc=11-bbc; |
||
351 | } |
||
352 | strcpy(fplch[sm][bbc/2][bbr/2].sn[bbc%2][bbr%2], s1); |
||
353 | } |
||
354 | } |
||
355 | fclose(fid); |
||
356 | |||
357 | |||
358 | for (i=0;i<14;i++) |
||
359 | for (j=0;j<6;j++) |
||
360 | for (k=0;k<16;k++) |
||
361 | /* if (fplch[i][j][k].pmt) */ |
||
362 | for (ii=0;ii<2;ii++) |
||
363 | for (jj=0;jj<2;jj++) |
||
364 | if (fplch[i][j][k].sn[ii][jj][0]=='e') |
||
365 | { |
||
366 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
367 | "-fill #FFFF77 -outline \"\" -tags \"empty\"", |
||
368 | argv[1], |
||
369 | sc*(fplch[i][j][k].x0+ii*BBXS/2), |
||
370 | sc*(fplch[i][j][k].y0+(1-jj)*BBYS/2), |
||
371 | sc*(fplch[i][j][k].x0+(ii+1)*BBXS/2), |
||
372 | sc*(fplch[i][j][k].y0+(2-jj)*BBYS/2)); |
||
373 | Tcl_Eval(interp, cmd); |
||
374 | |||
375 | } |
||
376 | |||
377 | return TCL_OK; |
||
378 | } |
||
379 | |||
380 | int Evd_evopen( ClientData clientData, Tcl_Interp *interp, |
||
381 | int argc, CONST char *argv[]) |
||
382 | { |
||
383 | int evhot; |
||
384 | char fname[200]; |
||
385 | FILE *fhot; |
||
386 | |||
387 | strcpy(fname,argv[1]); |
||
388 | if (open_data_file(fname)) return TCL_ERROR; |
||
389 | curev=1; |
||
390 | |||
391 | sscanf(Tcl_GetVar(interp, "evhot", TCL_GLOBAL_ONLY), " %d ", &evhot); |
||
392 | if (evhot) |
||
393 | { |
||
394 | (void) find_hot(); |
||
395 | } |
||
396 | else |
||
397 | { |
||
398 | if ((fhot=fopen("hotchannels.raw","r"))) |
||
399 | { |
||
400 | (void) fread ((void *) hotchannels, 1, MAXFED*128, fhot); |
||
401 | fclose(fhot); |
||
402 | } |
||
403 | else (void) find_hot(); |
||
404 | } |
||
405 | return TCL_OK; |
||
406 | |||
407 | } |
||
408 | |||
409 | int Evd_evgoto( ClientData clientData, Tcl_Interp *interp, |
||
410 | int argc, CONST char *argv[]) |
||
411 | { |
||
412 | int pos; |
||
413 | sscanf(argv[1]," %d ", &curev); |
||
414 | |||
415 | pos=goto_event(curev); |
||
416 | if (pos != curev) |
||
417 | { |
||
418 | goto_event(pos); |
||
419 | curev=pos; |
||
420 | } |
||
421 | return TCL_OK; |
||
422 | } |
||
423 | |||
424 | int Evd_evclose( ClientData clientData, Tcl_Interp *interp, |
||
425 | int argc, CONST char *argv[]) |
||
426 | { |
||
427 | if (close_data_file()) return TCL_ERROR; |
||
428 | return TCL_OK; |
||
429 | } |
||
430 | |||
431 | int Evd_evplot( ClientData clientData, Tcl_Interp *interp, |
||
432 | int argc, CONST char *argv[]) |
||
433 | { |
||
434 | int i, j, k, ii, jj, nr, nhits, map, bx, evmask; |
||
435 | float sc; |
||
436 | unsigned char b; |
||
437 | char cmd[CMDLEN]; |
||
438 | |||
439 | sscanf(argv[2]," %f ", &sc); |
||
440 | sscanf(Tcl_GetVar(interp, "evmap", TCL_GLOBAL_ONLY), " %d ", &map); |
||
441 | sscanf(Tcl_GetVar(interp, "evmask", TCL_GLOBAL_ONLY), " %d ", &evmask); |
||
442 | nhits=0; |
||
443 | |||
444 | if ((nr=get_nextev(fedr, 0x500, 1))) |
||
445 | { |
||
446 | bx=fedr[0].bxn; |
||
447 | for (k=0;k<nr;k++) if (fedr[k].fedid<MAXFED) |
||
448 | { |
||
449 | if (evmask) mask_hot(fedr[k].fedid,(char *)fedr[k].data); |
||
450 | if (bx!=fedr[k].bxn) |
||
451 | printf("bx=%d, bxn=%d\n", bx, fedr[k].bxn); |
||
452 | for (ii=0;ii<128;ii++) |
||
453 | { |
||
454 | i=ii/2; |
||
455 | if (fedr[k].data[ii]) |
||
456 | for (jj=0,j=8*(ii%2),b=1;jj<8;jj++,j++,b<<=1) |
||
457 | if (fedr[k].data[ii]&b) |
||
458 | switch (fedch[fedr[k].fedid][i].pmt) |
||
459 | { |
||
460 | case 4: |
||
461 | nhits++; |
||
462 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
463 | "-fill $evcolor -outline \"\" -tags \"ev\"", |
||
464 | argv[1], |
||
465 | sc*(fedch[fedr[k].fedid][i].x0+m4x[j]), |
||
466 | sc*(fedch[fedr[k].fedid][i].y0+m4y[j]), |
||
467 | sc*(fedch[fedr[k].fedid][i].x0+m4x[j]+BBXS/4), |
||
468 | sc*(fedch[fedr[k].fedid][i].y0+m4y[j]+BBYS/4)); |
||
469 | Tcl_Eval(interp, cmd); |
||
470 | if (!map) |
||
471 | { |
||
472 | sprintf (cmd, "%s create rectangle %d %d %d %d " |
||
473 | "-fill $evcolor -outline \"\" -tags \"ev\"", |
||
474 | argv[3], |
||
475 | fedch[fedr[k].fedid][i].fx0+2*j, |
||
476 | fedch[fedr[k].fedid][i].fy0, |
||
477 | fedch[fedr[k].fedid][i].fx0+2*j+2, |
||
478 | fedch[fedr[k].fedid][i].fy0+2); |
||
479 | Tcl_Eval(interp, cmd); |
||
480 | } |
||
481 | break; |
||
482 | case 16: |
||
483 | nhits++; |
||
484 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
485 | "-fill $evcolor -outline \"\" -tags \"ev\"", |
||
486 | argv[1], |
||
487 | sc*(fedch[fedr[k].fedid][i].x0+ |
||
488 | m16x[fedch[fedr[k].fedid][i].asd][j]), |
||
489 | sc*(fedch[fedr[k].fedid][i].y0+ |
||
490 | m16y[fedch[fedr[k].fedid][i].asd][j]), |
||
491 | sc*(fedch[fedr[k].fedid][i].x0+ |
||
492 | m16x[fedch[fedr[k].fedid][i].asd][j]+BBXS/8), |
||
493 | sc*(fedch[fedr[k].fedid][i].y0+ |
||
494 | m16y[fedch[fedr[k].fedid][i].asd][j]+BBYS/8)); |
||
495 | Tcl_Eval(interp, cmd); |
||
496 | if (!map) |
||
497 | { |
||
498 | sprintf (cmd, "%s create rectangle %d %d %d %d " |
||
499 | "-fill $evcolor -outline \"\" -tags \"ev\"", |
||
500 | argv[3], |
||
501 | fedch[fedr[k].fedid][i].fx0+2*j, |
||
502 | fedch[fedr[k].fedid][i].fy0, |
||
503 | fedch[fedr[k].fedid][i].fx0+2*j+2, |
||
504 | fedch[fedr[k].fedid][i].fy0+2); |
||
505 | Tcl_Eval(interp, cmd); |
||
506 | } |
||
507 | } |
||
508 | } |
||
509 | } |
||
510 | sprintf(cmd, ".ev.tb.curev delete 0 end "); |
||
511 | Tcl_Eval(interp, cmd); |
||
512 | sprintf(cmd, ".ev.tb.curev insert 0 \"%d\" ", curev); |
||
513 | Tcl_Eval(interp, cmd); |
||
514 | sprintf(cmd, ".ev.det delete te ; set ura [clock format %d " |
||
515 | "-format \"%%a %%b %%d %%H:%%M:%%S %%Y\"] ; " |
||
516 | ".ev.det create text [expr $evmag*345] [expr $evmag*10] " |
||
517 | "-text \"EVENT: %d %d %d $ura\" " |
||
518 | "-fill \"#c0c000\" -anchor e -font $tfont -tags te ", |
||
519 | evdata.event_time, logh.evt, evdata.run_number, |
||
520 | evdata.exp_number); |
||
521 | /* logh.dtm, logh.evt, logh.run, logh.exp); */ |
||
522 | Tcl_Eval(interp, cmd); |
||
523 | sprintf((char *) Tcl_GetStringResult(interp), "evplot: event#=%d #hits=%d #feds=%d bx=%d", |
||
524 | (curev++), nhits, nr, evdata.physBX); |
||
525 | } |
||
526 | else |
||
527 | { |
||
528 | Tcl_Eval(interp, "tk_messageBox -message " |
||
529 | "\"RUN WITHOUT RICH\" -icon warning -type ok"); |
||
530 | } |
||
531 | return TCL_OK; |
||
532 | } |
||
533 | |||
534 | int Evd_evscan( ClientData clientData, Tcl_Interp *interp, |
||
535 | int argc, CONST char *argv[]) |
||
536 | { |
||
537 | int i, j, k, ii, jj, nr, pos, nh, pbx, norm, dif, evmask, sreset; |
||
538 | unsigned short b; |
||
539 | uint32_t prev[5000]; |
||
540 | double nhy[2000] ,nbx[220] ,hbx[220], nco4y[101], nco16y[101]; |
||
541 | double nrepy[100], nrep64y[100]; |
||
542 | char cmd[CMDLEN]; |
||
543 | |||
544 | sscanf(Tcl_GetVar(interp, "evmask", TCL_GLOBAL_ONLY), " %d ", &evmask); |
||
545 | sscanf(Tcl_GetVar(interp, "sreset", TCL_GLOBAL_ONLY), " %d ", &sreset); |
||
546 | |||
547 | for (i=0;i<5000;i++) prev[i]=0; |
||
548 | for (i=0;i<2000;i++) nhy[i]=0.; |
||
549 | for (i=0;i<220;i++) |
||
550 | { |
||
551 | nbx[i]=0.; |
||
552 | hbx[i]=0.; |
||
553 | } |
||
554 | for (i=0;i<101;i++) |
||
555 | { |
||
556 | nco4y[i]=0.; |
||
557 | nco16y[i]=0.; |
||
558 | } |
||
559 | for (i=0;i<100;i++) |
||
560 | { |
||
561 | nrepy[i]=0.; |
||
562 | nrep64y[i]=0.; |
||
563 | } |
||
564 | /* if (Blt_GetVector(interp, "nhy", &nhyV) != TCL_OK) return TCL_ERROR; |
||
565 | */ |
||
566 | if (sreset) |
||
567 | { |
||
568 | for (k=0;k<MAXFED;k++) |
||
569 | for (i=0;i<64;i++) |
||
570 | for (j=0;j<16;j++) |
||
571 | hits.data[k][i][j]=0; |
||
572 | hits.evt=0; |
||
573 | } |
||
574 | |||
575 | if (reopen_data_file()) return TCL_ERROR; |
||
576 | |||
577 | while ((nr=get_nextev(fedr, 0x500, 0))) |
||
578 | { |
||
579 | nh=0; |
||
580 | for (k=0;k<nr;k++) |
||
581 | { |
||
582 | if (evmask) mask_hot(fedr[k].fedid,(char *)fedr[k].data); |
||
583 | for (ii=0;ii<128;ii++) |
||
584 | { |
||
585 | i=ii/2; |
||
586 | if (fedr[k].data[ii]) |
||
587 | for (jj=0,j=8*(ii%2),b=1;jj<8;jj++,j++,b<<=1) |
||
588 | if (fedr[k].data[ii]&b) |
||
589 | { |
||
590 | if (fedch[fedr[k].fedid][i].pmt) nh++; |
||
591 | hits.data[fedr[k].fedid][i][j]++; |
||
592 | } |
||
593 | } |
||
594 | } |
||
595 | hits.evt++; |
||
596 | pbx=evdata.physBX; |
||
597 | if ( (unsigned short) pbx > 219) pbx=219; |
||
598 | nbx[pbx]+=1.; |
||
599 | hbx[pbx]+=(double)nh; |
||
600 | nh/=10; |
||
601 | if (nh > 1999) nh=1999; |
||
602 | nhy[nh]+=1.; |
||
603 | if (nh<5000) |
||
604 | { |
||
605 | if (prev[nh]) |
||
606 | { |
||
607 | dif=hits.evt-prev[nh]; |
||
608 | if (dif<100) nrepy[dif]++; |
||
609 | if ((dif>>=6)<100) nrep64y[dif]++; |
||
610 | } |
||
611 | prev[nh]=hits.evt; |
||
612 | } |
||
613 | } |
||
614 | hits.max=0; |
||
615 | hits.min=0x7fffffff; |
||
616 | hits.ent=0; |
||
617 | norm=hits.evt+1; |
||
618 | for (i=0;i<MAXFED;i++) |
||
619 | for (j=0;j<64;j++) |
||
620 | if (fedch[i][j].pmt) |
||
621 | for (k=0;k<16;k++) |
||
622 | { |
||
623 | if (fedch[i][j].pmt == 4) |
||
624 | if (hits.data[i][j][k]) |
||
625 | nco4y[(100*hits.data[i][j][k]/norm)+1]+=1.; |
||
626 | else |
||
627 | nco4y[0]+=1.; |
||
628 | else |
||
629 | if (hits.data[i][j][k]) |
||
630 | nco16y[(100*hits.data[i][j][k]/norm)+1]+=1.; |
||
631 | else |
||
632 | nco16y[0]+=1.; |
||
633 | hits.ent+=hits.data[i][j][k]; |
||
634 | if (hits.data[i][j][k]>hits.max) hits.max=hits.data[i][j][k]; |
||
635 | if (hits.data[i][j][k]<hits.min) hits.min=hits.data[i][j][k]; |
||
636 | } |
||
637 | |||
638 | for (i=0;i<2000;i++) |
||
639 | { |
||
640 | sprintf(cmd, "set nhy(%d) %f ", i, nhy[i]); |
||
641 | Tcl_Eval(interp, cmd); |
||
642 | } |
||
643 | for (i=0;i<220;i++) |
||
644 | { |
||
645 | sprintf(cmd, "set nbxy(%d) %f ", i, nbx[i]); |
||
646 | Tcl_Eval(interp, cmd); |
||
647 | if (nbx[i]) hbx[i]/=nbx[i]; |
||
648 | sprintf(cmd, "set hbxy(%d) %f ", i, hbx[i]); |
||
649 | Tcl_Eval(interp, cmd); |
||
650 | } |
||
651 | for (i=0;i<101;i++) |
||
652 | { |
||
653 | sprintf(cmd, "set nco4y(%d) %f ", i, nco4y[i]); |
||
654 | Tcl_Eval(interp, cmd); |
||
655 | sprintf(cmd, "set nco16y(%d) %f ", i, nco16y[i]); |
||
656 | Tcl_Eval(interp, cmd); |
||
657 | } |
||
658 | for (i=0;i<100;i++) |
||
659 | { |
||
660 | sprintf(cmd, "set nrepy(%d) %f ", i, nrepy[i]); |
||
661 | Tcl_Eval(interp, cmd); |
||
662 | sprintf(cmd, "set nrep64y(%d) %f ", i, nrep64y[i]); |
||
663 | Tcl_Eval(interp, cmd); |
||
664 | } |
||
665 | /* if (Blt_ResetVector(nhyV, nhyd, 2000, 2000, TCL_VOLATILE) != TCL_OK) |
||
666 | return TCL_ERROR; */ |
||
667 | |||
668 | if (reclose_data_file()) return TCL_ERROR; |
||
669 | return TCL_OK; |
||
670 | } |
||
671 | |||
672 | int Evd_evscanplot( ClientData clientData, Tcl_Interp *interp, |
||
673 | int argc, CONST char *argv[]) |
||
674 | { |
||
675 | int i, j, k, coli, map, rev, evm4n; |
||
676 | float sc, sm, norm, norm1, evn; |
||
677 | char col[17][10]={"000000","111111","222222","333333", |
||
678 | "444444","555555","666666","777777", |
||
679 | "888888","999999","AAAAAA","BBBBBB", |
||
680 | "CCCCCC","DDDDDD","EEEEEE","FFFFFF","FF0000"}; |
||
681 | char cmd[CMDLEN]; |
||
682 | |||
683 | sscanf(argv[2]," %f ", &sc); |
||
684 | sscanf(argv[3]," %f ", &sm); |
||
685 | sscanf(Tcl_GetVar(interp, "evnorm", TCL_GLOBAL_ONLY), " %f ", &evn); |
||
686 | sscanf(Tcl_GetVar(interp, "evm4norm", TCL_GLOBAL_ONLY), " %d ", &evm4n); |
||
687 | sscanf(Tcl_GetVar(interp, "evreverse", TCL_GLOBAL_ONLY), " %d ", &rev); |
||
688 | sscanf(Tcl_GetVar(interp, "evmap", TCL_GLOBAL_ONLY), " %d ", &map); |
||
689 | if (evn) norm=sm*(float)(hits.evt)/100.; |
||
690 | else norm=sm*(float)(hits.max)/100.; |
||
691 | |||
692 | for (i=0;i<MAXFED;i++) |
||
693 | for (j=0;j<64;j++) |
||
694 | { |
||
695 | if (evm4n && (fedch[i][j].pmt==4)) |
||
696 | norm1=4.*norm; |
||
697 | else |
||
698 | norm1=norm; |
||
699 | for (k=0;k<16;k++) |
||
700 | if (hits.data[i][j][k]||map) |
||
701 | { |
||
702 | coli=(int)(16.*(float)hits.data[i][j][k]/norm1); |
||
703 | if (rev) coli^=0xF; |
||
704 | if (coli>16) coli=16; |
||
705 | if (coli<0) coli=0; |
||
706 | if (!map) |
||
707 | { |
||
708 | sprintf (cmd, "%s create rectangle %d %d %d %d " |
||
709 | "-fill #%s -outline \"\" -tags \"sc c%d\"", |
||
710 | argv[4], |
||
711 | fedch[i][j].fx0+2*k, |
||
712 | fedch[i][j].fy0, |
||
713 | fedch[i][j].fx0+2*k+2, |
||
714 | fedch[i][j].fy0+2, |
||
715 | col[coli], coli); |
||
716 | Tcl_Eval(interp, cmd); |
||
717 | } |
||
718 | switch (fedch[i][j].pmt) |
||
719 | { |
||
720 | case 4: |
||
721 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
722 | "-fill #%s -outline \"\" -tags \"sc c%d\"", |
||
723 | argv[1], |
||
724 | sc*(fedch[i][j].x0+m4x[k]), |
||
725 | sc*(fedch[i][j].y0+m4y[k]), |
||
726 | sc*(fedch[i][j].x0+m4x[k]+BBXS/4), |
||
727 | sc*(fedch[i][j].y0+m4y[k]+BBYS/4), |
||
728 | col[coli], coli); |
||
729 | Tcl_Eval(interp, cmd); |
||
730 | break; |
||
731 | case 16: |
||
732 | sprintf (cmd, "%s create rectangle %f %f %f %f " |
||
733 | "-fill #%s -outline \"\" -tags \"sc c%d\"", |
||
734 | argv[1], |
||
735 | sc*(fedch[i][j].x0+ |
||
736 | m16x[fedch[i][j].asd][k]), |
||
737 | sc*(fedch[i][j].y0+ |
||
738 | m16y[fedch[i][j].asd][k]), |
||
739 | sc*(fedch[i][j].x0+ |
||
740 | m16x[fedch[i][j].asd][k]+BBXS/8), |
||
741 | sc*(fedch[i][j].y0+ |
||
742 | m16y[fedch[i][j].asd][k]+BBYS/8), |
||
743 | col[coli], coli); |
||
744 | Tcl_Eval(interp, cmd); |
||
745 | break; |
||
746 | } |
||
747 | } |
||
748 | } |
||
749 | sprintf((char *) Tcl_GetStringResult(interp), "scan: #events=%u avg=%.2f channel:" |
||
750 | " max=%u min=%u", |
||
751 | hits.evt, (float)hits.ent/(float)hits.evt, |
||
752 | hits.max, hits.min); |
||
753 | return TCL_OK; |
||
754 | } |
||
755 | |||
756 | int Evd_evstatl( ClientData clientData, Tcl_Interp *interp, |
||
757 | int argc, CONST char *argv[]) |
||
758 | { |
||
759 | int hv,hvch; |
||
760 | int x, y, wid, fpon, scan; |
||
761 | int mb, db, con, ch, ccon, sm , bbr, bbc, asd, px, py; |
||
762 | float sc, x0, x1, y0, y1; |
||
763 | char cmd[CMDLEN], *sn; |
||
764 | |||
765 | sscanf(argv[1]," %d ", &wid); |
||
766 | sscanf(argv[2]," %d ", &x); |
||
767 | sscanf(argv[3]," %d ", &y); |
||
768 | Tcl_Eval(interp, ".ev.det delete hl"); |
||
769 | Tcl_Eval(interp, ".ev.fed delete hl"); |
||
770 | sscanf(Tcl_GetVar(interp, "evmap", TCL_GLOBAL_ONLY), " %d ", &fpon); |
||
771 | sscanf(Tcl_GetVar(interp, "new_scan", TCL_GLOBAL_ONLY), " %d ", &scan); |
||
772 | |||
773 | switch (wid) |
||
774 | { |
||
775 | case 0: |
||
776 | sscanf(argv[4]," %f ", &sc); |
||
777 | x=x/(int)sc-FPXOFF; |
||
778 | y=y/(int)sc-FPYOFF; |
||
779 | /* if (x<0 || x>=FPXOFF+7*SMXOFF || y<0 || y>=FPYOFF+2*SMYOFF) break; */ |
||
780 | if (x<0 || x>=7*SMXOFF || y<0 || y>=2*SMYOFF) break; |
||
781 | sm=x/SMXOFF+7*(y/SMYOFF); |
||
782 | bbr=(y%SMYOFF)/BBYS; |
||
783 | bbc=(x%SMXOFF)/BBXS; |
||
784 | px=(x%SMXOFF)%BBXS; |
||
785 | py=(y%SMYOFF)%BBYS; |
||
786 | if ((sm<14)&&(bbr<16)&&(bbc<6)&&(px<16)&&(py<16)) |
||
787 | { |
||
788 | bbr=15-bbr; |
||
789 | asd=0; |
||
790 | ch=m4c[px/2][py/2]; |
||
791 | sn=fplch[sm][bbc][bbr].sn[px/4][1-py/4]; |
||
792 | Tcl_SetVar(interp, "pmtsntmp", sn, TCL_GLOBAL_ONLY); |
||
793 | switch(fplch[sm][bbc][bbr].pmt) |
||
794 | { |
||
795 | case 16: |
||
796 | asd=m16a[px][py]; |
||
797 | ch=m16c[px][py]; |
||
798 | case 4: |
||
799 | if ((mb=fplch[sm][bbc][bbr].mb[asd]) == -1) break; |
||
800 | ccon=fplch[sm][bbc][bbr].wi[asd]; |
||
801 | db=ccon/16; |
||
802 | con=ccon%16; |
||
803 | sprintf(cmd, ".ev.fed coords %d", fplch[sm][bbc][bbr].id[asd]); |
||
804 | Tcl_Eval(interp, cmd); |
||
805 | sscanf((char *) Tcl_GetStringResult(interp), " %f %f %f %f ", &x0, &y0, &x1, &y1); |
||
806 | x0-=1.; y0-=1.; x1+=1.; y1+=1.; |
||
807 | sprintf(cmd, ".ev.fed create rectangle %f %f %f %f " |
||
808 | "-fill \"\" -outline #FF00FF -width 2 -tags \"hl\"", |
||
809 | x0, y0, x1, y1); |
||
810 | Tcl_Eval(interp, cmd); |
||
811 | sprintf(cmd, ".ev.det coords %d", fedch[mb][ccon].id); |
||
812 | Tcl_Eval(interp, cmd); |
||
813 | sscanf((char *) Tcl_GetStringResult(interp), " %f %f %f %f ", &x0, &y0, &x1, &y1); |
||
814 | x0-=1.; y0-=1.; x1+=1.; y1+=1.; |
||
815 | sprintf(cmd, ".ev.det create rectangle %f %f %f %f " |
||
816 | "-fill \"\" -outline #FF00FF -width 2 -tags \"hl\"", |
||
817 | x0, y0, x1, y1); |
||
818 | Tcl_Eval(interp, cmd); |
||
819 | hv=-1; |
||
820 | hvch=-1; |
||
821 | if (!scan) |
||
822 | sprintf((char *) Tcl_GetStringResult(interp), "mb:%2d db:%d con:%2d sm:%2d" |
||
823 | " r:%2d c:%d asd:%d ch:%2d SN:%s hv:%3d hvch%3d entr:%d", |
||
824 | mb, db, con, sm, bbr, bbc, asd, ch, sn, hv,hvch, |
||
825 | hits.data[mb][ccon][ch]); |
||
826 | else |
||
827 | sprintf((char *) Tcl_GetStringResult(interp), |
||
828 | "mb:%2d db:%d con:%2d sm:%2d r:%2d c:%d asd:%d ch:%2d SN:%s hv:%3d hvch%3d", |
||
829 | mb, db, con, sm, bbr, bbc, asd, ch, sn, hv,hvch); |
||
830 | break; |
||
831 | } |
||
832 | } |
||
833 | break; |
||
834 | case 1: |
||
835 | y-=5; |
||
836 | x-=3; |
||
837 | if (x<0 || y<0) break; |
||
838 | mb=2*(y/52)+x/140; |
||
839 | con=(y%52)/3; |
||
840 | db=(x%140)/34; |
||
841 | ch=(x%34)/2; |
||
842 | if ((mb<28)&&(db<4)&&(con<16)&&(ch<16)) |
||
843 | { |
||
844 | ccon=db*16+con; |
||
845 | if (fedch[mb][ccon].pmt) |
||
846 | { |
||
847 | sm=fedch[mb][ccon].sm; |
||
848 | bbr=fedch[mb][ccon].bbr; |
||
849 | bbc=fedch[mb][ccon].bbc; |
||
850 | asd=fedch[mb][ccon].asd; |
||
851 | sprintf(cmd, ".ev.det coords %d", fedch[mb][ccon].id); |
||
852 | Tcl_Eval(interp, cmd); |
||
853 | sscanf((char *) Tcl_GetStringResult(interp), " %f %f %f %f ", &x0, &y0, &x1, &y1); |
||
854 | x0-=1.; y0-=1.; x1+=1.; y1+=1.; |
||
855 | sprintf(cmd, ".ev.det create rectangle %f %f %f %f " |
||
856 | "-fill \"\" -outline #FF00FF -width 2 -tags \"hl\"", |
||
857 | x0, y0, x1, y1); |
||
858 | Tcl_Eval(interp, cmd); |
||
859 | sprintf(cmd, ".ev.fed coords %d", fplch[sm][bbc][bbr].id[asd]); |
||
860 | Tcl_Eval(interp, cmd); |
||
861 | sscanf((char *) Tcl_GetStringResult(interp), " %f %f %f %f ", &x0, &y0, &x1, &y1); |
||
862 | x0-=1.; y0-=1.; x1+=1.; y1+=1.; |
||
863 | sprintf(cmd, ".ev.fed create rectangle %f %f %f %f " |
||
864 | "-fill \"\" -outline #FF00FF -width 2 -tags \"hl\"", |
||
865 | x0, y0, x1, y1); |
||
866 | Tcl_Eval(interp, cmd); |
||
867 | if (!scan) |
||
868 | sprintf((char *) Tcl_GetStringResult(interp), "mb:%2d db:%d con:%2d sm:%2d" |
||
869 | " r:%2d c:%d asd:%d ch:%2d entr:%d", |
||
870 | mb, db, con, sm, bbr, bbc, asd, ch, |
||
871 | hits.data[mb][ccon][ch]); |
||
872 | else |
||
873 | sprintf((char *) Tcl_GetStringResult(interp), |
||
874 | "mb:%2d db:%d con:%2d sm:%2d r:%2d c:%d asd:%d ch:%2d", |
||
875 | mb, db, con, sm, bbr, bbc, asd, ch); |
||
876 | } |
||
877 | } |
||
878 | break; |
||
879 | } |
||
880 | |||
881 | return TCL_OK; |
||
882 | } |
||
883 | |||
884 | int Evd_evdump( ClientData clientData, Tcl_Interp *interp, |
||
885 | int argc, CONST char *argv[]) |
||
886 | { |
||
887 | FILE *fout; |
||
888 | |||
889 | if (reopen_data_file()) return TCL_ERROR; |
||
890 | if ((fout=fopen(argv[1], "w"))==NULL) return TCL_ERROR; |
||
891 | |||
892 | while (dump_cmp(fout, 0x500)); |
||
893 | |||
894 | if (fclose(fout)==EOF) return TCL_ERROR; |
||
895 | if (reclose_data_file()) return TCL_ERROR; |
||
896 | |||
897 | return TCL_OK; |
||
898 | } |
||
899 | |||
900 | |||
901 | /* |
||
902 | int Evd_proto( ClientData clientData, Tcl_Interp *interp, |
||
903 | int argc, CONST char *argv[]) |
||
904 | { |
||
905 | return TCL_OK; |
||
906 | } |
||
907 | */ |
||
908 | |||
909 | int Evd_Init(Tcl_Interp *interp) |
||
910 | { |
||
911 | if (is_little_endian()) |
||
912 | printf("Evd running on LittleEndian machine\n"); |
||
913 | else |
||
914 | printf("Evd running on BigEndian machine\n"); |
||
915 | Tcl_PkgProvide(interp, "Evd", "1.0"); |
||
916 | |||
917 | Tcl_CreateCommand(interp, "evinit", Evd_evinit, (ClientData) NULL, |
||
918 | (Tcl_CmdDeleteProc *) NULL); |
||
919 | Tcl_CreateCommand(interp, "evopen", Evd_evopen, (ClientData) NULL, |
||
920 | (Tcl_CmdDeleteProc *) NULL); |
||
921 | Tcl_CreateCommand(interp, "evgoto", Evd_evgoto, (ClientData) NULL, |
||
922 | (Tcl_CmdDeleteProc *) NULL); |
||
923 | Tcl_CreateCommand(interp, "evclose", Evd_evclose, (ClientData) NULL, |
||
924 | (Tcl_CmdDeleteProc *) NULL); |
||
925 | Tcl_CreateCommand(interp, "evplot", Evd_evplot, (ClientData) NULL, |
||
926 | (Tcl_CmdDeleteProc *) NULL); |
||
927 | Tcl_CreateCommand(interp, "evscan", Evd_evscan, (ClientData) NULL, |
||
928 | (Tcl_CmdDeleteProc *) NULL); |
||
929 | Tcl_CreateCommand(interp, "evscanplot", Evd_evscanplot, (ClientData) NULL, |
||
930 | (Tcl_CmdDeleteProc *) NULL); |
||
931 | Tcl_CreateCommand(interp, "evstatl", Evd_evstatl, (ClientData) NULL, |
||
932 | (Tcl_CmdDeleteProc *) NULL); |
||
933 | Tcl_CreateCommand(interp, "evdump", Evd_evdump, (ClientData) NULL, |
||
934 | (Tcl_CmdDeleteProc *) NULL); |
||
935 | return TCL_OK; |
||
936 | } |
||
937 | |||
938 | |||
939 | #ifdef __cplusplus |
||
940 | } |
||
941 | #endif |