--- calo/flight/FQLOOK/macros/FCaloQLOOK.cxx 2007/01/26 12:27:10 1.20 +++ calo/flight/FQLOOK/macros/FCaloQLOOK.cxx 2014/01/17 15:10:29 1.25 @@ -36,10 +36,12 @@ // #include #include +#include // #include #include #include +#include #include #include #include @@ -55,6 +57,8 @@ #include // #include +#include +#include // using namespace std; // @@ -191,7 +195,7 @@ return; }; Int_t const size = nevents; - Double_t iev2[size+1]; + // Double_t iev2[size+1]; //aumentata la lunghezza di ver, prima era 23 Int_t ver[4][24], lver[4][23],shit[4][11], rshit[4][11], se,bl, pl, fulldiff[4],cshit, cpre[4],nullsh[4][11], lalarm[4]; se = 0; @@ -200,9 +204,9 @@ Int_t tshit, trshit, compdata,rawdata, errorfull, calevn1, calevn2, calevn3, calevn4, pshit[4][11]; tshit = 0; trshit = 0; - char *sezione; + const char *sezione = ""; Bool_t check = false; - sezione = ""; + // sezione = ""; stringstream errore; errore.str(""); // @@ -383,7 +387,7 @@ trshit = 0; tr->GetEntry(i); - iev2[i] = ce->iev; + // iev2[i] = ce->iev; // ph = eh->GetPscuHeader(); headco = headc; @@ -520,14 +524,22 @@ if ( obt > maxobt[se] ) maxobt[se] = obt; }; lver[se][2]++ ; - sighandler(headc,obt,i,se,nevents,evdone); - printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); + if ( lver[se][2] == 1000 ){ + sighandler(headc,obt,i,se,nevents,evdone); + printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); + printf(" WARNING TOO MANY LATCHUP ERRORS ON DATA FOR THIS SECTION \n"); + printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); + }; + if ( lver[se][2] < 1000 ){ + sighandler(headc,obt,i,se,nevents,evdone); + printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); + }; }; } // if ( !bdone ){ Baseline->Fill(ce->base[l][ii][bl]); - if ( ce->base[l][ii][bl] > 2000. && ce->base[l][ii][bl] < 4500. ){ + if ( ce->base[l][ii][bl] > 2000. && ce->base[l][ii][bl] < 5500. ){ inbase++; } else { outbase++; @@ -595,8 +607,16 @@ if ( obt > maxobt[se] ) maxobt[se] = obt; }; lver[se][2]++ ; - sighandler(headc,obt,i,se,nevents,evdone); - printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); + if ( lver[se][2] == 1000 ){ + sighandler(headc,obt,i,se,nevents,evdone); + printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); + printf(" WARNING TOO MANY LATCHUP ERRORS ON DATA FOR THIS SECTION \n"); + printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); + }; + if ( lver[se][2] < 1000 ){ + sighandler(headc,obt,i,se,nevents,evdone); + printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); + }; }; }; if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) { @@ -644,8 +664,16 @@ if ( cestw & (1 << 3) ) ver[k][3]++ ; // raw mode if ( cestw & (1 << 4) ){ ver[k][2]++ ; - sighandler(headc,obt,i,k,nevents,evdone); - printf(" latch up alarm (st. word)\n"); + if ( ver[k][2] == 1000 ){ + sighandler(headc,obt,i,k,nevents,evdone); + printf(" latch up alarm (st. word)\n"); + printf(" WARNING TOO MANY LATCHUP ERRORS ON DATA FOR THIS SECTION \n"); + printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); + }; + if ( ver[k][2] < 1000 ){ + sighandler(headc,obt,i,k,nevents,evdone); + printf(" latch up alarm (st. word)\n"); + }; lupstw[k]->Fill(obt); if ( swfirstobt[k] ) swminobt[k] = obt; if ( obt > swmaxobt[k] ) swmaxobt[k] = obt; @@ -1080,7 +1108,7 @@ Baseline->SetYTitle("Number of events"); Baseline->Draw(); h1max = Baseline->GetMaximum()*1.05; - Double_t xc[4] = {2000.,4500.,4500.,2000.}; + Double_t xc[4] = {2000.,5500.,5500.,2000.}; Double_t yc[4] = {0.,0.,h1max,h1max}; banda1 = new TPolyLine(4,xc,yc); banda1->SetLineColor(5);