1 |
// |
// |
2 |
// Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti |
// Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti |
3 |
// |
// |
4 |
// FCaloQLOOK.c version 1.11 (2006-07-17) |
// FCaloQLOOK.c version 1.13 (2006-09-28) |
5 |
// |
// |
6 |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
7 |
// |
// |
8 |
// Changelog: |
// Changelog: |
9 |
// |
// |
10 |
|
// 1.12 - 1.13 (2006-09-28): Give wrong number of events in compress mode, fixed. |
11 |
|
// |
12 |
|
// 1.11 - 1.12 (2006-09-22): Check for different number of events, put output in a file and write down errors for each event. Fixed jumpev bug. |
13 |
|
// |
14 |
// 1.09 - 1.11 (2006-07-17): Adapted to flight conditions. |
// 1.09 - 1.11 (2006-07-17): Adapted to flight conditions. |
15 |
// |
// |
16 |
// 1.07 - 1.09 (2006-05-29): Fixed bug in output filename when input is not in the form DW_YYMMDD_NNN. Bug in latchup alarm not coming from the status word, fixed. |
// 1.07 - 1.09 (2006-05-29): Fixed bug in output filename when input is not in the form DW_YYMMDD_NNN. Bug in latchup alarm not coming from the status word, fixed. |
90 |
return file2; |
return file2; |
91 |
} |
} |
92 |
|
|
93 |
|
void sighandler(UInt_t pkt_num, UInt_t obt, UInt_t entry, UInt_t section, UInt_t totev, Bool_t &evdone){ |
94 |
|
if ( !evdone ){ |
95 |
|
printf("\n\n=================================================\n"); |
96 |
|
printf("PSCU-Pkt N. %u - OBT %u ms\n",pkt_num,obt); |
97 |
|
printf("Total events %u\n",totev); |
98 |
|
printf("(ROOT-tree entry %u )\n",entry); |
99 |
|
printf("=================================================\n"); |
100 |
|
evdone = true; |
101 |
|
}; |
102 |
|
TString sec = "UNKNOWN"; |
103 |
|
if ( section == 0 ) sec = "XE"; |
104 |
|
if ( section == 1 ) sec = "XO"; |
105 |
|
if ( section == 2 ) sec = "YE"; |
106 |
|
if ( section == 3 ) sec = "YO"; |
107 |
|
printf(" Section %s (DSP n. %i) message: ",sec.Data(),section); |
108 |
|
}; |
109 |
|
|
110 |
void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "png", Bool_t iactive =false, Bool_t w4i=false){ |
void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "png", Bool_t iactive =false, Bool_t w4i=false){ |
111 |
gStyle->SetPaperSize(19.,25.); |
gStyle->SetPaperSize(19.,25.); |
112 |
const char* startingdir = gSystem->WorkingDirectory(); |
const char* startingdir = gSystem->WorkingDirectory(); |
306 |
Int_t pdone, bdone; |
Int_t pdone, bdone; |
307 |
pdone = 0; |
pdone = 0; |
308 |
bdone = 0; |
bdone = 0; |
309 |
bool isCOMP = 0; |
bool isCOMP = false; |
310 |
bool isFULL = 0; |
bool isFULL = false; |
311 |
bool isRAW = 0; |
bool isRAW = false; |
312 |
Int_t alldexy=0; |
Int_t alldexy=0; |
313 |
Int_t alldexy2=0; |
Int_t alldexy2=0; |
314 |
Int_t planebases=0; |
Int_t planebases=0; |
327 |
fulldiff[1] = 0; |
fulldiff[1] = 0; |
328 |
fulldiff[2] = 0; |
fulldiff[2] = 0; |
329 |
fulldiff[3] = 0; |
fulldiff[3] = 0; |
330 |
printf("\n Processed events: \n\n"); |
// printf("\n Processed events: \n\n"); |
331 |
|
printf("\n Start processing: \n\n"); |
332 |
unsigned short int calev0=0; |
unsigned short int calev0=0; |
333 |
unsigned short int oldcalev0; |
unsigned short int oldcalev0; |
334 |
unsigned short int calev1=0; |
unsigned short int calev1=0; |
338 |
unsigned short int calev3=0; |
unsigned short int calev3=0; |
339 |
unsigned short int oldcalev3; |
unsigned short int oldcalev3; |
340 |
Int_t i = minevent; |
Int_t i = minevent; |
341 |
Float_t headc = 0.; |
UInt_t headc = 0; |
342 |
Float_t headco = 0.; |
UInt_t headco = 0; |
343 |
Bool_t h1rcheck = false; |
Bool_t h1rcheck = false; |
344 |
Int_t h1rin = 0; |
Int_t h1rin = 0; |
345 |
Int_t h1rout = 0; |
Int_t h1rout = 0; |
353 |
Int_t outdexy = 0; |
Int_t outdexy = 0; |
354 |
Int_t indexyc = 0; |
Int_t indexyc = 0; |
355 |
Int_t outdexyc = 0; |
Int_t outdexyc = 0; |
356 |
Int_t obt = 0; |
UInt_t obt = 0; |
357 |
Int_t minobt[4]; |
UInt_t minobt[4]; |
358 |
Int_t maxobt[4]; |
UInt_t maxobt[4]; |
359 |
Int_t swminobt[4]; |
UInt_t swminobt[4]; |
360 |
Int_t swmaxobt[4]; |
UInt_t swmaxobt[4]; |
361 |
Bool_t firstobt[4]; |
Bool_t firstobt[4]; |
362 |
Bool_t swfirstobt[4]; |
Bool_t swfirstobt[4]; |
363 |
for ( Int_t i = 0; i<4; i++){ |
for ( Int_t i = 0; i<4; i++){ |
368 |
firstobt[i] = true; |
firstobt[i] = true; |
369 |
swfirstobt[i] = true; |
swfirstobt[i] = true; |
370 |
}; |
}; |
371 |
|
Bool_t evdone = false; |
372 |
|
// |
373 |
while ( i < maxevent+1){ |
while ( i < maxevent+1){ |
374 |
|
evdone = false; |
375 |
tshit = 0; |
tshit = 0; |
376 |
trshit = 0; |
trshit = 0; |
377 |
tr->GetEntry(i); |
tr->GetEntry(i); |
384 |
if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])) ) calevn1++; |
if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])) ) calevn1++; |
385 |
if ( (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])) ) calevn2++; |
if ( (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])) ) calevn2++; |
386 |
if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])) ) calevn3++; |
if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])) ) calevn3++; |
|
// calevn1 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])); |
|
|
// calevn2 += (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])); |
|
|
// calevn3 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])); |
|
387 |
calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1]))); |
calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1]))); |
388 |
calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3]))); |
calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3]))); |
389 |
calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3]))); |
calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3]))); |
398 |
calevv2 = (int)ce->calevnum[2]; |
calevv2 = (int)ce->calevnum[2]; |
399 |
oldcalev3 = calev3; |
oldcalev3 = calev3; |
400 |
calev3 = (int)ce->calevnum[3]; |
calev3 = (int)ce->calevnum[3]; |
401 |
goto jumpprintout; |
// goto jumpprintout; |
402 |
if ( (headc - headco -1.) == 0. && ((calev0 - oldcalev0 - 1) > 0 || (calev1 - oldcalev1 - 1) > 0 || (calevv2 - oldcalev2 - 1) > 0 || (calev3 - oldcalev3 - 1) > 0) ){ |
if ( (headc - headco -1) == 0. && ((calev0 - oldcalev0 - 1) > 0 || (calev1 - oldcalev1 - 1) > 0 || (calevv2 - oldcalev2 - 1) > 0 || (calev3 - oldcalev3 - 1) > 0) ){ |
403 |
if ( i != minevent ) { |
if ( i != minevent ) { |
404 |
printf(" %f 0 Event %i: %i\n",headco,i,oldcalev0); |
// printf(" %f 0 Event %i: %i\n",headco,i,oldcalev0); |
405 |
printf(" %f 0 Event %i: %i\n",headc,i+1,calev0); |
// printf(" %f 0 Event %i: %i\n",headc,i+1,calev0); |
406 |
printf(" %f 1 Event %i: %i\n",headco,i,oldcalev1); |
// printf(" %f 1 Event %i: %i\n",headco,i,oldcalev1); |
407 |
printf(" %f 1 Event %i: %i\n",headc,i+1,calev1); |
// printf(" %f 1 Event %i: %i\n",headc,i+1,calev1); |
408 |
printf(" %f 2 Event %i: %i\n",headco,i,oldcalev2); |
// printf(" %f 2 Event %i: %i\n",headco,i,oldcalev2); |
409 |
printf(" %f 2 Event %i: %i\n",headc,i+1,calevv2); |
// printf(" %f 2 Event %i: %i\n",headc,i+1,calevv2); |
410 |
printf(" %f 3 Event %i: %i\n",headco,i,oldcalev3); |
// printf(" %f 3 Event %i: %i\n",headco,i,oldcalev3); |
411 |
printf(" %f 3 Event %i: %i\n",headc,i+1,calev3); |
// printf(" %f 3 Event %i: %i\n",headc,i+1,calev3); |
412 |
isRAW = 0; |
isRAW = 0; |
413 |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
414 |
if ( (calev0 - oldcalev0 - 1) > 0 && !isRAW && ce->perror[0] != 129 && oldcalev0 != 0) { |
if ( (calev0 - oldcalev0 - 1) > 0 && !isRAW && ce->perror[0] != 129 && oldcalev0 != 0) { |
415 |
ver[0][10]++; |
ver[0][10]++; |
416 |
|
sighandler(headc,obt,i,0,nevents,evdone); |
417 |
|
printf(" jump in the counter calev is %i oldcalev was %i \n",calev0,oldcalev0); |
418 |
}; |
}; |
419 |
isRAW = 0; |
isRAW = 0; |
420 |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
421 |
if ( (calev1 - oldcalev1 - 1) > 0 && !isRAW && ce->perror[1] != 129 && oldcalev1 != 0 ){ |
if ( (calev1 - oldcalev1 - 1) > 0 && !isRAW && ce->perror[1] != 129 && oldcalev1 != 0 ){ |
422 |
ver[1][10]++; |
ver[1][10]++; |
423 |
|
sighandler(headc,obt,i,1,nevents,evdone); |
424 |
|
printf(" jump in the counter calev is %i oldcalev was %i \n",calev1,oldcalev1); |
425 |
}; |
}; |
426 |
isRAW = 0; |
isRAW = 0; |
427 |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
428 |
if ( (calevv2 - oldcalev2 - 1) > 0 && !isRAW && ce->perror[2] != 129 && oldcalev2 != 0 ){ |
if ( (calevv2 - oldcalev2 - 1) > 0 && !isRAW && ce->perror[2] != 129 && oldcalev2 != 0 ){ |
429 |
ver[2][10]++; |
ver[2][10]++; |
430 |
|
sighandler(headc,obt,i,2,nevents,evdone); |
431 |
|
printf(" jump in the counter calev is %i oldcalev was %i \n",calevv2,oldcalev2); |
432 |
}; |
}; |
433 |
isRAW = 0; |
isRAW = 0; |
434 |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
if ( ce->stwerr[0] & (1 << 3)) isRAW = 1; |
435 |
if ( (calev3 - oldcalev3 - 1) > 0 && !isRAW && ce->perror[3] != 129 && oldcalev3 != 0 ){ |
if ( (calev3 - oldcalev3 - 1) > 0 && !isRAW && ce->perror[3] != 129 && oldcalev3 != 0 ){ |
436 |
ver[3][10]++; |
ver[3][10]++; |
437 |
|
sighandler(headc,obt,i,3,nevents,evdone); |
438 |
|
printf(" jump in the counter calev is %i oldcalev was %i \n",calev3,oldcalev3); |
439 |
}; |
}; |
440 |
} |
} |
441 |
}; |
}; |
442 |
jumpprintout: |
// jumpprintout: |
443 |
memcpy(shit, nullsh, sizeof(nullsh)); |
memcpy(shit, nullsh, sizeof(nullsh)); |
444 |
memcpy(rshit, nullsh, sizeof(nullsh)); |
memcpy(rshit, nullsh, sizeof(nullsh)); |
445 |
for (Int_t l = 0; l < 2; l++ ){ |
for (Int_t l = 0; l < 2; l++ ){ |
463 |
se = 1; |
se = 1; |
464 |
pl = (ii-1)/2; |
pl = (ii-1)/2; |
465 |
pdone = 0; |
pdone = 0; |
466 |
}; |
}; |
467 |
|
isCOMP = false; |
468 |
isCOMP = 0; |
isFULL = false; |
469 |
isFULL = 0; |
isRAW = false; |
470 |
isRAW = 0; |
if ( ce->stwerr[se] & (1 << 16) ) isCOMP = true; |
471 |
if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1; |
if ( ce->stwerr[se] & (1 << 17) ) isFULL = true; |
472 |
if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1; |
if ( ce->stwerr[se] & (1 << 3) ) isRAW = true; |
|
if ( ce->stwerr[se] & (1 << 3) ) isRAW = 1; |
|
473 |
bl = -1; |
bl = -1; |
474 |
for (Int_t kk = 0; kk < 96 ; kk++ ){ |
for (Int_t kk = 0; kk < 96 ; kk++ ){ |
475 |
if ( kk%16 == 0 ){ |
if ( kk%16 == 0 ){ |
511 |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
512 |
}; |
}; |
513 |
lver[se][2]++ ; |
lver[se][2]++ ; |
514 |
|
sighandler(headc,obt,i,se,nevents,evdone); |
515 |
|
printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); |
516 |
}; |
}; |
517 |
} |
} |
518 |
// |
// |
556 |
indexyc++; |
indexyc++; |
557 |
}; |
}; |
558 |
// |
// |
559 |
if (ce->dexyc[l][ii][kk] < 0 ) ver[se][21]++ ; |
if (ce->dexyc[l][ii][kk] < 0 ){ |
560 |
|
ver[se][21]++ ; |
561 |
|
sighandler(headc,obt,i,se,nevents,evdone); |
562 |
|
printf(" negative ADC values!! ce->dexyc[%i][%i][%i] = %f \n",l,ii,kk,ce->dexyc[l][ii][kk]); |
563 |
|
}; |
564 |
// |
// |
565 |
if ( allbase == 0. || allbase > 32000.) { |
if ( allbase == 0. || allbase > 32000.) { |
566 |
fcheck = 0; |
fcheck = 0; |
586 |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
587 |
}; |
}; |
588 |
lver[se][2]++ ; |
lver[se][2]++ ; |
589 |
|
sighandler(headc,obt,i,se,nevents,evdone); |
590 |
|
printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); |
591 |
}; |
}; |
592 |
}; |
}; |
593 |
if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) { |
if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) { |
606 |
}; |
}; |
607 |
cshit = 0; |
cshit = 0; |
608 |
for (Int_t k = 0; k < 4 ; k++ ){ |
for (Int_t k = 0; k < 4 ; k++ ){ |
609 |
isCOMP = 0; |
isCOMP = false; |
610 |
isFULL = 0; |
isFULL = false; |
611 |
if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1; |
cestw=0; |
612 |
if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1; |
if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ; |
613 |
|
if ( ce->stwerr[k] & (1 << 16) && !(cestw & (1 << 3)) ) isCOMP = true; |
614 |
|
if ( ce->stwerr[k] & (1 << 17) && !(cestw & (1 << 3)) ) isFULL = true; |
615 |
|
// |
616 |
if ( isCOMP ) ver[k][16]++; |
if ( isCOMP ) ver[k][16]++; |
617 |
if ( isFULL ) ver[k][17]++; |
if ( isFULL ) ver[k][17]++; |
618 |
cshit += (int)ce->calstriphit[k]; |
cshit += (int)ce->calstriphit[k]; |
|
cestw=0; |
|
|
if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ; |
|
619 |
if ( cestw ){ |
if ( cestw ){ |
620 |
if ( cestw & (1 << 0) ) ver[k][6]++ ; |
if ( cestw & (1 << 0) ){ |
621 |
if ( cestw & (1 << 1) ) ver[k][5]++ ; |
ver[k][6]++ ; |
622 |
if ( cestw & (1 << 2) ) ver[k][4]++ ; |
sighandler(headc,obt,i,k,nevents,evdone); |
623 |
if ( cestw & (1 << 3) ) ver[k][3]++ ; |
printf(" CRC error (st. word) \n"); |
624 |
|
}; |
625 |
|
if ( cestw & (1 << 1) ){ |
626 |
|
ver[k][5]++ ; |
627 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
628 |
|
printf(" execution error \n"); |
629 |
|
}; |
630 |
|
if ( cestw & (1 << 2) ){ |
631 |
|
ver[k][4]++ ; |
632 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
633 |
|
printf(" CMD length error \n"); |
634 |
|
}; |
635 |
|
if ( cestw & (1 << 3) ) ver[k][3]++ ; // raw mode |
636 |
if ( cestw & (1 << 4) ){ |
if ( cestw & (1 << 4) ){ |
637 |
ver[k][2]++ ; |
ver[k][2]++ ; |
638 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
639 |
|
printf(" latch up alarm (st. word)\n"); |
640 |
lupstw[k]->Fill(obt); |
lupstw[k]->Fill(obt); |
641 |
if ( swfirstobt[k] ) swminobt[k] = obt; |
if ( swfirstobt[k] ) swminobt[k] = obt; |
642 |
if ( obt > swmaxobt[k] ) swmaxobt[k] = obt; |
if ( obt > swmaxobt[k] ) swmaxobt[k] = obt; |
643 |
}; |
}; |
644 |
if ( cestw & (1 << 5) ) ver[k][1]++ ; |
if ( cestw & (1 << 5) ){ |
645 |
if ( cestw & (1 << 6) ) ver[k][0]++ ; |
ver[k][1]++ ; |
646 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
647 |
|
printf(" temperature alarm \n"); |
648 |
|
}; |
649 |
|
if ( cestw & (1 << 6) ){ |
650 |
|
ver[k][0]++ ; |
651 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
652 |
|
printf(" DSP ack error \n"); |
653 |
|
}; |
654 |
}; |
}; |
655 |
|
if ( ce->stwerr[k] == 0 && ce->perror[k] == 0 ) ver[k][8]++ ; |
656 |
if ( ce->perror[k] != 0. ){ |
if ( ce->perror[k] != 0. ){ |
657 |
if (ce->perror[k] == 128) ver[k][7]++ ; |
if (ce->perror[k] == 128){ |
658 |
if (ce->perror[k] == 129) ver[k][8]++ ; |
ver[k][7]++ ; |
659 |
if (ce->perror[k] == 132) ver[k][11]++ ; |
sighandler(headc,obt,i,k,nevents,evdone); |
660 |
if (ce->perror[k] == 133) ver[k][12]++ ; |
printf(" view or command not recognized \n"); |
661 |
if (ce->perror[k] == 134) ver[k][13]++ ; |
}; |
662 |
if (ce->perror[k] == 135) ver[k][14]++ ; |
if (ce->perror[k] == 129){ |
663 |
if (ce->perror[k] == 136) ver[k][15]++ ; |
ver[k][8]++ ; |
664 |
if (ce->perror[k] == 139) ver[k][18]++ ; |
sighandler(headc,obt,i,k,nevents,evdone); |
665 |
if (ce->perror[k] == 140) ver[k][19]++ ; |
printf(" missing section \n"); |
666 |
if (ce->perror[k] == 141) ver[k][20]++ ; |
}; |
667 |
if (ce->perror[k] == 142) ver[k][22]++ ; |
if (ce->perror[k] == 132){ |
668 |
|
ver[k][11]++ ; |
669 |
|
if ( ver[k][11] < 30 ){ |
670 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
671 |
|
printf(" CRC error (data) \n"); |
672 |
|
}; |
673 |
|
if ( ver[k][11] == 30 ){ |
674 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
675 |
|
printf(" CRC error (data) \n"); |
676 |
|
printf(" WARNING TOO MANY CRC ERRORS ON DATA FOR THIS SECTION \n"); |
677 |
|
printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); |
678 |
|
}; |
679 |
|
}; |
680 |
|
if (ce->perror[k] == 133){ |
681 |
|
ver[k][12]++ ; |
682 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
683 |
|
printf(" length problems in RAW mode \n"); |
684 |
|
}; |
685 |
|
if (ce->perror[k] == 134){ |
686 |
|
ver[k][13]++ ; |
687 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
688 |
|
printf(" length problems in COMPRESS mode \n"); |
689 |
|
}; |
690 |
|
if (ce->perror[k] == 135){ |
691 |
|
ver[k][14]++ ; |
692 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
693 |
|
printf(" length problems in FULL mode \n"); |
694 |
|
}; |
695 |
|
if (ce->perror[k] == 136){ |
696 |
|
ver[k][15]++ ; |
697 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
698 |
|
printf(" acquisition mode problems \n"); |
699 |
|
}; |
700 |
|
if (ce->perror[k] == 139){ |
701 |
|
ver[k][18]++ ; |
702 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
703 |
|
printf(" problems with coding\n"); |
704 |
|
}; |
705 |
|
if (ce->perror[k] == 140){ |
706 |
|
ver[k][19]++ ; |
707 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
708 |
|
printf(" pedestal checksum wrong\n"); |
709 |
|
}; |
710 |
|
if (ce->perror[k] == 141){ |
711 |
|
ver[k][20]++ ; |
712 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
713 |
|
printf(" thresholds checksum wrong\n"); |
714 |
|
}; |
715 |
|
if (ce->perror[k] == 142){ |
716 |
|
ver[k][22]++ ; |
717 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
718 |
|
printf(" packet length is zero (YODA input error), skipped\n"); |
719 |
|
}; |
720 |
}; |
}; |
721 |
for (Int_t kk = 0; kk < 11 ; kk++ ){ |
for (Int_t kk = 0; kk < 11 ; kk++ ){ |
722 |
tshit += shit[k][kk]; |
tshit += shit[k][kk]; |
749 |
h1rin++; |
h1rin++; |
750 |
}; |
}; |
751 |
}; |
}; |
752 |
if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000); |
// if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000); |
753 |
i++; |
i++; |
754 |
}; |
}; |
755 |
printf("\n"); |
printf("\n"); |
756 |
|
printf("\n end processing. \n\n"); |
757 |
if ( (float)h1rout/((float)h1rin+(float)h1rout) > h1rth ){ |
if ( (float)h1rout/((float)h1rin+(float)h1rout) > h1rth ){ |
758 |
h1rcheck = true; |
h1rcheck = true; |
759 |
}; |
}; |
1302 |
pad2->Draw(); |
pad2->Draw(); |
1303 |
pad3->Draw(); |
pad3->Draw(); |
1304 |
pad4->Draw(); |
pad4->Draw(); |
1305 |
|
// |
1306 |
|
Bool_t redevent = true; |
1307 |
|
// |
1308 |
|
if ( ver[0][3]+ver[0][16]+ver[0][17] == ver[1][3]+ver[1][16]+ver[1][17] && ver[1][3]+ver[1][16]+ver[1][17] == ver[2][3]+ver[2][16]+ver[2][17] && ver[2][3]+ver[2][16]+ver[2][17] == ver[3][3]+ver[3][16]+ver[3][17] ){ |
1309 |
|
redevent = false; |
1310 |
|
}; |
1311 |
|
if ( redevent ) check = true; |
1312 |
|
// |
1313 |
for (Int_t i = 0; i < 4; i++){ |
for (Int_t i = 0; i < 4; i++){ |
1314 |
if (i == 2) |
if (i == 2) |
1315 |
{ |
{ |
1396 |
errore.str(""); |
errore.str(""); |
1397 |
errore << "RAW mode: " << ver[i][j]; |
errore << "RAW mode: " << ver[i][j]; |
1398 |
errore << " time(s)"; |
errore << " time(s)"; |
1399 |
t->SetTextColor(32); |
if ( !redevent ) t->SetTextColor(32); |
1400 |
t->DrawLatex(2.,90.,errore.str().c_str()); |
t->DrawLatex(2.,90.,errore.str().c_str()); |
1401 |
} |
} |
1402 |
if (j == 4) { |
if (j == 4) { |
1439 |
errore << "Calevnum jump: " << ver[i][j]; |
errore << "Calevnum jump: " << ver[i][j]; |
1440 |
errore << " time(s)"; |
errore << " time(s)"; |
1441 |
t->DrawLatex(2.,42.,errore.str().c_str()); |
t->DrawLatex(2.,42.,errore.str().c_str()); |
1442 |
check = true; |
if ( ver[i][j] > 3 ) check = true; |
1443 |
} |
} |
1444 |
if (j == 11) { |
if (j == 11) { |
1445 |
errore.str(""); |
errore.str(""); |
1480 |
errore.str(""); |
errore.str(""); |
1481 |
errore << "COMPRESS mode: " << ver[i][j]; |
errore << "COMPRESS mode: " << ver[i][j]; |
1482 |
errore << " time(s)"; |
errore << " time(s)"; |
1483 |
t->SetTextColor(32); |
if ( !redevent ) t->SetTextColor(32); |
1484 |
t->DrawLatex(2.,86.,errore.str().c_str()); |
t->DrawLatex(2.,86.,errore.str().c_str()); |
1485 |
} |
} |
1486 |
if (j == 17) { |
if (j == 17) { |
1487 |
errore.str(""); |
errore.str(""); |
1488 |
errore << "FULL mode: " << ver[i][j]; |
errore << "FULL mode: " << ver[i][j]; |
1489 |
errore << " time(s)"; |
errore << " time(s)"; |
1490 |
t->SetTextColor(32); |
if ( !redevent ) t->SetTextColor(32); |
1491 |
t->DrawLatex(2.,82.,errore.str().c_str()); |
t->DrawLatex(2.,82.,errore.str().c_str()); |
1492 |
} |
} |
1493 |
if (j == 18) { |
if (j == 18) { |