--- quicklook/tracker/flight/macros/FTrkQLook_BASIC.cxx 2006/07/13 10:13:37 1.10 +++ quicklook/tracker/flight/macros/FTrkQLook_BASIC.cxx 2007/02/20 21:57:28 1.16 @@ -2,7 +2,7 @@ * FTrkQLook_BASIC.cxx * * autor: D.Fedele - * version v1r06 + * version v1r10 * Parameters: * file - the data file to analyze * fromevent - first event to analyze @@ -103,7 +103,7 @@ } else if (toevent > nevent) { maxevent = nevent; } else { - maxevent = toevent+1; + maxevent = nevent; } nevent=maxevent-minevent ; } @@ -113,7 +113,7 @@ stringstream oss,fromfile,isfile; // // information about the RunHeader - Int_t HOBT[neventH]; + ULong64_t HOBT[neventH]; Int_t trk_cal_us[neventH]; for (Int_t vi=0; vi0) countnboot+=1; } - countnboot+=2*(Int_t)nevent/MAXSTORAGE; + countnboot+=(Int_t)(2*nevent/MAXSTORAGE); // printf("\ncountnboot=%d\n",countnboot); // // information about calibration OBT - Int_t COBT[neventC]; + ULong64_t COBT[neventC]; for (Int_t vi=0; viSetTextSize(0.08); Int_t i=0; - Float_t x[MAXSTORAGE], xb[MAXSTORAGE]; + Long64_t x[MAXSTORAGE], xb[MAXSTORAGE]; Float_t yyd[MAXSTORAGE][12],yyb[MAXSTORAGE][12]; Int_t countbad[12]; Float_t perc=0,xMIN=0.,xMAX=0.; @@ -296,32 +296,35 @@ x[(ev-minev)]= ph->GetOrbitalTime(); i=0; - for (Int_t n=0; n<12 ; n++){ - yyb[countbad[n]][i]=0; - xb[countbad[n]]= 0; - - i=te->DSPnumber[n]-1; - - yyd[(ev-minev)][i]=te->DATAlength[n]; - if(i==6){ - if(yyd[(ev-minev)][i]>1500){ - if(yyd[(ev-minev)][i]<3075){ - yyb[countbad[i]][i]= yyd[(ev-minev)][i]; - xb[countbad[i]]= x[(ev-minev)]; - countbad[i]+=1; + for (Int_t n=0; n<12 ; n++){ + i=te->DSPnumber[n]-1; + if(i>=0){ + if(i<12){ + yyb[countbad[i]][i]=0; + xb[countbad[i]]= 0; + + yyd[(ev-minev)][i]=te->DATAlength[n]; + if(i==6){ + if(yyd[(ev-minev)][i]>1500){ + if(yyd[(ev-minev)][i]<3075){ + yyb[countbad[i]][i]= yyd[(ev-minev)][i]; + xb[countbad[i]]= x[(ev-minev)]; + countbad[i]+=1; + } + } } - } - } - else{ - if(yyd[(ev-minev)][i]>750){ - if(yyd[(ev-minev)][i]<3075){ - yyb[countbad[i]][i]= yyd[(ev-minev)][i]; - xb[countbad[i]]= x[(ev-minev)]; - countbad[i]+=1; + else{ + if(yyd[(ev-minev)][i]>750){ + if(yyd[(ev-minev)][i]<3075){ + yyb[countbad[i]][i]= yyd[(ev-minev)][i]; + xb[countbad[i]]= x[(ev-minev)]; + countbad[i]+=1; + } + } } } } - } + } } } @@ -335,65 +338,70 @@ // // Draw Histos - for (Int_t i=0; i<12 ; i++){ + for (Int_t n=0; n<12 ; n++){ - Float_t y[maxev-minev],yb[maxev-minev]; + Double_t yd[maxev-minev],ybd[maxev-minev]; + Double_t xd[maxev-minev],xbd[maxev-minev]; + for(Int_t v=0;v1000){ - perc=(countbad[i]*100)/(maxev-minev); - if(perc>10) pad[i][ii]->SetFillColor(2); - else pad[i][ii]->SetFillColor(10); + perc=(countbad[n]*100)/(maxev-minev); + if(perc>10) pad[n][ii]->SetFillColor(2); + else pad[n][ii]->SetFillColor(10); + } else{ - if(countbad[i]>=100) pad[i][ii]->SetFillColor(2); - else pad[i][ii]->SetFillColor(10); + if(countbad[n]>=100) pad[n][ii]->SetFillColor(2); + else pad[n][ii]->SetFillColor(10); } - oss<<"DSP "<cd(); - pad[i][ii]->SetFrameFillColor(10); - pad[i][ii]->Draw(); - pad[i][ii]->cd(); - dataletime[i][ii]= new TGraph((maxev-minev),x,y); - dataletime[i][ii]->SetTitle(oss.str().c_str()); - dataletime[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); - dataletime[i][ii]->GetXaxis()->CenterTitle(); - dataletime[i][ii]->GetXaxis()->SetRangeUser(xMIN,xMAX); - dataletime[i][ii]->GetYaxis()->SetTitle("datalength (Word 13 bit)"); - dataletime[i][ii]->GetYaxis()->CenterTitle(); - if(i==6) dataletime[i][ii]->GetYaxis()->SetRangeUser(0,4500); - else dataletime[i][ii]->GetYaxis()->SetRangeUser(0,4000); - dataletime[i][ii]->SetMarkerStyle(21); - if((maxev-minev)<50) dataletime[i][ii]->SetMarkerSize(0.5); - else dataletime[i][ii]->SetMarkerSize(0.1); - dataletime[i][ii]->SetMarkerColor(4); - dataletime[i][ii]->Draw("ap"); + pad[n][ii]->SetFrameFillColor(10); + pad[n][ii]->Draw(); + pad[n][ii]->cd(); + dataletime[n][ii]= new TGraph((maxev-minev),xd,yd); + if(maxev-minev==1) dataletime[n][ii]->GetXaxis()->SetNdivisions(-501); + dataletime[n][ii]->SetTitle(oss.str().c_str()); + dataletime[n][ii]->GetXaxis()->SetTitle("OBT (ms)"); + dataletime[n][ii]->GetXaxis()->CenterTitle(); + dataletime[n][ii]->GetXaxis()->SetRangeUser(xMIN,xMAX); + dataletime[n][ii]->GetYaxis()->SetTitle("datalength (Word 13 bit)"); + dataletime[n][ii]->GetYaxis()->CenterTitle(); + if(i==6) dataletime[n][ii]->GetYaxis()->SetRangeUser(0,4500); + else dataletime[n][ii]->GetYaxis()->SetRangeUser(0,4000); + dataletime[n][ii]->SetMarkerStyle(21); + if((maxev-minev)<50) dataletime[n][ii]->SetMarkerSize(0.5); + else dataletime[n][ii]->SetMarkerSize(0.1); + dataletime[n][ii]->SetMarkerColor(4); + dataletime[n][ii]->Draw("ap"); if((maxev-minev)>1000 && perc>10){ - dataletime1[i][ii]= new TGraph(countbad[i],xb,yb); - dataletime1[i][ii]->SetMarkerStyle(21); - if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); - else dataletime1[i][ii]->SetMarkerSize(0.1); - dataletime1[i][ii]->SetMarkerColor(2); - dataletime1[i][ii]->Draw("psame"); - } - else if((maxev-minev)<1000 && countbad[i]>=100){ - dataletime1[i][ii]= new TGraph(countbad[i],xb,yb); - dataletime1[i][ii]->SetMarkerStyle(21); - if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); - else dataletime1[i][ii]->SetMarkerSize(0.1); - dataletime1[i][ii]->SetMarkerColor(2); - dataletime1[i][ii]->Draw("psame"); + dataletime1[n][ii]= new TGraph(countbad[n],xbd,ybd); + dataletime1[n][ii]->SetMarkerStyle(21); + dataletime1[n][ii]->SetMarkerSize(0.1); + dataletime1[n][ii]->SetMarkerColor(2); + dataletime1[n][ii]->Draw("psame"); + } + else if((maxev-minev)<1000 && countbad[n]>=100){ + dataletime1[n][ii]= new TGraph(countbad[n],xbd,ybd); + dataletime1[n][ii]->SetMarkerStyle(21); + if((maxev-minev)<50) dataletime1[n][ii]->SetMarkerSize(0.5); + else dataletime1[n][ii]->SetMarkerSize(0.1); + dataletime1[n][ii]->SetMarkerColor(2); + dataletime1[n][ii]->Draw("psame"); } li.SetLineColor(1); li.SetLineStyle(1);