/[PAMELA software]/quicklook/tracker/flight/macros/FTrkQLook_EXPERT.cxx
ViewVC logotype

Diff of /quicklook/tracker/flight/macros/FTrkQLook_EXPERT.cxx

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

revision 1.29 by pam-fi, Tue Feb 20 21:57:29 2007 UTC revision 1.33 by pam-fi, Mon Jul 30 14:23:02 2007 UTC
# Line 1  Line 1 
1    
2  /**  /**
3   * FTrkQLook_EXPERT.cxx   * FTrkQLook_EXPERT.cxx
4   *   *
5   * autor: D.Fedele   * autor: D.Fedele
6   * version v1r23   * version v1r27
7   * Parameters:   * Parameters:
8   *      file - the data file to analyze   *      file - the data file to analyze
9   *      fromevent - first event to analyze   *      fromevent - first event to analyze
# Line 143  void FTrkQLook_EXPERT(TString file,Int_t Line 144  void FTrkQLook_EXPERT(TString file,Int_t
144    
145    //    //
146    // information about the RunHeader    // information about the RunHeader
147    ULong64_t HOBT[neventH];    ULong_t HOBT[neventH];
148    Int_t trk_cal_us[neventH];    Int_t trk_cal_us[neventH];
149    ULong_t acq_info[neventH];      ULong_t acq_info[neventH];  
150    Int_t countnboot=1;    Int_t countnboot=1;
# Line 180  void FTrkQLook_EXPERT(TString file,Int_t Line 181  void FTrkQLook_EXPERT(TString file,Int_t
181    }    }
182    const Int_t tsize=maxsize;    const Int_t tsize=maxsize;
183    Int_t tempt[tsize][5];    Int_t tempt[tsize][5];
184    ULong64_t xt[tsize];    ULong_t xt[tsize];
185    
186    Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0;    Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0;
187    //    //
# Line 212  void FTrkQLook_EXPERT(TString file,Int_t Line 213  void FTrkQLook_EXPERT(TString file,Int_t
213    }    }
214    const Int_t bsize=maxsize;    const Int_t bsize=maxsize;
215    Int_t magt[bsize][5];    Int_t magt[bsize][5];
216    ULong64_t xb[bsize];    ULong_t xb[bsize];
217    siztmp=0;    siztmp=0;
218    //    //
219    // information about the magnetic field    // information about the magnetic field
# Line 249  void FTrkQLook_EXPERT(TString file,Int_t Line 250  void FTrkQLook_EXPERT(TString file,Int_t
250    // write the file for the TrkAlarm packet    // write the file for the TrkAlarm packet
251    if(alnevent==0) alarm1 <<endl<< "------>  NO ALARM!!! <-------"<< endl;    if(alnevent==0) alarm1 <<endl<< "------>  NO ALARM!!! <-------"<< endl;
252    else{    else{
253      Long64_t obt=0;      ULong_t obt=0;
254      for (Int_t ev=0; ev<alnevent; ev++){      for (Int_t ev=0; ev<alnevent; ev++){
255        altr->GetEntry(ev);        altr->GetEntry(ev);
256        ph = aleh->GetPscuHeader();        ph = aleh->GetPscuHeader();
257    
258        if(ph->GetOrbitalTime()<obt && ev>0)        if((ULong_t)ph->GetOrbitalTime()<obt && ev>0)
259          alarm1<<endl<<"NEW CPU BOOT"<<endl;          alarm1<<endl<<"NEW CPU BOOT"<<endl;
260        obt=ph->GetOrbitalTime();        obt=ph->GetOrbitalTime();
261                    
262        alarm1 << "================================================="<< endl;        alarm1 << "================================================="<< endl;
263        alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ;        alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ;
264        alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl;        alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl;
265        alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl;        alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl;
266        alarm1 << "================================================="<< endl<<endl;        alarm1 << "================================================="<< endl<<endl;
267                    
# Line 620  void FTrkQLook_EXPERT(TString file,Int_t Line 621  void FTrkQLook_EXPERT(TString file,Int_t
621    
622        case 1:        case 1:
623          li.DrawLine(min,2055.,max,2055.);          li.DrawLine(min,2055.,max,2055.);
624          li.DrawLine(min,2050.,max,2050.);          li.DrawLine(min,2049.,max,2049.);
625          t1->DrawLatex(xlat,2055.3,ma.str().c_str());          t1->DrawLatex(xlat,2055.3,ma.str().c_str());
626          t1->DrawLatex(xlat,2049.7,mi.str().c_str());          t1->DrawLatex(xlat,2048.7,mi.str().c_str());
627          break;          break;
628    
629        case 2:        case 2:
630          li.DrawLine(min,2056.,max,2056.);          li.DrawLine(min,2056.,max,2056.);
631          li.DrawLine(min,2051.,max,2051.);          li.DrawLine(min,2050.,max,2050.);
632          t1->DrawLatex(xlat,2056.3,ma.str().c_str());          t1->DrawLatex(xlat,2056.3,ma.str().c_str());
633          t1->DrawLatex(xlat,2050.7,mi.str().c_str());          t1->DrawLatex(xlat,2049.7,mi.str().c_str());
634          break;          break;
635                
636        case 3:        case 3:
637          li.DrawLine(min,2057.,max,2057.);          li.DrawLine(min,2057.,max,2057.);
638          li.DrawLine(min,2052.,max,2052.);          li.DrawLine(min,2051.,max,2051.);
639          t1->DrawLatex(xlat,2057.3,ma.str().c_str());          t1->DrawLatex(xlat,2057.3,ma.str().c_str());
640          t1->DrawLatex(xlat,2051.7,mi.str().c_str());          t1->DrawLatex(xlat,2050.7,mi.str().c_str());
641          break;          break;
642    
643        case 4:        case 4:
644          li.DrawLine(min,2066.,max,2066.);          li.DrawLine(min,2066.,max,2066.);
645          li.DrawLine(min,2060.,max,2060.);          li.DrawLine(min,2060.,max,2060.);
646          t1->DrawLatex(xlat,2066.15,ma.str().c_str());          t1->DrawLatex(xlat,2066.2,ma.str().c_str());
647          t1->DrawLatex(xlat,2059.85,mi.str().c_str());          t1->DrawLatex(xlat,2059.8,mi.str().c_str());
648          break;          break;
649    
650        }        }
# Line 737  void FTrkQLook_EXPERT(TString file,Int_t Line 738  void FTrkQLook_EXPERT(TString file,Int_t
738      // and fill graphs and histos      // and fill graphs and histos
739    
740      Int_t al=0;      Int_t al=0;
741        ULong_t obtx=0;
742      Double_t x[MAXSTORAGE];      Double_t x[MAXSTORAGE];
743      Float_t yc[MAXSTORAGE][12];      Float_t yc[MAXSTORAGE][12];
744      Double_t eventint[MAXSTORAGE];      Double_t eventint[MAXSTORAGE];
# Line 750  void FTrkQLook_EXPERT(TString file,Int_t Line 752  void FTrkQLook_EXPERT(TString file,Int_t
752    
753        if(ev==maxevent-1) maxev=maxevent-1;        if(ev==maxevent-1) maxev=maxevent-1;
754    
755        if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){        if(((ULong_t)ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){
756          maxev=ev;          maxev=ev;
757          break;          break;
758        }        }
759        else{        else{
760          x[(ev-minev)]= ph->GetOrbitalTime();          obtx = ph->GetOrbitalTime();
761            x[(ev-minev)]=(Double_t)obtx;
762          ALARM=0;          ALARM=0;
763          Int_t dsp=0;          Int_t dsp=0;
764          Int_t noacq=0;          Int_t noacq=0;
# Line 889  void FTrkQLook_EXPERT(TString file,Int_t Line 892  void FTrkQLook_EXPERT(TString file,Int_t
892            al=1;            al=1;
893            alarm <<endl<< "================================================="<< endl;            alarm <<endl<< "================================================="<< endl;
894            alarm << "PSCU-Pkt N. "<< ph->GetCounter() ;            alarm << "PSCU-Pkt N. "<< ph->GetCounter() ;
895            alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl;            alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl;
896            alarm << "Total events "<<nevent<<endl;            alarm << "Total events "<<nevent<<endl;
897            alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl;            alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl;
898            alarm << "================================================="<< endl;            alarm << "================================================="<< endl;
# Line 1108  void FTrkQLook_EXPERT(TString file,Int_t Line 1111  void FTrkQLook_EXPERT(TString file,Int_t
1111    t1->DrawLatex(70.,98.7,isfile.str().c_str());    t1->DrawLatex(70.,98.7,isfile.str().c_str());
1112    isfile.str("");    isfile.str("");
1113        
1114      isfile<<"Boxes so colored point out chips broken before the launch and never resumed";
1115      t->SetTextColor(6);
1116      t->SetTextSize(0.018);
1117      t->DrawLatex(7.,97.2,isfile.str().c_str());
1118      isfile.str("");
1119      
1120      isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)";
1121      t->SetTextColor(107);
1122      t->DrawLatex(7.,95.7,isfile.str().c_str());
1123      isfile.str("");
1124      t->SetTextColor(1);
1125    
1126    //    //
1127    // Draw the histos    // Draw the histos
1128    for (Int_t i=0; i<12 ; i++){    for (Int_t i=0; i<12 ; i++){
# Line 1177  void FTrkQLook_EXPERT(TString file,Int_t Line 1192  void FTrkQLook_EXPERT(TString file,Int_t
1192        b.SetFillColor(107);        b.SetFillColor(107);
1193        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1194        b.DrawBox(384.,0.,512.,maxhist);        b.DrawBox(384.,0.,512.,maxhist);
1195          b.DrawBox(896.,0.,1024.,maxhist);
1196        b.DrawBox(2048.,0.,2432.,maxhist);        b.DrawBox(2048.,0.,2432.,maxhist);
1197        b.DrawBox(2816.,0.,2944.,maxhist);        b.DrawBox(2816.,0.,2944.,maxhist);
1198      }      }
# Line 1191  void FTrkQLook_EXPERT(TString file,Int_t Line 1207  void FTrkQLook_EXPERT(TString file,Int_t
1207        b.DrawBox(256.,0.,512.,maxhist);        b.DrawBox(256.,0.,512.,maxhist);
1208        b.DrawBox(2816.,0.,3070.,maxhist);        b.DrawBox(2816.,0.,3070.,maxhist);
1209      }      }
1210        else if(i==5){
1211          b.SetFillColor(107);
1212          b.SetFillStyle(3954);
1213          b.DrawBox(896.,0.,1024.,maxhist);
1214          //      b.DrawBox(1664.,0.,1792.,maxhist);      
1215        }
1216      else if(i==6){      else if(i==6){
       b.SetFillColor(6);  
       b.SetFillStyle(3945);  
       b.DrawBox(1024.,0.,1280.,maxhist);  
   
1217        b.SetFillColor(107);        b.SetFillColor(107);
1218        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1219        b.DrawBox(512.,0.,768.,maxhist);        b.DrawBox(512.,0.,768.,maxhist);
1220          b.DrawBox(1024.,0.,1280.,maxhist);
1221        b.DrawBox(1280.,0.,1792.,maxhist);        b.DrawBox(1280.,0.,1792.,maxhist);
1222        b.DrawBox(2560.,0.,2816.,maxhist);        b.DrawBox(2560.,0.,2816.,maxhist);
1223     }     }
# Line 1207  void FTrkQLook_EXPERT(TString file,Int_t Line 1226  void FTrkQLook_EXPERT(TString file,Int_t
1226        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1227        b.DrawBox(512.,0.,768.,maxhist);        b.DrawBox(512.,0.,768.,maxhist);
1228        b.DrawBox(896.,0.,1535.,maxhist);        b.DrawBox(896.,0.,1535.,maxhist);
1229          b.DrawBox(2024.,0.,2280.,maxhist);
1230      }      }
1231      else if(i==8){      else if(i==8){
1232        b.SetFillColor(107);        b.SetFillColor(107);
# Line 1216  void FTrkQLook_EXPERT(TString file,Int_t Line 1236  void FTrkQLook_EXPERT(TString file,Int_t
1236      else if(i==9){      else if(i==9){
1237        b.SetFillColor(107);        b.SetFillColor(107);
1238        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1239          b.DrawBox(0.,0.,128.,maxhist);
1240        b.DrawBox(256.,0.,384.,maxhist);        b.DrawBox(256.,0.,384.,maxhist);
1241          b.DrawBox(512.,0.,640.,maxhist);
1242          b.DrawBox(896.,0.,1024.,maxhist);
1243        b.DrawBox(1280.,0.,1535.,maxhist);        b.DrawBox(1280.,0.,1535.,maxhist);
1244        b.DrawBox(1792.,0.,1920.,maxhist);        b.DrawBox(1664.,0.,1920.,maxhist);
1245      }      }
1246      else if(i==10){      else if(i==10){
1247        b.SetFillColor(107);        b.SetFillColor(107);
1248        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1249        b.DrawBox(1024.,0.,1152.,maxhist);        b.DrawBox(0.,0.,512.,maxhist);
1250        b.DrawBox(2048.,0.,3070.,maxhist);        b.DrawBox(1024.,0.,3070.,maxhist);
1251      }      }
1252      else if(i==11){      else if(i==11){
1253        b.SetFillColor(6);        b.SetFillColor(6);
# Line 1235  void FTrkQLook_EXPERT(TString file,Int_t Line 1258  void FTrkQLook_EXPERT(TString file,Int_t
1258        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1259        b.DrawBox(0.,0.,512.,maxhist);        b.DrawBox(0.,0.,512.,maxhist);
1260        b.DrawBox(1920.,0.,2560.,maxhist);        b.DrawBox(1920.,0.,2560.,maxhist);
1261          b.DrawBox(2816.,0.,3070.,maxhist);
1262      }      }
1263      for(int va=1; va<24; va++){      for(int va=1; va<24; va++){
1264        va1x=128*va;        va1x=128*va;

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.23