/[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.23 by pam-fi, Sat Dec 2 16:12:47 2006 UTC revision 1.32 by pam-fi, Mon May 28 10:27:51 2007 UTC
# Line 2  Line 2 
2   * FTrkQLook_EXPERT.cxx   * FTrkQLook_EXPERT.cxx
3   *   *
4   * autor: D.Fedele   * autor: D.Fedele
5   * version v1r16   * version v1r26
6   * Parameters:   * Parameters:
7   *      file - the data file to analyze   *      file - the data file to analyze
8   *      fromevent - first event to analyze   *      fromevent - first event to analyze
# Line 143  void FTrkQLook_EXPERT(TString file,Int_t Line 143  void FTrkQLook_EXPERT(TString file,Int_t
143    
144    //    //
145    // information about the RunHeader    // information about the RunHeader
146    ULong64_t HOBT[neventH];    ULong_t HOBT[neventH];
147    Int_t trk_cal_us[neventH];    Int_t trk_cal_us[neventH];
148    ULong_t acq_info[neventH];      ULong_t acq_info[neventH];  
149    Int_t countnboot=1;    Int_t countnboot=1;
# Line 180  void FTrkQLook_EXPERT(TString file,Int_t Line 180  void FTrkQLook_EXPERT(TString file,Int_t
180    }    }
181    const Int_t tsize=maxsize;    const Int_t tsize=maxsize;
182    Int_t tempt[tsize][5];    Int_t tempt[tsize][5];
183    ULong64_t xt[tsize];    ULong_t xt[tsize];
184    
185    Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0;    Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0;
186    //    //
# Line 212  void FTrkQLook_EXPERT(TString file,Int_t Line 212  void FTrkQLook_EXPERT(TString file,Int_t
212    }    }
213    const Int_t bsize=maxsize;    const Int_t bsize=maxsize;
214    Int_t magt[bsize][5];    Int_t magt[bsize][5];
215    ULong64_t xb[bsize];    ULong_t xb[bsize];
216    siztmp=0;    siztmp=0;
217    //    //
218    // information about the magnetic field    // information about the magnetic field
# Line 249  void FTrkQLook_EXPERT(TString file,Int_t Line 249  void FTrkQLook_EXPERT(TString file,Int_t
249    // write the file for the TrkAlarm packet    // write the file for the TrkAlarm packet
250    if(alnevent==0) alarm1 <<endl<< "------>  NO ALARM!!! <-------"<< endl;    if(alnevent==0) alarm1 <<endl<< "------>  NO ALARM!!! <-------"<< endl;
251    else{    else{
252      Long64_t obt=0;      ULong_t obt=0;
253      for (Int_t ev=0; ev<alnevent; ev++){      for (Int_t ev=0; ev<alnevent; ev++){
254        altr->GetEntry(ev);        altr->GetEntry(ev);
255        ph = aleh->GetPscuHeader();        ph = aleh->GetPscuHeader();
256    
257        if(ph->GetOrbitalTime()<obt && ev>0)        if((ULong_t)ph->GetOrbitalTime()<obt && ev>0)
258          alarm1<<endl<<"NEW CPU BOOT"<<endl;          alarm1<<endl<<"NEW CPU BOOT"<<endl;
259        obt=ph->GetOrbitalTime();        obt=ph->GetOrbitalTime();
260                    
261        alarm1 << "================================================="<< endl;        alarm1 << "================================================="<< endl;
262        alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ;        alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ;
263        alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl;        alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl;
264        alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl;        alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl;
265        alarm1 << "================================================="<< endl<<endl;        alarm1 << "================================================="<< endl<<endl;
266                    
# Line 737  void FTrkQLook_EXPERT(TString file,Int_t Line 737  void FTrkQLook_EXPERT(TString file,Int_t
737      // and fill graphs and histos      // and fill graphs and histos
738    
739      Int_t al=0;      Int_t al=0;
740        ULong_t obtx=0;
741      Double_t x[MAXSTORAGE];      Double_t x[MAXSTORAGE];
742      Float_t yc[MAXSTORAGE][12];      Float_t yc[MAXSTORAGE][12];
743      Double_t eventint[MAXSTORAGE];      Double_t eventint[MAXSTORAGE];
# Line 750  void FTrkQLook_EXPERT(TString file,Int_t Line 751  void FTrkQLook_EXPERT(TString file,Int_t
751    
752        if(ev==maxevent-1) maxev=maxevent-1;        if(ev==maxevent-1) maxev=maxevent-1;
753    
754        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){
755          maxev=ev;          maxev=ev;
756          break;          break;
757        }        }
758        else{        else{
759          x[(ev-minev)]= ph->GetOrbitalTime();          obtx = ph->GetOrbitalTime();
760            x[(ev-minev)]=(Double_t)obtx;
761          ALARM=0;          ALARM=0;
762          Int_t dsp=0;          Int_t dsp=0;
763          Int_t noacq=0;          Int_t noacq=0;
# Line 889  void FTrkQLook_EXPERT(TString file,Int_t Line 891  void FTrkQLook_EXPERT(TString file,Int_t
891            al=1;            al=1;
892            alarm <<endl<< "================================================="<< endl;            alarm <<endl<< "================================================="<< endl;
893            alarm << "PSCU-Pkt N. "<< ph->GetCounter() ;            alarm << "PSCU-Pkt N. "<< ph->GetCounter() ;
894            alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl;            alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl;
895            alarm << "Total events "<<nevent<<endl;            alarm << "Total events "<<nevent<<endl;
896            alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl;            alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl;
897            alarm << "================================================="<< endl;            alarm << "================================================="<< endl;
# Line 970  void FTrkQLook_EXPERT(TString file,Int_t Line 972  void FTrkQLook_EXPERT(TString file,Int_t
972        comprtime[i][ii]->GetXaxis()->CenterTitle();        comprtime[i][ii]->GetXaxis()->CenterTitle();
973        comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)");        comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)");
974        comprtime[i][ii]->GetYaxis()->CenterTitle();        comprtime[i][ii]->GetYaxis()->CenterTitle();
975          if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501);
976        // comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3);        // comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3);
977        comprtime[i][ii]->Draw("ap");        comprtime[i][ii]->Draw("ap");
978        oss1.str("");        oss1.str("");
# Line 995  void FTrkQLook_EXPERT(TString file,Int_t Line 998  void FTrkQLook_EXPERT(TString file,Int_t
998      eventnumb[ii]->GetYaxis()->SetTitleSize(0.03);      eventnumb[ii]->GetYaxis()->SetTitleSize(0.03);
999      eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number");      eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number");
1000      eventnumb[ii]->GetYaxis()->CenterTitle();      eventnumb[ii]->GetYaxis()->CenterTitle();
1001        if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501);
1002      eventnumb[ii]->GetYaxis()->SetTitleOffset(2.);      eventnumb[ii]->GetYaxis()->SetTitleOffset(2.);
1003      eventnumb[ii]->SetMarkerStyle(21);      eventnumb[ii]->SetMarkerStyle(21);
1004      eventnumb[ii]->SetMarkerColor(kBlue);      eventnumb[ii]->SetMarkerColor(kBlue);
# Line 1164  void FTrkQLook_EXPERT(TString file,Int_t Line 1168  void FTrkQLook_EXPERT(TString file,Int_t
1168      if(i==0){      if(i==0){
1169        b.SetFillColor(107);        b.SetFillColor(107);
1170        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1171          b.DrawBox(256.,0.,384.,maxhist);
1172        b.DrawBox(768.,0.,2047.,maxhist);        b.DrawBox(768.,0.,2047.,maxhist);
1173      }      }
1174      else if(i==1){      else if(i==1){
# Line 1173  void FTrkQLook_EXPERT(TString file,Int_t Line 1178  void FTrkQLook_EXPERT(TString file,Int_t
1178    
1179        b.SetFillColor(107);        b.SetFillColor(107);
1180        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1181          b.DrawBox(384.,0.,512.,maxhist);
1182          b.DrawBox(2048.,0.,2432.,maxhist);
1183        b.DrawBox(2816.,0.,2944.,maxhist);        b.DrawBox(2816.,0.,2944.,maxhist);
1184        b.DrawBox(2048.,0.,2176.,maxhist);      }
1185        else if(i==3){
1186          b.SetFillColor(107);
1187          b.SetFillStyle(3954);
1188          b.DrawBox(2816.,0.,3070.,maxhist);
1189      }      }
1190      else if(i==4){      else if(i==4){
1191        b.SetFillColor(107);        b.SetFillColor(107);
1192        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1193        b.DrawBox(384.,0.,512.,maxhist);        b.DrawBox(256.,0.,512.,maxhist);
1194          b.DrawBox(2816.,0.,3070.,maxhist);
1195        }
1196        else if(i==5){
1197          b.SetFillColor(107);
1198          b.SetFillStyle(3954);
1199          b.DrawBox(896.,0.,1024.,maxhist);      
1200      }      }
1201      else if(i==6){      else if(i==6){
       b.SetFillColor(6);  
       b.SetFillStyle(3945);  
       b.DrawBox(2560.,0.,2816.,maxhist);  
       b.DrawBox(1024.,0.,1535.,maxhist);  
   
1202        b.SetFillColor(107);        b.SetFillColor(107);
1203        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1204        b.DrawBox(512.,0.,768.,maxhist);        b.DrawBox(512.,0.,768.,maxhist);
1205        b.DrawBox(1536.,0.,1792.,maxhist);        b.DrawBox(1024.,0.,1280.,maxhist);
1206          b.DrawBox(1280.,0.,1792.,maxhist);
1207          b.DrawBox(2560.,0.,2816.,maxhist);
1208     }     }
1209      else if(i==7){      else if(i==7){
1210        b.SetFillColor(107);        b.SetFillColor(107);
1211        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1212        b.DrawBox(512.,0.,768.,maxhist);        b.DrawBox(512.,0.,768.,maxhist);
1213          b.DrawBox(896.,0.,1535.,maxhist);
1214          b.DrawBox(2024.,0.,2280.,maxhist);
1215      }      }
1216      else if(i==8){      else if(i==8){
1217        b.SetFillColor(107);        b.SetFillColor(107);
# Line 1205  void FTrkQLook_EXPERT(TString file,Int_t Line 1221  void FTrkQLook_EXPERT(TString file,Int_t
1221      else if(i==9){      else if(i==9){
1222        b.SetFillColor(107);        b.SetFillColor(107);
1223        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1224          b.DrawBox(0.,0.,128.,maxhist);
1225        b.DrawBox(256.,0.,384.,maxhist);        b.DrawBox(256.,0.,384.,maxhist);
1226          b.DrawBox(512.,0.,640.,maxhist);
1227          b.DrawBox(896.,0.,1024.,maxhist);
1228          b.DrawBox(1280.,0.,1535.,maxhist);
1229          b.DrawBox(1792.,0.,1920.,maxhist);
1230      }      }
1231      else if(i==10){      else if(i==10){
1232        b.SetFillColor(107);        b.SetFillColor(107);
1233        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1234        b.DrawBox(2560.,0.,3070.,maxhist);        b.DrawBox(0.,0.,256.,maxhist);
1235          b.DrawBox(1024.,0.,1152.,maxhist);
1236          b.DrawBox(1768.,0.,3070.,maxhist);
1237      }      }
1238      else if(i==11){      else if(i==11){
1239        b.SetFillColor(6);        b.SetFillColor(6);
# Line 1221  void FTrkQLook_EXPERT(TString file,Int_t Line 1244  void FTrkQLook_EXPERT(TString file,Int_t
1244        b.SetFillStyle(3954);        b.SetFillStyle(3954);
1245        b.DrawBox(0.,0.,512.,maxhist);        b.DrawBox(0.,0.,512.,maxhist);
1246        b.DrawBox(1920.,0.,2560.,maxhist);        b.DrawBox(1920.,0.,2560.,maxhist);
1247          b.DrawBox(2816.,0.,3070.,maxhist);
1248      }      }
1249      for(int va=1; va<24; va++){      for(int va=1; va<24; va++){
1250        va1x=128*va;        va1x=128*va;

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.23