/[PAMELA software]/calo/flight/FQLOOK/macros/FCaloQLOOK.cxx
ViewVC logotype

Diff of /calo/flight/FQLOOK/macros/FCaloQLOOK.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mocchiut, Mon May 29 09:38:26 2006 UTC revision 1.18 by mocchiut, Fri Sep 29 06:22:43 2006 UTC
# Line 1  Line 1 
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.08  (2006-05-29)  //   FCaloQLOOK.c      version 1.14  (2006-09-29)
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.07 - 1.08 (2006-05-29): Fixed bug in output filename when input is not in the form DW_YYMMDD_NNN.  //   1.13 - 1.14 (2006-09-29): Flag the last entry in the txt file, count missing section when checking for DSP entries correspondence.
11    //
12    //   1.12 - 1.13 (2006-09-28): Give wrong number of events in compress mode, fixed.
13    //
14    //   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.
15    //
16    //   1.09 - 1.11 (2006-07-17): Adapted to flight conditions.
17    //
18    //   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.
19  //  //
20  //   1.06 - 1.07 (2006-05-23): Don't print warning in case of latchup not recognized from the status word, fixed. Added "expert" figures from 21 to 28 which appears only in the  //   1.06 - 1.07 (2006-05-23): Don't print warning in case of latchup not recognized from the status word, fixed. Added "expert" figures from 21 to 28 which appears only in the
21  //                             case of latchup alarm.  //                             case of latchup alarm.
# Line 41  Line 49 
49  #include <TPolyLine.h>  #include <TPolyLine.h>
50  #include <TStyle.h>  #include <TStyle.h>
51  #include <TSystem.h>  #include <TSystem.h>
52    #include <TApplication.h>
53  //  //
54  #include <PamelaRun.h>  #include <PamelaRun.h>
55  #include <physics/calorimeter/CalorimeterEvent.h>  #include <physics/calorimeter/CalorimeterEvent.h>
# Line 83  TString getFilename(const TString filena Line 92  TString getFilename(const TString filena
92    return file2;    return file2;
93  }  }
94    
95  void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "ps"){  void sighandler(UInt_t pkt_num, UInt_t obt, UInt_t entry, UInt_t section, UInt_t totev, Bool_t &evdone){
96      if ( !evdone ){    
97        printf("\n\n=================================================\n");
98        printf("PSCU-Pkt N. %u - OBT %u ms\n",pkt_num,obt);
99        printf("Total events %u\n",totev);
100        printf("(ROOT-tree entry %u )\n",entry);
101        if ( (totev-1) == entry ) printf("NOTICE: this is last entry! \n");
102        printf("=================================================\n");
103        evdone = true;
104      };
105      TString sec = "UNKNOWN";
106      if ( section == 0 ) sec = "XE";
107      if ( section == 1 ) sec = "XO";
108      if ( section == 2 ) sec = "YE";
109      if ( section == 3 ) sec = "YO";
110      printf(" Section %s (DSP n. %i) message: ",sec.Data(),section);
111    };
112    
113    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){
114    gStyle->SetPaperSize(19.,25.);    gStyle->SetPaperSize(19.,25.);
115    const char* startingdir = gSystem->WorkingDirectory();    const char* startingdir = gSystem->WorkingDirectory();
116    //  printf(" basename is %s \n",gSystem->BaseName(filename.Data()));    //  printf(" basename is %s \n",gSystem->BaseName(filename.Data()));
117    //  printf(" getfilename is %s \n",getFilename(filename).Data());    //  printf(" getfilename is %s \n",getFilename(filename).Data());
118    if ( !strcmp(outDir.Data(),"") ) outDir = startingdir;    if ( !strcmp(outDir.Data(),"") ) outDir = startingdir;
119    //    //
120      TApplication *app = 0;
121      if ( iactive ) app = new TApplication("app",0,0);
122    //    //
123    ifstream myfile;    ifstream myfile;
124    myfile.open(filename.Data());    myfile.open(filename.Data());
# Line 112  void FCaloQLOOK(TString filename, Int_t Line 141  void FCaloQLOOK(TString filename, Int_t
141    Float_t ctshitthr = 0.65;    Float_t ctshitthr = 0.65;
142    Float_t cbasethr = 0.95;    Float_t cbasethr = 0.95;
143    Float_t cdexythr = 0.995;    Float_t cdexythr = 0.995;
144      //Float_t cdexythr = 0.90;
145    Float_t cdexycthr = 0.95;    Float_t cdexycthr = 0.95;
146      Float_t h1rth = 0.90;
147      Int_t calevnth = 13;
148    //    //
149    pamela::calorimeter::CalorimeterEvent *ce = 0;    pamela::calorimeter::CalorimeterEvent *ce = 0;
150    pamela::EventHeader *eh = 0;    pamela::EventHeader *eh = 0;
# Line 198  void FCaloQLOOK(TString filename, Int_t Line 230  void FCaloQLOOK(TString filename, Int_t
230    hdiff->SetBit(TH1F::kCanRebin);    hdiff->SetBit(TH1F::kCanRebin);
231    Baseline = new TH1F("C9","baselines",100,0,3);    Baseline = new TH1F("C9","baselines",100,0,3);
232    Baseline->SetBit(TH1F::kCanRebin);    Baseline->SetBit(TH1F::kCanRebin);
233    Dexy = new TH1F("C12","dexy",100,0.,37000.);    Dexy = new TH1F("C12","dexy",100,0.,10000.);
234    Dexyc = new TH1F("C10","dexyc",100,0,3);    Dexy->SetBit(TH1F::kCanRebin);
235    Dexyc->SetBit(TH1F::kCanRebin);    Dexyc = new TH1F("C10","dexyc",100,-100.,37000.);
236    //  Dexyc->SetBit(TH1F::kCanRebin);
237    Calstriphit = new TH1F("C11","calstriphit[1:4]",100,0.,200.);    Calstriphit = new TH1F("C11","calstriphit[1:4]",100,0.,200.);
238            
239    calev01 = new TH1F("C3","|calevnum(1)-calevnum(2)|",100,0,1);    calev01 = new TH1F("C3","|calevnum(1)-calevnum(2)|",100,0,1);
# Line 276  void FCaloQLOOK(TString filename, Int_t Line 309  void FCaloQLOOK(TString filename, Int_t
309    Int_t pdone, bdone;    Int_t pdone, bdone;
310    pdone = 0;    pdone = 0;
311    bdone = 0;    bdone = 0;
312    bool isCOMP = 0;    bool isCOMP = false;
313    bool isFULL = 0;    bool isFULL = false;
314    bool isRAW = 0;    bool isRAW = false;
315    Int_t alldexy=0;    Int_t alldexy=0;
316    Int_t alldexy2=0;    Int_t alldexy2=0;
317    Int_t stri=0;    Int_t planebases=0;
318      //  Int_t stri=0;
319    Int_t fcheck = 0;    Int_t fcheck = 0;
320    Int_t cestw=0;    Int_t cestw=0;
321    Int_t cmask = 127 ;    Int_t cmask = 127 ;
# Line 296  void FCaloQLOOK(TString filename, Int_t Line 330  void FCaloQLOOK(TString filename, Int_t
330    fulldiff[1] = 0;    fulldiff[1] = 0;
331    fulldiff[2] = 0;    fulldiff[2] = 0;
332    fulldiff[3] = 0;      fulldiff[3] = 0;  
333    printf("\n Processed events: \n\n");    //  printf("\n Processed events: \n\n");
334      printf("\n Start processing: \n\n");
335    unsigned short int calev0=0;    unsigned short int calev0=0;
336    unsigned short int oldcalev0;    unsigned short int oldcalev0;
337    unsigned short int calev1=0;    unsigned short int calev1=0;
# Line 306  void FCaloQLOOK(TString filename, Int_t Line 341  void FCaloQLOOK(TString filename, Int_t
341    unsigned short int calev3=0;    unsigned short int calev3=0;
342    unsigned short int oldcalev3;    unsigned short int oldcalev3;
343    Int_t i = minevent;    Int_t i = minevent;
344    Float_t headc = 0.;    UInt_t headc = 0;
345    Float_t headco = 0.;    UInt_t headco = 0;
346    Bool_t h1rcheck = false;    Bool_t h1rcheck = false;
347      Int_t h1rin = 0;
348      Int_t h1rout = 0;
349    Int_t intshit = 0;    Int_t intshit = 0;
350    Int_t outtshit = 0;    Int_t outtshit = 0;
351    Int_t incshit = 0;    Int_t incshit = 0;
# Line 319  void FCaloQLOOK(TString filename, Int_t Line 356  void FCaloQLOOK(TString filename, Int_t
356    Int_t outdexy = 0;    Int_t outdexy = 0;
357    Int_t indexyc = 0;    Int_t indexyc = 0;
358    Int_t outdexyc = 0;    Int_t outdexyc = 0;
359    Int_t obt = 0;    UInt_t obt = 0;
360    Int_t minobt[4];    UInt_t minobt[4];
361    Int_t maxobt[4];    UInt_t maxobt[4];
362    Int_t swminobt[4];    UInt_t swminobt[4];
363    Int_t swmaxobt[4];    UInt_t swmaxobt[4];
364    Bool_t firstobt[4];    Bool_t firstobt[4];
365    Bool_t swfirstobt[4];    Bool_t swfirstobt[4];
366    for ( Int_t i = 0; i<4; i++){    for ( Int_t i = 0; i<4; i++){
# Line 334  void FCaloQLOOK(TString filename, Int_t Line 371  void FCaloQLOOK(TString filename, Int_t
371      firstobt[i] = true;      firstobt[i] = true;
372      swfirstobt[i] = true;      swfirstobt[i] = true;
373    };    };
374      Bool_t evdone = false;
375      //
376    while ( i < maxevent+1){    while ( i < maxevent+1){
377        evdone = false;
378      tshit = 0;      tshit = 0;
379      trshit = 0;      trshit = 0;
380      tr->GetEntry(i);      tr->GetEntry(i);
# Line 344  void FCaloQLOOK(TString filename, Int_t Line 384  void FCaloQLOOK(TString filename, Int_t
384      headco = headc;      headco = headc;
385      headc = ph->GetCounter();      headc = ph->GetCounter();
386      obt = ph->GetOrbitalTime();      obt = ph->GetOrbitalTime();
387      calevn1 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[1]));      if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])) ) calevn1++;
388      calevn2 += (int)abs((int)(ce->calevnum[2]-ce->calevnum[3]));      if ( (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])) ) calevn2++;
389      calevn3 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[3]));      if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])) ) calevn3++;
390      calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1])));      calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1])));
391      calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3])));      calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3])));
392      calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3])));      calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3])));
# Line 361  void FCaloQLOOK(TString filename, Int_t Line 401  void FCaloQLOOK(TString filename, Int_t
401      calevv2 = (int)ce->calevnum[2];      calevv2 = (int)ce->calevnum[2];
402      oldcalev3 = calev3;      oldcalev3 = calev3;
403      calev3 = (int)ce->calevnum[3];      calev3 = (int)ce->calevnum[3];
404      goto jumpprintout;      //    goto jumpprintout;
405      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) ){
406        if ( i != minevent ) {        if ( i != minevent ) {
407          printf(" %f 0 Event %i: %i\n",headco,i,oldcalev0);  //      printf(" %f 0 Event %i: %i\n",headco,i,oldcalev0);
408          printf(" %f 0 Event %i: %i\n",headc,i+1,calev0);            //      printf(" %f 0 Event %i: %i\n",headc,i+1,calev0);          
409          printf(" %f 1 Event %i: %i\n",headco,i,oldcalev1);  //      printf(" %f 1 Event %i: %i\n",headco,i,oldcalev1);
410          printf(" %f 1 Event %i: %i\n",headc,i+1,calev1);            //      printf(" %f 1 Event %i: %i\n",headc,i+1,calev1);          
411          printf(" %f 2 Event %i: %i\n",headco,i,oldcalev2);  //      printf(" %f 2 Event %i: %i\n",headco,i,oldcalev2);
412          printf(" %f 2 Event %i: %i\n",headc,i+1,calevv2);            //      printf(" %f 2 Event %i: %i\n",headc,i+1,calevv2);          
413          printf(" %f 3 Event %i: %i\n",headco,i,oldcalev3);  //      printf(" %f 3 Event %i: %i\n",headco,i,oldcalev3);
414          printf(" %f 3 Event %i: %i\n",headc,i+1,calev3);          //      printf(" %f 3 Event %i: %i\n",headc,i+1,calev3);        
415          isRAW = 0;          isRAW = 0;
416          if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;                  if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;        
417          if ( (calev0 - oldcalev0 - 1) > 0 && !isRAW && ce->perror[0] != 129 && oldcalev0 != 0) {          if ( (calev0 - oldcalev0 - 1) > 0 && !isRAW && ce->perror[0] != 129 && oldcalev0 != 0) {
418            ver[0][10]++;            ver[0][10]++;
419              sighandler(headc,obt,i,0,nevents,evdone);
420              printf(" jump in the counter calev is %i oldcalev was %i \n",calev0,oldcalev0);
421          };          };
422          isRAW = 0;          isRAW = 0;
423          if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;                  if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;        
424          if ( (calev1 - oldcalev1 - 1) > 0 && !isRAW && ce->perror[1] != 129 && oldcalev1 != 0 ){          if ( (calev1 - oldcalev1 - 1) > 0 && !isRAW && ce->perror[1] != 129 && oldcalev1 != 0 ){
425            ver[1][10]++;            ver[1][10]++;
426              sighandler(headc,obt,i,1,nevents,evdone);
427              printf(" jump in the counter calev is %i oldcalev was %i \n",calev1,oldcalev1);
428          };          };
429          isRAW = 0;          isRAW = 0;
430          if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;                  if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;        
431          if ( (calevv2 - oldcalev2 - 1) > 0 && !isRAW && ce->perror[2] != 129 && oldcalev2 != 0 ){          if ( (calevv2 - oldcalev2 - 1) > 0 && !isRAW && ce->perror[2] != 129 && oldcalev2 != 0 ){
432            ver[2][10]++;            ver[2][10]++;
433              sighandler(headc,obt,i,2,nevents,evdone);
434              printf(" jump in the counter calev is %i oldcalev was %i \n",calevv2,oldcalev2);
435          };          };
436          isRAW = 0;          isRAW = 0;
437          if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;                  if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;        
438          if ( (calev3 - oldcalev3 - 1) > 0 && !isRAW && ce->perror[3] != 129 && oldcalev3 != 0 ){          if ( (calev3 - oldcalev3 - 1) > 0 && !isRAW && ce->perror[3] != 129 && oldcalev3 != 0 ){
439            ver[3][10]++;            ver[3][10]++;
440              sighandler(headc,obt,i,3,nevents,evdone);
441              printf(" jump in the counter calev is %i oldcalev was %i \n",calev3,oldcalev3);
442          };          };
443        }        }
444      };      };
445    jumpprintout:      //  jumpprintout:
446      memcpy(shit, nullsh, sizeof(nullsh));      memcpy(shit, nullsh, sizeof(nullsh));
447      memcpy(rshit, nullsh, sizeof(nullsh));      memcpy(rshit, nullsh, sizeof(nullsh));
448      for (Int_t l = 0; l < 2; l++ ){      for (Int_t l = 0; l < 2; l++ ){
# Line 418  void FCaloQLOOK(TString filename, Int_t Line 466  void FCaloQLOOK(TString filename, Int_t
466            se = 1;            se = 1;
467            pl = (ii-1)/2;            pl = (ii-1)/2;
468            pdone = 0;            pdone = 0;
469          };          };              
470                            isCOMP = false;
471          isCOMP = 0;          isFULL = false;
472          isFULL = 0;          isRAW = false;
473          isRAW = 0;          if ( ce->stwerr[se] & (1 << 16) ) isCOMP = true;
474          if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1;          if ( ce->stwerr[se] & (1 << 17) ) isFULL = true;
475          if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1;          if ( ce->stwerr[se] & (1 << 3) ) isRAW = true;
         if ( ce->stwerr[se] & (1 << 3) ) isRAW = 1;  
