--- calo/flight/FQLOOK/macros/FCaloQLOOK.cxx 2006/09/22 13:38:58 1.15 +++ calo/flight/FQLOOK/macros/FCaloQLOOK.cxx 2006/09/29 06:22:43 1.18 @@ -1,12 +1,16 @@ // // Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti // -// FCaloQLOOK.c version 1.12 (2006-09-22) +// FCaloQLOOK.c version 1.14 (2006-09-29) // // The only input needed is the path to the directory created by YODA for the data file you want to analyze. // // Changelog: // +// 1.13 - 1.14 (2006-09-29): Flag the last entry in the txt file, count missing section when checking for DSP entries correspondence. +// +// 1.12 - 1.13 (2006-09-28): Give wrong number of events in compress mode, fixed. +// // 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. // // 1.09 - 1.11 (2006-07-17): Adapted to flight conditions. @@ -94,6 +98,7 @@ printf("PSCU-Pkt N. %u - OBT %u ms\n",pkt_num,obt); printf("Total events %u\n",totev); printf("(ROOT-tree entry %u )\n",entry); + if ( (totev-1) == entry ) printf("NOTICE: this is last entry! \n"); printf("=================================================\n"); evdone = true; }; @@ -304,9 +309,9 @@ Int_t pdone, bdone; pdone = 0; bdone = 0; - bool isCOMP = 0; - bool isFULL = 0; - bool isRAW = 0; + bool isCOMP = false; + bool isFULL = false; + bool isRAW = false; Int_t alldexy=0; Int_t alldexy2=0; Int_t planebases=0; @@ -461,14 +466,13 @@ se = 1; pl = (ii-1)/2; pdone = 0; - }; - - isCOMP = 0; - isFULL = 0; - isRAW = 0; - if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1; - if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1; - if ( ce->stwerr[se] & (1 << 3) ) isRAW = 1; + }; + isCOMP = false; + isFULL = false; + isRAW = false; + if ( ce->stwerr[se] & (1 << 16) ) isCOMP = true; + if ( ce->stwerr[se] & (1 << 17) ) isFULL = true; + if ( ce->stwerr[se] & (1 << 3) ) isRAW = true; bl = -1; for (Int_t kk = 0; kk < 96 ; kk++ ){ if ( kk%16 == 0 ){ @@ -605,15 +609,16 @@ }; cshit = 0; for (Int_t k = 0; k < 4 ; k++ ){ - isCOMP = 0; - isFULL = 0; - if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1; - if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1; + isCOMP = false; + isFULL = false; + cestw=0; + if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ; + if ( ce->stwerr[k] & (1 << 16) && !(cestw & (1 << 3)) ) isCOMP = true; + if ( ce->stwerr[k] & (1 << 17) && !(cestw & (1 << 3)) ) isFULL = true; + // if ( isCOMP ) ver[k][16]++; if ( isFULL ) ver[k][17]++; cshit += (int)ce->calstriphit[k]; - cestw=0; - if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ; if ( cestw ){ if ( cestw & (1 << 0) ){ ver[k][6]++ ; @@ -1303,7 +1308,7 @@ // Bool_t redevent = true; // - 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] ){ + if ( ver[0][3]+ver[0][16]+ver[0][17]+ver[0][8] == ver[1][3]+ver[1][16]+ver[1][17]+ver[1][8] && ver[1][3]+ver[1][16]+ver[1][17]+ver[1][8] == ver[2][3]+ver[2][16]+ver[2][17]+ver[2][8] && ver[2][3]+ver[2][16]+ver[2][17]+ver[2][8] == ver[3][3]+ver[3][16]+ver[3][17]+ver[3][8] ){ redevent = false; }; if ( redevent ) check = true; @@ -1437,7 +1442,7 @@ errore << "Calevnum jump: " << ver[i][j]; errore << " time(s)"; t->DrawLatex(2.,42.,errore.str().c_str()); - check = true; + if ( ver[i][j] > 3 ) check = true; } if (j == 11) { errore.str("");