| 1 |
/** |
/** |
| 2 |
* FTrkQLook_BASIC.cpp |
* FTrkQLook_BASIC.cxx |
| 3 |
* |
* |
| 4 |
* autor: D.Fedele |
* autor: D.Fedele |
| 5 |
* version 2.0 |
* version v1r04 |
| 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 |
| 17 |
#include <TCanvas.h> |
#include <TCanvas.h> |
| 18 |
#include <TGraph.h> |
#include <TGraph.h> |
| 19 |
#include <TStyle.h> |
#include <TStyle.h> |
| 20 |
|
#include <TFile.h> |
| 21 |
#include <TTree.h> |
#include <TTree.h> |
| 22 |
#include <TArrow.h> |
#include <TArrow.h> |
| 23 |
// |
// |
| 29 |
#include <PacketType.h> |
#include <PacketType.h> |
| 30 |
// |
// |
| 31 |
#define MAXSTORAGE 50000 |
#define MAXSTORAGE 50000 |
|
#define GAP 10040*4 |
|
|
|
|
|
void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ |
|
|
if ( to == 0 ){ |
|
|
Int_t t2length = s2.Length(); |
|
|
s1 = ""; |
|
|
to = t2length; |
|
|
}; |
|
|
for (Int_t i = from; i<to; i++){ |
|
|
s1.Append(s2[i],1); |
|
|
}; |
|
|
}; |
|
|
|
|
| 32 |
|
|
| 33 |
void FTrkQLook_BASIC(TString file,Int_t fromevent,Int_t toevent, TString outdir,TString outfile) |
void FTrkQLook_BASIC(TString file,Int_t fromevent,Int_t toevent, TString outdir,TString outfile) |
| 34 |
{ |
{ |
| 35 |
// |
// |
| 36 |
// obtain information about the data file and select the output dir |
// obtain information about the data file and select the output dir |
| 37 |
const string filepath=file.Data(); |
const string filepath=file.Data(); |
| 38 |
Int_t dwpos = filepath.rfind("/"); |
Int_t dwpos = file.Last('/'); |
| 39 |
Int_t dwpos1 = filepath.find(".root"); |
Int_t dwpos1 = file.Last('.'); |
|
TString fpath=(filepath.c_str()); |
|
| 40 |
TString base,ffile ; |
TString base,ffile ; |
| 41 |
stringcopy(ffile,fpath,dwpos+1,dwpos1); |
ffile=file(dwpos+1,dwpos1-(dwpos+1)); |
| 42 |
stringcopy(base,fpath,0,dwpos); |
if(dwpos>0) base=file(0,dwpos); |
|
if(dwpos>0) base+="/"; |
|
| 43 |
|
|
| 44 |
TString out; |
TString out; |
| 45 |
if(outdir.Length()==0){ |
if(outdir.Length()==0){ |
| 47 |
}else{ |
}else{ |
| 48 |
out = outdir; |
out = outdir; |
| 49 |
} |
} |
| 50 |
|
if(out.Last('/')+1<out.Length()) out+="/"; |
| 51 |
|
|
| 52 |
// |
// |
| 53 |
// inizialise the variables and open the file |
// inizialise the variables and open the file |
| 112 |
// |
// |
| 113 |
// other variables definitions |
// other variables definitions |
| 114 |
stringstream oss,fromfile,isfile; |
stringstream oss,fromfile,isfile; |
| 115 |
const Int_t sizeH=neventH; |
// |
| 116 |
const Int_t sizeC=neventC; |
// information about the RunHeader |
| 117 |
Int_t count=0,trk_cal_us[sizeH],countrun=1; |
Int_t HOBT[neventH]; |
| 118 |
Float_t perc=0,xMIN=0,xMAX=0; |
Int_t trk_cal_us[neventH]; |
| 119 |
Int_t HOBT[sizeH],COBT[sizeC]; |
for (Int_t vi=0; vi<neventH;vi++){ |
|
|
|
|
for (Int_t vi=0; vi<sizeH;vi++){ |
|
| 120 |
HOBT[vi]=0; |
HOBT[vi]=0; |
| 121 |
trk_cal_us[vi]=0; |
trk_cal_us[vi]=0; |
| 122 |
} |
} |
| 123 |
for (Int_t vi=0; vi<sizeC;vi++){ |
|
|
COBT[vi]=0; |
|
|
} |
|
|
|
|
|
//*************************************************************************************** |
|
|
// LOOP on each event |
|
|
//*************************************************************************************** |
|
|
|
|
| 124 |
// |
// |
| 125 |
// information about trk_calib_used |
// information about RunHeader |
| 126 |
|
Int_t countnboot=1; |
| 127 |
for (Int_t ev=0; ev<neventH; ev++){ |
for (Int_t ev=0; ev<neventH; ev++){ |
| 128 |
otr->GetEntry(ev); |
otr->GetEntry(ev); |
| 129 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
| 130 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
| 131 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
| 132 |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
| 133 |
countrun+=1; |
countnboot+=1; |
|
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
|
| 134 |
} |
} |
| 135 |
countrun+=(Int_t)nevent/30000; |
countnboot+=2*(Int_t)nevent/MAXSTORAGE; |
| 136 |
// printf("\ncountrun=%d\n",countrun); |
// printf("\ncountnboot=%d\n",countnboot); |
| 137 |
|
|
| 138 |
// |
// |
| 139 |
// information about calibration OBT |
// information about calibration OBT |
| 140 |
|
Int_t COBT[neventC]; |
| 141 |
|
for (Int_t vi=0; vi<neventC;vi++){ |
| 142 |
|
COBT[vi]=0; |
| 143 |
|
} |
| 144 |
for (Int_t ev=0; ev<neventC; ev++){ |
for (Int_t ev=0; ev<neventC; ev++){ |
| 145 |
ctr->GetEntry(ev); |
ctr->GetEntry(ev); |
| 146 |
pH = ceh->GetPscuHeader(); |
pH = ceh->GetPscuHeader(); |
| 147 |
COBT[ev]= pH->GetOrbitalTime(); |
COBT[ev]= pH->GetOrbitalTime(); |
| 148 |
} |
} |
| 149 |
|
|
| 150 |
//**************************************************************************************** |
// |
| 151 |
//Output figure |
// Style options |
|
//**************************************************************************************** |
|
| 152 |
gStyle->SetLabelSize(0.06,"x"); |
gStyle->SetLabelSize(0.06,"x"); |
| 153 |
gStyle->SetLabelSize(0.06,"y"); |
gStyle->SetLabelSize(0.06,"y"); |
| 154 |
gStyle->SetStatFontSize(0.075); |
gStyle->SetStatFontSize(0.075); |
| 161 |
gStyle->SetTitleSize(0.06,"y"); |
gStyle->SetTitleSize(0.06,"y"); |
| 162 |
gStyle->SetTitleSize(0.055,"x"); |
gStyle->SetTitleSize(0.055,"x"); |
| 163 |
|
|
| 164 |
|
//*************************************************************************************** |
| 165 |
|
// LOOP on each event |
| 166 |
|
//*************************************************************************************** |
| 167 |
|
|
| 168 |
|
if (fromevent!=0) |
| 169 |
|
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
| 170 |
|
else |
| 171 |
|
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
| 172 |
|
|
| 173 |
|
|
| 174 |
Int_t minev=minevent,maxev=maxevent,hin=0,hfin=0,cin=0,cfin=0; |
Int_t minev=minevent,maxev=maxevent,hin=0,hfin=0,cin=0,cfin=0; |
| 175 |
TPad *pad[12][countrun] ; //pad for histos |
TPad *pad[12][countnboot]; |
| 176 |
TGraph *dataletime[12][countrun],*dataletime1[12][countrun]; |
TGraph *dataletime[12][countnboot],*dataletime1[12][countnboot]; |
| 177 |
TCanvas *DataTimeCanv[countrun]; |
TCanvas *DataTimeCanv[countnboot]; |
| 178 |
for(Int_t ii=0; ii<countrun;ii++){ |
for(Int_t ii=0; ii<countnboot;ii++){ |
| 179 |
fromfile<<"FTrkQLook_BASIC File: "<<ffile; |
fromfile<<"FTrkQLook_BASIC File: "<<ffile; |
| 180 |
isfile<<"DATALENGTH vs. OBT pag"<<ii+1; |
isfile<<"DATALENGTH vs. OBT pag"<<ii+1; |
| 181 |
DataTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
DataTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
| 207 |
fromfile.str(""); |
fromfile.str(""); |
| 208 |
isfile.str(""); |
isfile.str(""); |
| 209 |
|
|
| 210 |
fromfile<<"The green arrow (if present) probably points out the time of the online calibration"; |
fromfile<<"The green arrow (if present) points out the time of the online calibration"; |
| 211 |
t->DrawLatex(7.,96.,fromfile.str().c_str()); |
t->DrawLatex(7.,96.,fromfile.str().c_str()); |
| 212 |
fromfile.str(""); |
fromfile.str(""); |
| 213 |
|
|
| 252 |
|
|
| 253 |
TArrow ar; |
TArrow ar; |
| 254 |
ar.SetLineColor(3); |
ar.SetLineColor(3); |
|
//********************************************************************************** |
|
|
// Fill Graphs and Histos |
|
|
//********************************************************************************** |
|
| 255 |
stringstream calus; |
stringstream calus; |
| 256 |
|
|
| 257 |
TLatex *t2=new TLatex(); |
TLatex *t2=new TLatex(); |
| 263 |
Int_t i=0; |
Int_t i=0; |
| 264 |
Float_t x[MAXSTORAGE], xb[MAXSTORAGE]; |
Float_t x[MAXSTORAGE], xb[MAXSTORAGE]; |
| 265 |
Float_t yyd[MAXSTORAGE][12],yyb[MAXSTORAGE][12]; |
Float_t yyd[MAXSTORAGE][12],yyb[MAXSTORAGE][12]; |
| 266 |
|
Int_t countbad[12]; |
| 267 |
|
Float_t perc=0,xMIN=0.,xMAX=0.; |
| 268 |
|
for (Int_t n=0; n<12 ; n++) |
| 269 |
|
countbad[n]=0; |
| 270 |
|
|
| 271 |
|
// |
| 272 |
|
// obtain values of the datalenght |
| 273 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
| 274 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
| 275 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 276 |
cod = eh->GetCounter(); |
cod = eh->GetCounter(); |
| 277 |
|
|
| 278 |
if(ev==minev){ |
if(ev==minev){ |
| 279 |
if(cod->Get(pctp->CalibTrk1)>0) |
if(cod->Get(pctp->CalibTrk1)>0) cin=cod->Get(pctp->CalibTrk1)-1; |
| 280 |
cin=cod->Get(pctp->CalibTrk1)-1; |
else cin=cod->Get(pctp->CalibTrk1); |
| 281 |
else |
if(cin==cfin-1) cin+=1; |
| 282 |
cin=cod->Get(pctp->CalibTrk1); |
|
| 283 |
if(cod->Get(pctp->RunHeader)>0) |
if(cod->Get(pctp->RunHeader)>0) hin=cod->Get(pctp->RunHeader)-1; |
| 284 |
hin=cod->Get(pctp->RunHeader)-1; |
else hin=cod->Get(pctp->RunHeader); |
| 285 |
else |
if(hin==hfin-1) hin+=1; |
|
hin=cod->Get(pctp->RunHeader); |
|
| 286 |
} |
} |
| 287 |
|
|
| 288 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
| 298 |
i=0; |
i=0; |
| 299 |
|
|
| 300 |
for (Int_t n=0; n<12 ; n++){ |
for (Int_t n=0; n<12 ; n++){ |
| 301 |
perc=0; |
yyb[countbad[n]][i]=0; |
| 302 |
count=0; |
xb[countbad[n]]= 0; |
|
yyb[count][i]=0; |
|
|
xb[count]= 0; |
|
| 303 |
|
|
| 304 |
i=te->DSPnumber[n]-1; |
i=te->DSPnumber[n]-1; |
| 305 |
|
|
| 307 |
if(i==6){ |
if(i==6){ |
| 308 |
if(yyd[(ev-minev)][i]>1500){ |
if(yyd[(ev-minev)][i]>1500){ |
| 309 |
if(yyd[(ev-minev)][i]<3075){ |
if(yyd[(ev-minev)][i]<3075){ |
| 310 |
yyb[count][i]= yyd[(ev-minev)][i]; |
yyb[countbad[i]][i]= yyd[(ev-minev)][i]; |
| 311 |
xb[count]= x[(ev-minev)]; |
xb[countbad[i]]= x[(ev-minev)]; |
| 312 |
count++; |
countbad[i]+=1; |
| 313 |
} |
} |
| 314 |
} |
} |
| 315 |
} |
} |
| 316 |
else{ |
else{ |
| 317 |
if(yyd[(ev-minev)][i]>750){ |
if(yyd[(ev-minev)][i]>750){ |
| 318 |
if(yyd[(ev-minev)][i]<3075){ |
if(yyd[(ev-minev)][i]<3075){ |
| 319 |
yyb[count][i]= yyd[(ev-minev)][i]; |
yyb[countbad[i]][i]= yyd[(ev-minev)][i]; |
| 320 |
xb[count]= x[(ev-minev)]; |
xb[countbad[i]]= x[(ev-minev)]; |
| 321 |
count++; |
countbad[i]+=1; |
| 322 |
} |
} |
| 323 |
} |
} |
| 324 |
} |
} |
| 326 |
} |
} |
| 327 |
} |
} |
| 328 |
|
|
| 329 |
Float_t xmin1=0,xmin2=0; |
// |
| 330 |
xmin1=x[0]-(x[maxev-minev-1]-x[0])/10; |
// define limit for the Xaxis of the graphs |
| 331 |
xmin2=x[0]-(x[maxev-minev-1]-COBT[cin])/10; |
|
|
// printf("\n%f\t%f \n",x[0],x[maxev-minev-1]); |
|
|
if(xmin1<xmin2) xMIN=xmin1; |
|
|
else if(xmin2<xmin1) xMIN=xmin2; |
|
| 332 |
xMAX=x[maxev-minev-1]+(x[maxev-minev-1]-x[0])/10; |
xMAX=x[maxev-minev-1]+(x[maxev-minev-1]-x[0])/10; |
| 333 |
// printf("\nxMIN=%f\txMAX=%f\n",xMIN,xMAX); |
if(xMAX>1000000) xMIN=x[0]-(x[maxev-minev-1]-x[0])/10; |
| 334 |
if(xMIN<0) xMIN=0; |
if(xMAX<1000000 || xMIN<0) xMIN=0.; |
| 335 |
|
|
| 336 |
|
|
| 337 |
|
// |
| 338 |
|
// Draw Histos |
| 339 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
| 340 |
|
|
| 341 |
Float_t y[maxev-minev],yb[maxev-minev]; |
Float_t y[maxev-minev],yb[maxev-minev]; |
| 344 |
yb[v]=yyb[v][i]; |
yb[v]=yyb[v][i]; |
| 345 |
} |
} |
| 346 |
|
|
| 347 |
|
if(xMAX<1000000){ |
| 348 |
|
x[maxev-minev-1]=0.; |
| 349 |
|
y[maxev-minev-1]=0.; |
| 350 |
|
} |
| 351 |
|
|
| 352 |
if((maxev-minev)>1000){ |
if((maxev-minev)>1000){ |
| 353 |
perc=(count*100)/(maxev-minev); |
perc=(countbad[i]*100)/(maxev-minev); |
| 354 |
if(perc>10) pad[i][ii]->SetFillColor(2); |
if(perc>10) pad[i][ii]->SetFillColor(2); |
| 355 |
else pad[i][ii]->SetFillColor(10); |
else pad[i][ii]->SetFillColor(10); |
| 356 |
} |
} |
| 357 |
else{ |
else{ |
| 358 |
if(count>=100) pad[i][ii]->SetFillColor(2); |
if(countbad[i]>=100) pad[i][ii]->SetFillColor(2); |
| 359 |
else pad[i][ii]->SetFillColor(10); |
else pad[i][ii]->SetFillColor(10); |
| 360 |
} |
} |
| 361 |
|
|
| 372 |
dataletime[i][ii]->GetYaxis()->SetTitle("datalength (Word 13 bit)"); |
dataletime[i][ii]->GetYaxis()->SetTitle("datalength (Word 13 bit)"); |
| 373 |
dataletime[i][ii]->GetYaxis()->CenterTitle(); |
dataletime[i][ii]->GetYaxis()->CenterTitle(); |
| 374 |
if(i==6) dataletime[i][ii]->GetYaxis()->SetRangeUser(0,4500); |
if(i==6) dataletime[i][ii]->GetYaxis()->SetRangeUser(0,4500); |
| 375 |
else dataletime[i][ii]->GetYaxis()->SetRangeUser(0,3500); |
else dataletime[i][ii]->GetYaxis()->SetRangeUser(0,4000); |
| 376 |
dataletime[i][ii]->SetMarkerStyle(21); |
dataletime[i][ii]->SetMarkerStyle(21); |
| 377 |
if((maxev-minev)<50) dataletime[i][ii]->SetMarkerSize(0.5); |
if((maxev-minev)<50) dataletime[i][ii]->SetMarkerSize(0.5); |
| 378 |
else dataletime[i][ii]->SetMarkerSize(0.3); |
else dataletime[i][ii]->SetMarkerSize(0.1); |
| 379 |
dataletime[i][ii]->SetMarkerColor(4); |
dataletime[i][ii]->SetMarkerColor(4); |
| 380 |
dataletime[i][ii]->Draw("ap"); |
dataletime[i][ii]->Draw("ap"); |
| 381 |
|
|
| 382 |
|
|
| 383 |
if((maxev-minev)>1000 && perc>10){ |
if((maxev-minev)>1000 && perc>10){ |
| 384 |
dataletime1[i][ii]= new TGraph(count,xb,yb); |
dataletime1[i][ii]= new TGraph(countbad[i],xb,yb); |
| 385 |
dataletime1[i][ii]->SetMarkerStyle(21); |
dataletime1[i][ii]->SetMarkerStyle(21); |
| 386 |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
| 387 |
else dataletime1[i][ii]->SetMarkerSize(0.3); |
else dataletime1[i][ii]->SetMarkerSize(0.1); |
| 388 |
dataletime1[i][ii]->SetMarkerColor(2); |
dataletime1[i][ii]->SetMarkerColor(2); |
| 389 |
dataletime1[i][ii]->Draw("psame"); |
dataletime1[i][ii]->Draw("psame"); |
| 390 |
} |
} |
| 391 |
else if((maxev-minev)<1000 && count>=100){ |
else if((maxev-minev)<1000 && countbad[i]>=100){ |
| 392 |
dataletime1[i][ii]= new TGraph(count,xb,yb); |
dataletime1[i][ii]= new TGraph(countbad[i],xb,yb); |
| 393 |
dataletime1[i][ii]->SetMarkerStyle(21); |
dataletime1[i][ii]->SetMarkerStyle(21); |
| 394 |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
if((maxev-minev)<50) dataletime1[i][ii]->SetMarkerSize(0.5); |
| 395 |
else dataletime1[i][ii]->SetMarkerSize(0.3); |
else dataletime1[i][ii]->SetMarkerSize(0.1); |
| 396 |
dataletime1[i][ii]->SetMarkerColor(2); |
dataletime1[i][ii]->SetMarkerColor(2); |
| 397 |
dataletime1[i][ii]->Draw("psame"); |
dataletime1[i][ii]->Draw("psame"); |
| 398 |
} |
} |
| 408 |
li.SetLineWidth(1); |
li.SetLineWidth(1); |
| 409 |
for(Int_t j=hin;j<hfin;j++){ |
for(Int_t j=hin;j<hfin;j++){ |
| 410 |
if(i==6) li.DrawLine(HOBT[j],0.,HOBT[j],4500.); |
if(i==6) li.DrawLine(HOBT[j],0.,HOBT[j],4500.); |
| 411 |
else li.DrawLine(HOBT[j],0.,HOBT[j],3500.); |
else li.DrawLine(HOBT[j],0.,HOBT[j],4000.); |
| 412 |
if(trk_cal_us[j]==104){ |
if(trk_cal_us[j]==104){ |
| 413 |
calus<<"D"; |
calus<<"D"; |
| 414 |
t2->SetTextColor(6); |
t2->SetTextColor(6); |
| 415 |
if(i==6) t2->DrawLatex(HOBT[j],4350.,calus.str().c_str()); |
if(i==6) t2->DrawLatex(HOBT[j],4350.,calus.str().c_str()); |
| 416 |
else t2->DrawLatex(HOBT[j],3350.,calus.str().c_str()); |
else t2->DrawLatex(HOBT[j],3850.,calus.str().c_str()); |
| 417 |
calus.str(""); |
calus.str(""); |
| 418 |
} |
} |
| 419 |
else{ |
else{ |
| 420 |
calus<<"O"; |
calus<<"O"; |
| 421 |
t2->SetTextColor(3); |
t2->SetTextColor(3); |
| 422 |
if(i==6) t2->DrawLatex(HOBT[j],4350.,calus.str().c_str()); |
if(i==6) t2->DrawLatex(HOBT[j],4350.,calus.str().c_str()); |
| 423 |
else t2->DrawLatex(HOBT[j],3350.,calus.str().c_str()); |
else t2->DrawLatex(HOBT[j],3850.,calus.str().c_str()); |
| 424 |
calus.str(""); |
calus.str(""); |
| 425 |
} |
} |
| 426 |
} |
} |
| 428 |
if(i==6) ar.DrawArrow(COBT[j],1700.,COBT[j],2700.,0.01,"<"); |
if(i==6) ar.DrawArrow(COBT[j],1700.,COBT[j],2700.,0.01,"<"); |
| 429 |
else ar.DrawArrow(COBT[j],1000.,COBT[j],2000.,0.01,"<"); |
else ar.DrawArrow(COBT[j],1000.,COBT[j],2000.,0.01,"<"); |
| 430 |
} |
} |
| 431 |
|
|
| 432 |
oss.str(""); |
oss.str(""); |
| 433 |
DataTimeCanv[ii]->Update(); |
DataTimeCanv[ii]->Update(); |
| 434 |
} |
} |
| 435 |
|
|
| 436 |
minev=maxev; |
minev=maxev; |
|
// printf("\ncountrun=%d\n",ii); |
|
| 437 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
| 438 |
countrun=ii+1; |
countnboot=ii+1; |
| 439 |
break; |
break; |
| 440 |
} |
} |
| 441 |
} |
} |
| 442 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
| 443 |
|
|
| 444 |
//************************************************************************* |
//************************************************************************* |
| 445 |
// Save output Files |
// Save output Files |
| 446 |
//************************************************************************* |
//************************************************************************* |
| 447 |
stringstream nom1,nom2,nom3; |
stringstream nom1,nom2,nom3; |
| 448 |
|
|
| 449 |
for(Int_t fl=0;fl<countrun;fl++){ |
for(Int_t fl=0;fl<countnboot;fl++){ |
| 450 |
if(countrun==1){ |
if(countnboot==1){ |
| 451 |
nom1<<ffile<<"_FTrkQLook_BASIC."<<outfile.Data(); |
nom1<<ffile<<"_FTrkQLook_BASIC."<<outfile.Data(); |
| 452 |
DataTimeCanv[fl]->Print(out+nom1.str().c_str()); |
DataTimeCanv[fl]->Print(out+nom1.str().c_str()); |
| 453 |
nom1.str(""); |
nom1.str(""); |
| 454 |
} |
} |
| 455 |
|
|
| 456 |
if(countrun>=2){ |
if(countnboot>=2){ |
| 457 |
if(!strcmp(outfile.Data(),"ps") || !strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"ps") || !strcmp(outfile.Data(),"pdf")){ |
| 458 |
nom1.str(""); |
nom1.str(""); |
| 459 |
nom2.str(""); |
nom2.str(""); |
| 462 |
nom2<<ffile<<"_FTrkQLook_BASIC.ps"; |
nom2<<ffile<<"_FTrkQLook_BASIC.ps"; |
| 463 |
nom3<<ffile<<"_FTrkQLook_BASIC.ps)"; |
nom3<<ffile<<"_FTrkQLook_BASIC.ps)"; |
| 464 |
if(fl==0) DataTimeCanv[fl]->Print(out+nom1.str().c_str(),"portrait"); |
if(fl==0) DataTimeCanv[fl]->Print(out+nom1.str().c_str(),"portrait"); |
| 465 |
else if(fl==countrun-1) DataTimeCanv[fl]->Print(out+nom3.str().c_str(),"portrait"); |
else if(fl==countnboot-1) DataTimeCanv[fl]->Print(out+nom3.str().c_str(),"portrait"); |
| 466 |
else DataTimeCanv[fl]->Print(out+nom2.str().c_str(),"portrait"); |
else DataTimeCanv[fl]->Print(out+nom2.str().c_str(),"portrait"); |
| 467 |
|
|
| 468 |
} |
} |
| 474 |
} |
} |
| 475 |
} |
} |
| 476 |
|
|
| 477 |
if(!strcmp(outfile.Data(),"pdf") && countrun>=2){ |
// |
| 478 |
|
// Convert ps to pdf if required |
| 479 |
|
if(!strcmp(outfile.Data(),"pdf") && countnboot>=2){ |
| 480 |
stringstream com; |
stringstream com; |
| 481 |
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_BASIC.ps "<<out<<ffile<<"_FTrkQLook_BASIC.pdf"; |
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_BASIC.ps "<<out<<ffile<<"_FTrkQLook_BASIC.pdf"; |
| 482 |
system(com.str().c_str()); |
system(com.str().c_str()); |