476          bl = -1;          bl = -1;
477          for (Int_t kk = 0; kk < 96 ; kk++ ){          for (Int_t kk = 0; kk < 96 ; kk++ ){
478            if ( kk%16 == 0 ){            if ( kk%16 == 0 ){
479              bdone = 0;              bdone = 0;
480              bl++;              bl++;
481              allbase = ce->base[l][ii][bl];              allbase = ce->base[l][ii][bl];
482                //      alldexy=0;
483                //      alldexy2=0;
484                //      stri=0;
485                //      for (Int_t e = 0; e < 16 ; e++ ){
486                //        stri = e + 16 * bl;
487                //        alldexy += (int)ce->dexyc[l][ii][stri];
488                //        alldexy2 += (int)ce->dexy[l][ii][stri];
489                //      };
490              };
491              //
492              if ( kk == 0 ){
493                planebases = 0;
494              alldexy=0;              alldexy=0;
495              alldexy2=0;              alldexy2=0;
496              stri=0;              for (Int_t e = 0; e < 96 ; e++ ){
497              for (Int_t e = 0; e < 16 ; e++ ){                if ( e < 6 ) planebases += (int)ce->base[l][ii][e];
498                stri = e + 16 * bl;                alldexy += (int)ce->dexyc[l][ii][e];
499                alldexy += (int)ce->dexyc[l][ii][stri];                alldexy2 += (int)ce->dexy[l][ii][e];
               alldexy2 += (int)ce->dexy[l][ii][stri];  
500              };              };
501            };            };
502              //
503            if ( !isRAW ) {            if ( !isRAW ) {
504              //              //
505              if ( !pdone ){              if ( !pdone ){
506                if ( (ce->base[l][ii][bl]>32000 || ce->base[l][ii][bl] == 0 ) && ( alldexy > 512000 ||  alldexy == 0) && ce->perror[se] == 0 ) {                //              if ( (ce->base[l][ii][bl]>32000 || ce->base[l][ii][bl] == 0 ) && ( alldexy > 512000 ||  alldexy == 0) && ce->perror[se] == 0 ) {
507                  if ( (planebases>192000 || planebases == 0 ) && ( alldexy > 3072000 ||  alldexy == 0) && ce->perror[se] == 0 ) {
508                  pdone = 1;                  pdone = 1;
509                  pshit[se][pl]++ ;                  pshit[se][pl]++ ;
510                  if ( (ce->stwerr[se] & (1 << 4)) == 0 ) {                  if ( (ce->stwerr[se] & (1 << 4)) == 0 ) {
# Line 454  void FCaloQLOOK(TString filename, Int_t Line 514  void FCaloQLOOK(TString filename, Int_t
514                    if ( obt > maxobt[se] ) maxobt[se] = obt;                    if ( obt > maxobt[se] ) maxobt[se] = obt;
515                  };                  };
516                  lver[se][2]++ ;                          lver[se][2]++ ;        
517                    sighandler(headc,obt,i,se,nevents,evdone);
518                    printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases);
519                };                };
520              }              }
521              //              //
# Line 497  void FCaloQLOOK(TString filename, Int_t Line 559  void FCaloQLOOK(TString filename, Int_t
559                indexyc++;                                            indexyc++;                            
560              };              };
561              //              //
562              if (ce->dexyc[l][ii][kk] < 0 ) ver[se][21]++ ;              if (ce->dexyc[l][ii][kk] < 0 ){
563                  ver[se][21]++ ;
564                  sighandler(headc,obt,i,se,nevents,evdone);
565                  printf(" negative ADC values!! ce->dexyc[%i][%i][%i] = %f \n",l,ii,kk,ce->dexyc[l][ii][kk]);
566                };
567              //              //
568              if ( allbase == 0. || allbase > 32000.) {              if ( allbase == 0. || allbase > 32000.) {
569                fcheck = 0;                fcheck = 0;
# Line 512  void FCaloQLOOK(TString filename, Int_t Line 578  void FCaloQLOOK(TString filename, Int_t
578              //              //
579            } else {            } else {
580              if ( !pdone ){              if ( !pdone ){
581                if ( (alldexy2>512000 || alldexy2 == 0) && ce->perror[se] == 0 ) {                if ( ( alldexy2 > 3072000 ||  alldexy2 == 0) && ce->perror[se] == 0 ) {
582                    //            if ( (alldexy2>512000 || alldexy2 == 0) && ce->perror[se] == 0 ) {
583                  pdone = 1;                  pdone = 1;
584                  pshit[se][pl]++ ;                                          pshit[se][pl]++ ;                        
585                  if ( (ce->stwerr[se] & (1 << 4)) == 0 ){                  if ( (ce->stwerr[se] & (1 << 4)) == 0 ){
# Line 522  void FCaloQLOOK(TString filename, Int_t Line 589  void FCaloQLOOK(TString filename, Int_t
589                    if ( obt > maxobt[se] ) maxobt[se] = obt;                    if ( obt > maxobt[se] ) maxobt[se] = obt;
590                  };                  };
591                  lver[se][2]++ ;                  lver[se][2]++ ;
592                    sighandler(headc,obt,i,se,nevents,evdone);
593                    printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2);
594                };                };
595              };              };
596              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 ) {
# Line 540  void FCaloQLOOK(TString filename, Int_t Line 609  void FCaloQLOOK(TString filename, Int_t
609      };      };
610      cshit = 0;      cshit = 0;
611      for (Int_t k = 0; k < 4 ; k++ ){      for (Int_t k = 0; k < 4 ; k++ ){
612        isCOMP = 0;        isCOMP = false;
613        isFULL = 0;        isFULL = false;
614        if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1;        cestw=0;
615        if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1;        if ( ce->stwerr[k] ) cestw =  ce->stwerr[k] & cmask ;
616          if ( ce->stwerr[k] & (1 << 16) && !(cestw & (1 << 3)) ) isCOMP = true;
617          if ( ce->stwerr[k] & (1 << 17) && !(cestw & (1 << 3)) ) isFULL = true;
618          //
619        if ( isCOMP ) ver[k][16]++;        if ( isCOMP ) ver[k][16]++;
620        if ( isFULL ) ver[k][17]++;        if ( isFULL ) ver[k][17]++;
621        cshit += (int)ce->calstriphit[k];        cshit += (int)ce->calstriphit[k];
       cestw=0;  
       if ( ce->stwerr[k] ) cestw =  ce->stwerr[k] & cmask ;  
622        if ( cestw ){        if ( cestw ){
623          if ( cestw & (1 << 0) ) ver[k][6]++ ;          if ( cestw & (1 << 0) ){
624          if ( cestw & (1 << 1) ) ver[k][5]++ ;            ver[k][6]++ ;
625          if ( cestw & (1 << 2) ) ver[k][4]++ ;            sighandler(headc,obt,i,k,nevents,evdone);
626          if ( cestw & (1 << 3) ) ver[k][3]++ ;            printf(" CRC error (st. word) \n");
627            };
628            if ( cestw & (1 << 1) ){
629              ver[k][5]++ ;
630              sighandler(headc,obt,i,k,nevents,evdone);
631              printf(" execution error \n");
632            };
633            if ( cestw & (1 << 2) ){
634              ver[k][4]++ ;
635              sighandler(headc,obt,i,k,nevents,evdone);
636              printf(" CMD length error \n");
637            };
638            if ( cestw & (1 << 3) ) ver[k][3]++ ; // raw mode
639          if ( cestw & (1 << 4) ){          if ( cestw & (1 << 4) ){
640            ver[k][2]++ ;            ver[k][2]++ ;
641              sighandler(headc,obt,i,k,nevents,evdone);
642              printf(" latch up alarm (st. word)\n");
643            lupstw[k]->Fill(obt);            lupstw[k]->Fill(obt);
644            if ( swfirstobt[k] ) swminobt[k] = obt;            if ( swfirstobt[k] ) swminobt[k] = obt;
645            if ( obt > swmaxobt[k] ) swmaxobt[k] = obt;            if ( obt > swmaxobt[k] ) swmaxobt[k] = obt;
646          };          };
647          if ( cestw & (1 << 5) ) ver[k][1]++ ;          if ( cestw & (1 << 5) ){
648          if ( cestw & (1 << 6) ) ver[k][0]++ ;                      ver[k][1]++ ;
649              sighandler(headc,obt,i,k,nevents,evdone);
650              printf(" temperature alarm  \n");
651            };
652            if ( cestw & (1 << 6) ){
653              ver[k][0]++ ;        
654              sighandler(headc,obt,i,k,nevents,evdone);
655              printf(" DSP ack error \n");
656            };
657        };        };
658          if (  ce->stwerr[k] == 0 && ce->perror[k] == 0 ) ver[k][8]++ ;
659        if ( ce->perror[k] != 0. ){        if ( ce->perror[k] != 0. ){
660          if (ce->perror[k] == 128) ver[k][7]++ ;          if (ce->perror[k] == 128){
661          if (ce->perror[k] == 129) ver[k][8]++ ;            ver[k][7]++ ;
662          if (ce->perror[k] == 132) ver[k][11]++ ;            sighandler(headc,obt,i,k,nevents,evdone);
663          if (ce->perror[k] == 133) ver[k][12]++ ;            printf(" view or command not recognized \n");
664          if (ce->perror[k] == 134) ver[k][13]++ ;          };
665          if (ce->perror[k] == 135) ver[k][14]++ ;          if (ce->perror[k] == 129){
666          if (ce->perror[k] == 136) ver[k][15]++ ;            ver[k][8]++ ;
667          if (ce->perror[k] == 139) ver[k][18]++ ;            sighandler(headc,obt,i,k,nevents,evdone);
668          if (ce->perror[k] == 140) ver[k][19]++ ;            printf(" missing section \n");
669          if (ce->perror[k] == 141) ver[k][20]++ ;          };
670          if (ce->perror[k] == 142) ver[k][22]++ ;          if (ce->perror[k] == 132){
671              ver[k][11]++ ;
672              if ( ver[k][11] < 30 ){
673                sighandler(headc,obt,i,k,nevents,evdone);
674                printf(" CRC error (data) \n");
675              };
676              if ( ver[k][11] == 30 ){
677                sighandler(headc,obt,i,k,nevents,evdone);
678                printf(" CRC error (data) \n");
679                printf(" WARNING TOO MANY CRC ERRORS ON DATA FOR THIS SECTION \n");
680                printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n");
681              };
682            };
683            if (ce->perror[k] == 133){
684              ver[k][12]++ ;
685              sighandler(headc,obt,i,k,nevents,evdone);
686              printf(" length problems in RAW mode \n");
687            };
688            if (ce->perror[k] == 134){
689              ver[k][13]++ ;
690              sighandler(headc,obt,i,k,nevents,evdone);
691              printf(" length problems in COMPRESS mode \n");
692            };
693            if (ce->perror[k] == 135){
694              ver[k][14]++ ;
695              sighandler(headc,obt,i,k,nevents,evdone);
696              printf(" length problems in FULL mode \n");
697            };
698            if (ce->perror[k] == 136){
699              ver[k][15]++ ;
700              sighandler(headc,obt,i,k,nevents,evdone);
701              printf(" acquisition mode problems \n");
702            };
703            if (ce->perror[k] == 139){
704              ver[k][18]++ ;
705              sighandler(headc,obt,i,k,nevents,evdone);
706              printf(" problems with coding\n");
707            };
708            if (ce->perror[k] == 140){
709              ver[k][19]++ ;
710              sighandler(headc,obt,i,k,nevents,evdone);
711              printf(" pedestal checksum wrong\n");
712            };
713            if (ce->perror[k] == 141){
714              ver[k][20]++ ;
715              sighandler(headc,obt,i,k,nevents,evdone);
716              printf(" thresholds checksum wrong\n");
717            };
718            if (ce->perror[k] == 142){
719              ver[k][22]++ ;
720              sighandler(headc,obt,i,k,nevents,evdone);
721              printf(" packet length is zero (YODA input error), skipped\n");
722            };
723        };        };
724        for (Int_t kk = 0; kk < 11 ; kk++ ){        for (Int_t kk = 0; kk < 11 ; kk++ ){
725          tshit += shit[k][kk];          tshit += shit[k][kk];
726          trshit += rshit[k][kk];          trshit += rshit[k][kk];
727        };        };
728      };        };  
729      Calstriphit->Fill(cshit);      if (isCOMP || isFULL){
730      if ( (cshit > 0 && cshit < 25) || (cshit > 40 && cshit < 80) ){        Calstriphit->Fill(cshit);
731        incshit++;        //    if ( (cshit > 0 && cshit < 25) || (cshit > 40 && cshit < 80) ){
732      } else {        if ( (cshit > 10 && cshit < 100) ){
733        outcshit++;          incshit++;
734      };        } else {
735      if ( tshit>0 ) h1->Fill(tshit);          outcshit++;
736      if ( (tshit > 0 && tshit < 25) || (tshit > 40 && tshit < 80) ){        };
737        intshit++;        //
738      } else {        if ( tshit>0 ) h1->Fill(tshit);
739        outtshit++;        //    if ( (tshit > 0 && tshit < 25) || (tshit > 40 && tshit < 80) ){
740          if ( (tshit > 10 && tshit < 100) ){
741            intshit++;
742          } else {
743            outtshit++;
744          };
745      };      };
746      if ( trshit>0 ) {      if ( trshit>0 ) {
747        h1r->Fill(trshit);        h1r->Fill(trshit);
748        if ( trshit < 4210 ){        if ( trshit < 4210 ){
749          h1rcheck = true;          h1rout++;
750          //              printf("ma come... trshit %i \n",trshit);          //              printf("ma come... trshit %i \n",trshit);
751          } else {
752            h1rin++;
753        };        };
754      };      };
755      if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000);      //    if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000);
756      i++;      i++;
757    };    };
758    printf("\n");    printf("\n");
759          printf("\n end processing. \n\n");
760      if ( (float)h1rout/((float)h1rin+(float)h1rout) > h1rth ){
761        h1rcheck = true;
762      };    
763    //    //
764    //  output figures, first sheet:    //  output figures, first sheet:
765    //    //
# Line 670  void FCaloQLOOK(TString filename, Int_t Line 825  void FCaloQLOOK(TString filename, Int_t
825      h1->Draw();      h1->Draw();
826      //      //
827      h1max = h1->GetMaximum()*1.05;      h1max = h1->GetMaximum()*1.05;
828      Double_t xc[4] = {0.,25.,25.,0.};      Double_t xc[4] = {10.,100.,100.,10.};
829      Double_t yc[4] = {0.,0.,h1max,h1max};      Double_t yc[4] = {0.,0.,h1max,h1max};
830      banda1 = new TPolyLine(4,xc,yc);      banda1 = new TPolyLine(4,xc,yc);
831      banda1->SetLineColor(5);      banda1->SetLineColor(5);
832      banda1->SetFillColor(5);      banda1->SetFillColor(5);
833      banda1->SetLineWidth(1);      banda1->SetLineWidth(1);
834      banda1->Draw("fSAME");      banda1->Draw("fSAME");
835      Double_t xd[4] = {40.,80.,80.,40.};    //  Double_t xd[4] = {40.,80.,80.,40.};
836      Double_t yd[4] = {0.,0.,h1max,h1max};     // Double_t yd[4] = {0.,0.,h1max,h1max};
837      banda2 = new TPolyLine(4,xd,yd);     // banda2 = new TPolyLine(4,xd,yd);
838      banda2->SetLineColor(5);     // banda2->SetLineColor(5);
839      banda2->SetFillColor(5);     // banda2->SetFillColor(5);
840      banda2->SetLineWidth(1);     // banda2->SetLineWidth(1);
841      banda2->Draw("fSAME");      //banda2->Draw("fSAME");
842      h1->Draw("SAME");      h1->Draw("SAME");
843      //      //
844      figura->cd();      figura->cd();
# Line 720  void FCaloQLOOK(TString filename, Int_t Line 875  void FCaloQLOOK(TString filename, Int_t
875        h1->SetYTitle("Number of events");        h1->SetYTitle("Number of events");
876        h1->Draw();        h1->Draw();
877        h1max = h1->GetMaximum()*1.05;        h1max = h1->GetMaximum()*1.05;
878        Double_t xe[4] = {0.,25.,25.,0.};        Double_t xe[4] = {10.,100.,100.,10.};
879        Double_t ye[4] = {0.,0.,h1max,h1max};        Double_t ye[4] = {0.,0.,h1max,h1max};
880        banda1 = new TPolyLine(4,xe,ye);        banda1 = new TPolyLine(4,xe,ye);
881        banda1->SetLineColor(5);        banda1->SetLineColor(5);
882        banda1->SetFillColor(5);        banda1->SetFillColor(5);
883        banda1->SetLineWidth(1);        banda1->SetLineWidth(1);
884        banda1->Draw("fSAME");        banda1->Draw("fSAME");
885        Double_t xf[4] = {40.,80.,80.,40.};       // Double_t xf[4] = {40.,80.,80.,40.};
886        Double_t yf[4] = {0.,0.,h1max,h1max};       // Double_t yf[4] = {0.,0.,h1max,h1max};
887        banda2 = new TPolyLine(4,xf,yf);       // banda2 = new TPolyLine(4,xf,yf);
888        banda2->SetLineColor(5);       // banda2->SetLineColor(5);
889        banda2->SetFillColor(5);       // banda2->SetFillColor(5);
890        banda2->SetLineWidth(1);      //  banda2->SetLineWidth(1);
891        banda2->Draw("fSAME");       // banda2->Draw("fSAME");
892        h1->Draw("SAME");        h1->Draw("SAME");
893      };      };
894      if ( trshit !=0 ) {      if ( trshit !=0 ) {
# Line 763  void FCaloQLOOK(TString filename, Int_t Line 918  void FCaloQLOOK(TString filename, Int_t
918      };      };
919    };    };
920    if ( !errorfull ) {    if ( !errorfull ) {
921      if ( calevn1 || calevn2 || calevn3 ) {      if ( calevn1 > calevnth || calevn2 > calevnth || calevn3 > calevnth ) {
922        pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.24,0.98,45);        pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.24,0.98,45);
923        pd2 = new TPad("pd2","This is pad2",0.26,0.51,0.49,0.98,45);        pd2 = new TPad("pd2","This is pad2",0.26,0.51,0.49,0.98,45);
924        pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.24,0.49,45);        pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.24,0.49,45);
# Line 938  void FCaloQLOOK(TString filename, Int_t Line 1093  void FCaloQLOOK(TString filename, Int_t
1093      Dexyc->Draw("SAME");      Dexyc->Draw("SAME");
1094      //      //
1095      pd3->cd();      pd3->cd();
1096    //    gPad->SetLogy();
1097      Calstriphit->SetXTitle("Number of hit");      Calstriphit->SetXTitle("Number of hit");
1098      Calstriphit->SetYTitle("Number of events");      Calstriphit->SetYTitle("Number of events");
1099      Calstriphit->Draw();      Calstriphit->Draw();
1100      h1max = Calstriphit->GetMaximum()*1.05;      h1max = Calstriphit->GetMaximum()*1.05;
1101      Double_t xg[4] = {0.,25.,25.,0.};      Double_t xg[4] = {10.,100.,100.,10.};
1102      Double_t yg[4] = {0.,0.,h1max,h1max};      Double_t yg[4] = {0.,0.,h1max,h1max};
1103      banda1 = new TPolyLine(4,xg,yg);      banda1 = new TPolyLine(4,xg,yg);
1104      banda1->SetLineColor(5);      banda1->SetLineColor(5);
1105      banda1->SetFillColor(5);      banda1->SetFillColor(5);
1106      banda1->SetLineWidth(1);      banda1->SetLineWidth(1);
1107      banda1->Draw("fSAME");      banda1->Draw("fSAME");
1108      Double_t xh[4] = {40.,80.,80.,40.};    //  Double_t xh[4] = {40.,80.,80.,40.};
1109      Double_t yh[4] = {0.,0.,h1max,h1max};    //  Double_t yh[4] = {0.,0.,h1max,h1max};
1110      banda2 = new TPolyLine(4,xh,yh);    //  banda2 = new TPolyLine(4,xh,yh);
1111      banda2->SetLineColor(5);    //  banda2->SetLineColor(5);
1112      banda2->SetFillColor(5);    //  banda2->SetFillColor(5);
1113      banda2->SetLineWidth(1);    //  banda2->SetLineWidth(1);
1114      banda2->Draw("fSAME");    //  banda2->Draw("fSAME");
1115      Calstriphit->Draw("SAME");      Calstriphit->Draw("SAME");
1116      //      //
1117      pd4->cd();      pd4->cd();
1118        gPad->SetLogy();
1119      Dexy->SetXTitle("ADC channels");      Dexy->SetXTitle("ADC channels");
1120      Dexy->SetYTitle("Number of events");      Dexy->SetYTitle("Number of events");
1121      Dexy->Draw();      Dexy->Draw();
1122      h1max = Dexy->GetMaximum()*1.05;      //    h1max = Dexy->GetMaximum()*1.05;
1123        h1max = Dexy->GetMaximum()*2.05;
1124      Double_t xd[4] = {2000.,5000.,5000.,2000.};      Double_t xd[4] = {2000.,5000.,5000.,2000.};
1125      Double_t yd[4] = {0.,0.,h1max,h1max};      Double_t yd[4] = {0.,0.,h1max,h1max};
1126      banda1 = new TPolyLine(4,xd,yd);      banda1 = new TPolyLine(4,xd,yd);
# Line 998  void FCaloQLOOK(TString filename, Int_t Line 1156  void FCaloQLOOK(TString filename, Int_t
1156      pd4->Draw();      pd4->Draw();
1157      //      //
1158      pd4->cd();      pd4->cd();
1159        gPad->SetLogy();
1160      Dexy->SetXTitle("ADC channels");      Dexy->SetXTitle("ADC channels");
1161      Dexy->SetYTitle("Number of events");      Dexy->SetYTitle("Number of events");
1162      Dexy->Draw();      Dexy->Draw();
1163      h1max = Dexy->GetMaximum()*1.05;      //    h1max = Dexy->GetMaximum()*1.05;
1164        h1max = Dexy->GetMaximum()*2.05;
1165      Double_t xd[4] = {2000.,5000.,5000.,2000.};      Double_t xd[4] = {2000.,5000.,5000.,2000.};
1166      Double_t yd[4] = {0.,0.,h1max,h1max};      Double_t yd[4] = {0.,0.,h1max,h1max};
1167      banda1 = new TPolyLine(4,xd,yd);      banda1 = new TPolyLine(4,xd,yd);
# Line 1067  void FCaloQLOOK(TString filename, Int_t Line 1227  void FCaloQLOOK(TString filename, Int_t
1227      pd7->Draw();      pd7->Draw();
1228      pd8->Draw();      pd8->Draw();
1229      pd1->cd();      pd1->cd();
1230      lup[0]->SetAxisRange((Double_t)minobt[0]*0.9,(Double_t)maxobt[0]*1.1,"X");      lup[0]->SetAxisRange((Double_t)min(minobt[0],swminobt[0])*0.9,(Double_t)max(maxobt[0],swmaxobt[0])*1.1,"X");
1231        lup[0]->SetXTitle("OBT");
1232        lup[0]->SetYTitle("Number of events");
1233      lup[0]->Draw();      lup[0]->Draw();
1234      pd5->cd();      pd5->cd();
1235      lupstw[0]->SetAxisRange((Double_t)swminobt[0]*0.9,(Double_t)swmaxobt[0]*1.1,"X");      lupstw[0]->SetAxisRange((Double_t)min(minobt[0],swminobt[0])*0.9,(Double_t)max(maxobt[0],swmaxobt[0])*1.1,"X");
1236        //    lupstw[0]->SetAxisRange((Double_t)swminobt[0]*0.9,(Double_t)swmaxobt[0]*1.1,"X");
1237        lupstw[0]->SetXTitle("OBT");
1238        lupstw[0]->SetYTitle("Number of events");
1239      lupstw[0]->Draw();      lupstw[0]->Draw();
1240      pd2->cd();      pd2->cd();
1241      lup[1]->SetAxisRange((Double_t)minobt[1]*0.9,(Double_t)maxobt[1]*1.1,"X");      lup[1]->SetAxisRange((Double_t)min(minobt[1],swminobt[1])*0.9,(Double_t)max(maxobt[1],swmaxobt[1])*1.1,"X");
1242        //    lup[1]->SetAxisRange((Double_t)minobt[1]*0.9,(Double_t)maxobt[1]*1.1,"X");
1243        lup[1]->SetXTitle("OBT");
1244        lup[1]->SetYTitle("Number of events");
1245      lup[1]->Draw();      lup[1]->Draw();
1246      pd6->cd();      pd6->cd();
1247      lupstw[1]->SetAxisRange((Double_t)swminobt[1]*0.9,(Double_t)swmaxobt[1]*1.1,"X");      lupstw[1]->SetAxisRange((Double_t)min(minobt[1],swminobt[1])*0.9,(Double_t)max(maxobt[1],swmaxobt[1])*1.1,"X");
1248        //    lupstw[1]->SetAxisRange((Double_t)swminobt[1]*0.9,(Double_t)swmaxobt[1]*1.1,"X");
1249        lupstw[1]->SetXTitle("OBT");
1250        lupstw[1]->SetYTitle("Number of events");
1251      lupstw[1]->Draw();      lupstw[1]->Draw();
1252      pd3->cd();      pd3->cd();
1253      lup[2]->SetAxisRange((Double_t)minobt[2]*0.9,(Double_t)maxobt[2]*1.1,"X");      lup[2]->SetAxisRange((Double_t)min(minobt[2],swminobt[2])*0.9,(Double_t)max(maxobt[2],swmaxobt[2])*1.1,"X");
1254        //    lup[2]->SetAxisRange((Double_t)minobt[2]*0.9,(Double_t)maxobt[2]*1.1,"X");
1255        lup[2]->SetXTitle("OBT");
1256        lup[2]->SetYTitle("Number of events");
1257      lup[2]->Draw();      lup[2]->Draw();
1258      pd7->cd();      pd7->cd();
1259      lupstw[2]->SetAxisRange((Double_t)swminobt[2]*0.9,(Double_t)swmaxobt[2]*1.1,"X");      lupstw[2]->SetAxisRange((Double_t)min(minobt[2],swminobt[2])*0.9,(Double_t)max(maxobt[2],swmaxobt[2])*1.1,"X");
1260        //    lupstw[2]->SetAxisRange((Double_t)swminobt[2]*0.9,(Double_t)swmaxobt[2]*1.1,"X");
1261        lupstw[2]->SetXTitle("OBT");
1262        lupstw[2]->SetYTitle("Number of events");
1263      lupstw[2]->Draw();      lupstw[2]->Draw();
1264      pd4->cd();      pd4->cd();
1265      lup[3]->SetAxisRange((Double_t)minobt[3]*0.9,(Double_t)maxobt[3]*1.1,"X");      lup[3]->SetAxisRange((Double_t)min(minobt[3],swminobt[3])*0.9,(Double_t)max(maxobt[3],swmaxobt[3])*1.1,"X");
1266        //    lup[3]->SetAxisRange((Double_t)minobt[3]*0.9,(Double_t)maxobt[3]*1.1,"X");
1267        lup[3]->SetXTitle("OBT");
1268        lup[3]->SetYTitle("Number of events");
1269      lup[3]->Draw();      lup[3]->Draw();
1270      pd8->cd();      pd8->cd();
1271      lupstw[3]->SetAxisRange((Double_t)swminobt[3]*0.9,(Double_t)swmaxobt[3]*1.1,"X");      lupstw[3]->SetAxisRange((Double_t)min(minobt[3],swminobt[3])*0.9,(Double_t)max(maxobt[3],swmaxobt[3])*1.1,"X");
1272        //    lupstw[3]->SetAxisRange((Double_t)swminobt[3]*0.9,(Double_t)swmaxobt[3]*1.1,"X");
1273        lupstw[3]->SetXTitle("OBT");
1274        lupstw[3]->SetYTitle("Number of events");
1275      lupstw[3]->Draw();      lupstw[3]->Draw();
1276    };    };
1277    //    //
# Line 1122  void FCaloQLOOK(TString filename, Int_t Line 1305  void FCaloQLOOK(TString filename, Int_t
1305    pad2->Draw();    pad2->Draw();
1306    pad3->Draw();    pad3->Draw();
1307    pad4->Draw();    pad4->Draw();
1308      //
1309      Bool_t redevent = true;
1310      //
1311      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] ){
1312        redevent = false;
1313      };
1314      if ( redevent ) check = true;
1315      //
1316    for (Int_t i = 0; i < 4; i++){    for (Int_t i = 0; i < 4; i++){
1317      if (i == 2)      if (i == 2)
1318        {        {
# Line 1209  void FCaloQLOOK(TString filename, Int_t Line 1399  void FCaloQLOOK(TString filename, Int_t
1399            errore.str("");            errore.str("");
1400            errore << "RAW mode: " << ver[i][j];            errore << "RAW mode: " << ver[i][j];
1401            errore << " time(s)";            errore << " time(s)";
1402            t->SetTextColor(32);            if ( !redevent ) t->SetTextColor(32);
1403            t->DrawLatex(2.,90.,errore.str().c_str());            t->DrawLatex(2.,90.,errore.str().c_str());
1404          }          }
1405          if (j == 4) {          if (j == 4) {
# Line 1245  void FCaloQLOOK(TString filename, Int_t Line 1435  void FCaloQLOOK(TString filename, Int_t
1435            errore << "Missing section: " << ver[i][j];            errore << "Missing section: " << ver[i][j];
1436            errore << " time(s)";            errore << " time(s)";
1437            t->DrawLatex(2.,50.,errore.str().c_str());            t->DrawLatex(2.,50.,errore.str().c_str());
1438            check = true;            if ( ver[i][j] > 3 ) check = true;
1439          }          }
1440          if (j == 10) {          if (j == 10) {
1441            errore.str("");            errore.str("");
1442            errore << "Calevnum jump: " << ver[i][j];            errore << "Calevnum jump: " << ver[i][j];
1443            errore << " time(s)";            errore << " time(s)";
1444            t->DrawLatex(2.,42.,errore.str().c_str());            t->DrawLatex(2.,42.,errore.str().c_str());
1445            check = true;            if ( ver[i][j] > 3 ) check = true;
1446          }          }
1447          if (j == 11) {          if (j == 11) {
1448            errore.str("");            errore.str("");
1449            errore << "CRC error (data): " << ver[i][j];            errore << "CRC error (data): " << ver[i][j];
1450            errore << " time(s)";            errore << " time(s)";
1451            t->DrawLatex(2.,38.,errore.str().c_str());            t->DrawLatex(2.,38.,errore.str().c_str());
1452            check = true;            if ( ver[i][j] > 10 ) check = true;
1453          }          }
1454          if (j == 12) {          if (j == 12) {
1455            errore.str("");            errore.str("");
# Line 1293  void FCaloQLOOK(TString filename, Int_t Line 1483  void FCaloQLOOK(TString filename, Int_t
1483            errore.str("");            errore.str("");
1484            errore << "COMPRESS mode: " << ver[i][j];            errore << "COMPRESS mode: " << ver[i][j];
1485            errore << " time(s)";            errore << " time(s)";
1486            t->SetTextColor(32);            if ( !redevent ) t->SetTextColor(32);
1487            t->DrawLatex(2.,86.,errore.str().c_str());            t->DrawLatex(2.,86.,errore.str().c_str());
1488          }          }
1489          if (j == 17) {          if (j == 17) {
1490            errore.str("");            errore.str("");
1491            errore << "FULL mode: " << ver[i][j];            errore << "FULL mode: " << ver[i][j];
1492            errore << " time(s)";            errore << " time(s)";
1493            t->SetTextColor(32);            if ( !redevent ) t->SetTextColor(32);
1494            t->DrawLatex(2.,82.,errore.str().c_str());            t->DrawLatex(2.,82.,errore.str().c_str());
1495          }          }
1496          if (j == 18) {          if (j == 18) {
# Line 1446  void FCaloQLOOK(TString filename, Int_t Line 1636  void FCaloQLOOK(TString filename, Int_t
1636      figsave << format;      figsave << format;
1637      rapporto->SaveAs(figsave.str().c_str());          rapporto->SaveAs(figsave.str().c_str());    
1638    };    };
1639      if ( iactive && w4i ){
1640        while ( gROOT->GetListOfCanvases()->FindObject(rapporto) || gROOT->GetListOfCanvases()->FindObject(figura3) || gROOT->GetListOfCanvases()->FindObject(figura2) || gROOT->GetListOfCanvases()->FindObject(figura) ){
1641          gSystem->ProcessEvents();
1642          gSystem->Sleep(10);
1643        };
1644      };
1645  }  }
1646    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23