29 |
#include <TrkAlarmEvent.h> |
#include <TrkAlarmEvent.h> |
30 |
#include <tsbt/TsbTRecord.h> |
#include <tsbt/TsbTRecord.h> |
31 |
#include <tsbt/TsbTEvent.h> |
#include <tsbt/TsbTEvent.h> |
32 |
|
#include <EventCounter.h> |
33 |
|
#include <PacketType.h> |
34 |
// |
// |
35 |
#define MAXSTORAGE 50000 |
#define MAXSTORAGE 50000 |
36 |
|
|
75 |
pamela::PscuHeader *ph=0,*pH=0; |
pamela::PscuHeader *ph=0,*pH=0; |
76 |
pamela::TrkAlarmEvent *al=0; |
pamela::TrkAlarmEvent *al=0; |
77 |
pamela::RunHeaderEvent *reh=0; |
pamela::RunHeaderEvent *reh=0; |
78 |
|
pamela::EventCounter *cod=0; |
79 |
|
|
80 |
|
pamela::PacketType *pctp=0; |
81 |
|
|
82 |
TFile *datafile = new TFile(file); |
TFile *datafile = new TFile(file); |
83 |
|
|
153 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
154 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
155 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
156 |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
// if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
157 |
countrun+=1; |
// countrun+=1; |
158 |
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
159 |
} |
} |
|
countrun+=(Int_t)nevent/30000; |
|
|
// printf("\ncountrun=%d\n",countrun); |
|
160 |
|
|
161 |
// |
// |
162 |
// other variables definitions |
// other variables definitions |
181 |
tmpSize = event->Records->GetEntries(); |
tmpSize = event->Records->GetEntries(); |
182 |
for (Int_t j = 0; j < tmpSize; j++){ |
for (Int_t j = 0; j < tmpSize; j++){ |
183 |
record = (pamela::TsbTRecord*)event->Records->At(j); |
record = (pamela::TsbTRecord*)event->Records->At(j); |
184 |
xt[siztmp]=record->RECORD_OBT; //0.051*record->RECORD_OBT; |
xt[siztmp]=record->RECORD_OBT; //0.051*record->RECORD_OBT; |
185 |
|
if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) |
186 |
|
countrun+=1; |
187 |
|
|
188 |
for (Int_t z = 0; z < 5; z++){ |
for (Int_t z = 0; z < 5; z++){ |
189 |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
190 |
} |
} |
191 |
siztmp++; |
siztmp++; |
192 |
} |
} |
193 |
} |
} |
194 |
|
// printf("\ncountrun=%d\n",countrun); |
195 |
|
countrun+=(Int_t)nevent/30000; |
196 |
|
|
197 |
// |
// |
198 |
// open the output text files for the alarms |
// open the output text files for the alarms |
283 |
gStyle->SetTitleSize(0.06,"y"); |
gStyle->SetTitleSize(0.06,"y"); |
284 |
gStyle->SetTitleSize(0.055,"x"); |
gStyle->SetTitleSize(0.055,"x"); |
285 |
|
|
286 |
|
//************************************************************************************* |
287 |
|
//book pads and histos |
288 |
|
//*************************************************************************************** |
289 |
|
|
290 |
|
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*TempCanv[countrun]; |
291 |
|
TCanvas *IlluminaCanv,*LandauCanv1,*LandauCanv2,*LandauCanv3; |
292 |
|
|
293 |
|
TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; |
294 |
|
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; |
295 |
|
|
296 |
|
for(Int_t n = 0; n<12; n++) { |
297 |
|
|
298 |
|
/* -----------> HISTOGRAMS */ |
299 |
|
|
300 |
|
tit<<"DSP "<<n+1; |
301 |
|
oss1<<"DSP "<<n+1; |
302 |
|
oss2<<"DSPh "<<n+1; |
303 |
|
oss3<<"DSP h "<<n+1; |
304 |
|
oss4<<"DSP h"<<n+1; |
305 |
|
|
306 |
|
landau1[n]= new TH1F(oss1.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
307 |
|
landau2[n]= new TH1F(oss2.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
308 |
|
landau3[n]= new TH1F(oss3.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
309 |
|
|
310 |
|
illuminazione[n]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); |
311 |
|
|
312 |
|
tit.str(""); |
313 |
|
oss1.str(""); |
314 |
|
oss2.str(""); |
315 |
|
oss3.str(""); |
316 |
|
oss4.str(""); |
317 |
|
}; |
318 |
|
|
319 |
|
|
320 |
|
|
321 |
//*************************************************************************************** |
//*************************************************************************************** |
322 |
// LOOP on each event |
// LOOP on each event |
326 |
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
327 |
else |
else |
328 |
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
329 |
|
|
330 |
|
TLatex *t=new TLatex(); |
331 |
|
TLatex *t1=new TLatex(); |
332 |
|
|
333 |
|
Int_t cntpgtemp=0,cntpgdat=0; |
334 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countHOBT=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
|
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
|
|
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
|
335 |
TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun]; |
TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun]; |
|
TH1F *landau1[12][countrun],*landau2[12][countrun],*landau3[12][countrun],*illuminazione[12][countrun]; |
|
336 |
|
|
|
|
|
337 |
for(Int_t ii=0; ii<countrun;ii++){ |
for(Int_t ii=0; ii<countrun;ii++){ |
|
TPaveText *pt1; |
|
|
TPad *pt,*pt0; |
|
|
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
|
|
|
|
|
ofstream warning(out + "warning.txt",ios::out); |
|
|
|
|
338 |
//**************************************************************************************** |
//**************************************************************************************** |
339 |
//Output figures --- First sheet: |
//Output figures --- Fifth sheet: |
340 |
//**************************************************************************************** |
//**************************************************************************************** |
341 |
fromfile.str(""); |
fromfile.str(""); |
342 |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
343 |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
isfile<<"Temperatures vs OBT pag"<<ii+1; |
344 |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
345 |
CompTimeCanv[ii]->SetFillColor(10); |
TempCanv[ii]->SetFillColor(10); |
346 |
CompTimeCanv[ii]->Range(0,0,100,100); |
TempCanv[ii]->Range(0,0,100,100); |
|
TLatex *t=new TLatex(); |
|
|
t->SetTextFont(32); |
|
|
t->SetTextColor(1); |
|
|
t->SetTextAlign(12); |
|
|
t->SetTextSize(0.02); |
|
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
|
|
TLatex *t1=new TLatex(); |
|
|
t1->SetTextFont(32); |
|
|
t1->SetTextColor(1); |
|
|
t1->SetTextAlign(12); |
|
|
t1->SetTextSize(0.02); |
|
|
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
|
|
|
|
//**************************************************************************************** |
|
|
//Output figures --- Second sheet: |
|
|
//**************************************************************************************** |
|
347 |
|
|
|
isfile<<"WARNINGS on DSP EVENT NUMBER pag"<<ii+1; |
|
|
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
EventNumCanv[ii]->SetFillColor(10); |
|
|
EventNumCanv[ii]->Range(0,0,100,100); |
|
348 |
t->SetTextFont(32); |
t->SetTextFont(32); |
349 |
t->SetTextColor(1); |
t->SetTextColor(1); |
350 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
354 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
355 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
356 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
357 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
358 |
isfile.str(""); |
isfile.str(""); |
359 |
|
|
360 |
|
Float_t tposy = 0.95; // up y-coord - top pads |
361 |
|
Float_t thpad = 0; // pad height |
362 |
|
Float_t tposx1=0; // left x-coord - pad column |
363 |
|
Float_t tposx0=0; // x-coord - column division |
364 |
|
Float_t twrel = 0; // relative x size of first sub-column |
365 |
|
Float_t tmarg = 0.004; // margin among pads |
366 |
|
|
367 |
|
thpad = (tposy-tmarg*5)/3; |
368 |
|
twrel = (1-tmarg*4)/2; |
369 |
|
|
370 |
|
for(Int_t i=0; i<5; i++){ |
371 |
|
if ( (i+1)%2==1 ) { |
372 |
|
if(i>1) tposy = tposy-(tmarg*2+thpad); |
373 |
|
tposx1 = tmarg; |
374 |
|
tposx0 = tposx1 + twrel; |
375 |
|
} |
376 |
|
else { |
377 |
|
tposx1 = tposx0 + 2*tmarg; |
378 |
|
tposx0 = tposx1 + twrel; |
379 |
|
} |
380 |
|
|
381 |
|
/* -----------> pad for histograms */ |
382 |
|
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
383 |
|
|
384 |
//**************************************************************************************** |
Int_t v=0,xt_tmp[tsize]; |
385 |
//Output figures --- Third sheet: |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
386 |
//**************************************************************************************** |
|
387 |
|
if(ev==tsize-1 && i==4) countTEMP=tsize-1; |
388 |
|
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
389 |
|
if(i==4) countTEMP=ev; |
390 |
|
break; |
391 |
|
} |
392 |
|
else{ |
393 |
|
if(tempt[ev][i]!=65535){ |
394 |
|
tempt_tmp[v]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
395 |
|
if(tempt_tmp[v]>0) xt_tmp[v++]=xt[ev]; |
396 |
|
} |
397 |
|
} |
398 |
|
} |
399 |
|
TempCanv[ii]->cd(); |
400 |
|
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
401 |
|
pad6[i]->SetFillColor(10); |
402 |
|
pad6[i]->Draw(); |
403 |
|
pad6[i]->cd(); |
404 |
|
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
405 |
|
temp[i][ii]->SetTitle(tit.str().c_str()); |
406 |
|
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
407 |
|
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
408 |
|
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
409 |
|
temp[i][ii]->GetXaxis()->CenterTitle(); |
410 |
|
temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
411 |
|
temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
412 |
|
temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
413 |
|
temp[i][ii]->GetYaxis()->SetLabelSize(0.04); |
414 |
|
temp[i][ii]->GetYaxis()->SetTitleSize(0.04); |
415 |
|
temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
416 |
|
temp[i][ii]->GetYaxis()->CenterTitle(); |
417 |
|
temp[i][ii]->SetMarkerStyle(21); |
418 |
|
temp[i][ii]->SetMarkerSize(0.2); |
419 |
|
temp[i][ii]->Draw("ap"); |
420 |
|
tit.str(""); |
421 |
|
TempCanv[ii]->Update(); |
422 |
|
|
423 |
|
} |
424 |
|
if(countTEMP==tsize-1){ |
425 |
|
cntpgtemp=ii+1; |
426 |
|
break; |
427 |
|
} |
428 |
|
} |
429 |
|
|
|
isfile<<"Cluster Signal ladder1 pag"<<ii+1; |
|
|
LandauCanv1[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
LandauCanv1[ii]->SetFillColor(10); |
|
|
LandauCanv1[ii]->Range(0,0,100,100); |
|
430 |
|
|
431 |
t->SetTextFont(32); |
for(Int_t ii=0; ii<countrun;ii++){ |
432 |
t->SetTextColor(1); |
TPaveText *pt1; |
433 |
t->SetTextAlign(12); |
TPad *pt,*pt0; //pad for histos |
|
t->SetTextSize(0.02); |
|
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
|
|
t1->SetTextFont(32); |
|
|
t1->SetTextColor(1); |
|
|
t1->SetTextAlign(12); |
|
|
t1->SetTextSize(0.02); |
|
|
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
434 |
|
|
435 |
|
ofstream warning(out + "warning.txt",ios::out); |
436 |
|
|
437 |
//**************************************************************************************** |
//**************************************************************************************** |
438 |
//Output figures --- Third sheet: |
//Output figures --- First sheet: |
439 |
//**************************************************************************************** |
//**************************************************************************************** |
440 |
|
fromfile.str(""); |
441 |
isfile<<"Cluster Signal ladder2 pag"<<ii+1; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
442 |
LandauCanv2[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
443 |
LandauCanv2[ii]->SetFillColor(10); |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
444 |
LandauCanv2[ii]->Range(0,0,100,100); |
CompTimeCanv[ii]->SetFillColor(10); |
445 |
|
CompTimeCanv[ii]->Range(0,0,100,100); |
446 |
t->SetTextFont(32); |
t->SetTextFont(32); |
447 |
t->SetTextColor(1); |
t->SetTextColor(1); |
448 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
452 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
453 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
454 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
455 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
456 |
isfile.str(""); |
isfile.str(""); |
457 |
|
|
458 |
//**************************************************************************************** |
//**************************************************************************************** |
459 |
//Output figures --- Third sheet: |
//Output figures --- Second sheet: |
460 |
//**************************************************************************************** |
//**************************************************************************************** |
461 |
|
|
462 |
isfile<<"Cluster Signal ladder3 pag"<<ii+1; |
isfile<<"WARNINGS on DSP EVENT NUMBER pag"<<ii+1; |
463 |
LandauCanv3[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
464 |
LandauCanv3[ii]->SetFillColor(10); |
EventNumCanv[ii]->SetFillColor(10); |
465 |
LandauCanv3[ii]->Range(0,0,100,100); |
EventNumCanv[ii]->Range(0,0,100,100); |
|
|
|
466 |
t->SetTextFont(32); |
t->SetTextFont(32); |
467 |
t->SetTextColor(1); |
t->SetTextColor(1); |
468 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
474 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
475 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
476 |
isfile.str(""); |
isfile.str(""); |
|
|
|
|
//**************************************************************************************** |
|
|
//Output figures --- Fourth sheet: |
|
|
//**************************************************************************************** |
|
477 |
|
|
|
isfile<<"lighting of the views pag"<<ii+1; |
|
|
IlluminaCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
IlluminaCanv[ii]->SetFillColor(10); |
|
|
IlluminaCanv[ii]->Range(0,0,100,100); |
|
|
t->SetTextFont(32); |
|
|
t->SetTextColor(1); |
|
|
t->SetTextAlign(12); |
|
|
t->SetTextSize(0.02); |
|
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
|
|
t1->SetTextFont(32); |
|
|
t1->SetTextColor(1); |
|
|
t1->SetTextAlign(12); |
|
|
t1->SetTextSize(0.02); |
|
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
|
|
|
|
//**************************************************************************************** |
|
|
//Output figures --- Fifth sheet: |
|
|
//**************************************************************************************** |
|
|
|
|
|
isfile<<"Temperatures vs OBT pag"<<ii+1; |
|
|
TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
TempCanv[ii]->SetFillColor(10); |
|
|
TempCanv[ii]->Range(0,0,100,100); |
|
|
|
|
|
t->SetTextFont(32); |
|
|
t->SetTextColor(1); |
|
|
t->SetTextAlign(12); |
|
|
t->SetTextSize(0.02); |
|
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
|
|
t1->SetTextFont(32); |
|
|
t1->SetTextColor(1); |
|
|
t1->SetTextAlign(12); |
|
|
t1->SetTextSize(0.02); |
|
|
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
|
|
|
|
//************************************************************************************* |
|
|
//book pads and histos |
|
|
//*************************************************************************************** |
|
478 |
Float_t posy = 0.95; // up y-coord - top pads |
Float_t posy = 0.95; // up y-coord - top pads |
479 |
Float_t hpad = 0; // pad height |
Float_t hpad = 0; // pad height |
480 |
Float_t posx1=0; // left x-coord - pad column |
Float_t posx1=0; // left x-coord - pad column |
481 |
Float_t posx0=0; // x-coord - column division |
Float_t posx0=0; // x-coord - column division |
482 |
Float_t wrel = 0; // relative x size of first sub-column |
Float_t wrel = 0; // relative x size of first sub-column |
483 |
Float_t marg = 0.004; // margin among pads |
Float_t marg = 0.004; // margin among pads |
484 |
Float_t tposy = 0.95; // up y-coord - top pads |
|
|
Float_t thpad = 0; // pad height |
|
|
Float_t tposx1=0; // left x-coord - pad column |
|
|
Float_t tposx0=0; // x-coord - column division |
|
|
Float_t twrel = 0; // relative x size of first sub-column |
|
|
Float_t tmarg = 0.004; // margin among pads |
|
|
|
|
485 |
hpad = (posy-marg*11)/6; |
hpad = (posy-marg*11)/6; |
486 |
wrel = (1-marg*4)/2; |
wrel = (1-marg*4)/2; |
487 |
thpad = (tposy-tmarg*5)/3; |
|
|
twrel = (1-tmarg*4)/2; |
|
|
|
|
488 |
for(Int_t n = 0; n<12; n++) { |
for(Int_t n = 0; n<12; n++) { |
489 |
|
|
490 |
if ( (n+1)%2==1 ) { |
if ( (n+1)%2==1 ) { |
491 |
if(n>1) posy = posy-(marg*2+hpad); |
if(n>1) posy = posy-(marg*2+hpad); |
492 |
posx1 = marg; |
posx1 = marg; |
495 |
else { |
else { |
496 |
posx1 = posx0 + 2*marg; |
posx1 = posx0 + 2*marg; |
497 |
posx0 = posx1 + wrel; |
posx0 = posx1 + wrel; |
498 |
} |
} |
499 |
|
|
|
if ( (n+1)%2==1 ) { |
|
|
if(n>1) tposy = tposy-(tmarg*2+thpad); |
|
|
tposx1 = tmarg; |
|
|
tposx0 = tposx1 + twrel; |
|
|
} |
|
|
else { |
|
|
tposx1 = tposx0 + 2*tmarg; |
|
|
tposx0 = tposx1 + twrel; |
|
|
} |
|
|
|
|
|
|
|
500 |
/* -----------> pad for histograms */ |
/* -----------> pad for histograms */ |
501 |
pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
502 |
pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
503 |
pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
504 |
pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
505 |
pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
506 |
if(n<5) pad6[n] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
} |
|
|
|
|
|
|
|
/* -----------> HISTOGRAMS */ |
|
|
|
|
|
tit<<"DSP "<<n+1; |
|
|
oss1<<"DSP "<<n*100+ii; |
|
|
oss2<<"DSPh "<<n*100+ii; |
|
|
oss3<<"DSP h "<<n*100+ii; |
|
|
oss4<<"DSP h"<<n*100+ii; |
|
|
|
|
|
landau1[n][ii]= new TH1F(oss1.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
|
|
landau2[n][ii]= new TH1F(oss2.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
|
|
landau3[n][ii]= new TH1F(oss3.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
|
|
|
|
|
illuminazione[n][ii]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); |
|
|
|
|
|
tit.str(""); |
|
|
oss1.str(""); |
|
|
oss2.str(""); |
|
|
oss3.str(""); |
|
|
oss4.str(""); |
|
|
}; |
|
|
|
|
|
|
|
|
// printf("\nprova0\n"); |
|
|
|
|
|
|
|
507 |
//********************************************************************************** |
//********************************************************************************** |
508 |
// Fill Graphs and Histos |
// Fill Graphs and Histos |
509 |
//********************************************************************************** |
//********************************************************************************** |
514 |
Float_t x[MAXSTORAGE]; |
Float_t x[MAXSTORAGE]; |
515 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
516 |
Float_t eventint[MAXSTORAGE]; |
Float_t eventint[MAXSTORAGE]; |
517 |
|
|
518 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
519 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
520 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
521 |
|
cod = eh->GetCounter(); |
522 |
|
|
523 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
524 |
|
|
525 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
538 |
for(Int_t j=0;j<3;j++){ |
for(Int_t j=0;j<3;j++){ |
539 |
if(te->signcluster[i][j]!=0){ |
if(te->signcluster[i][j]!=0){ |
540 |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
541 |
// if((dsp==1 && te->addrcluster[i][2]>767 && te->addrcluster[i][2]<1024) || (dsp==6 && te->addrcluster[i][0]>511 && te->addrcluster[i][0]<769) ||(dsp==6 && te->addrcluster[i][1]>0 && te->addrcluster[i][1]<769) ||(dsp==6 && te->addrcluster[i][2]>511 && te->addrcluster[i][2]<769) ||(dsp==11 && te->addrcluster[i][0]>767 && te->addrcluster[i][0]<1024)); |
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
|
// else |
|
|
illuminazione[dsp][ii]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
|
542 |
} |
} |
543 |
} |
} |
544 |
} |
} |
545 |
if(x[ev-minev]>HOBT[countHOBT+1]) |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
|
countHOBT+=1; |
|
|
if(trk_cal_us[countHOBT]!=104){ |
|
546 |
if(!(dsp%2)){ |
if(!(dsp%2)){ |
547 |
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
// if((te->addrcluster[i][0]>6 && te->addrcluster[i][0]<505) ||(te->addrcluster[i][0]>518 && te->addrcluster[i][0]<1018)) |
548 |
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
549 |
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
// if((te->addrcluster[i][1]>6 && te->addrcluster[i][1]<505) ||(te->addrcluster[i][1]>518 && te->addrcluster[i][1]<1018)) |
550 |
|
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
551 |
|
// if((te->addrcluster[i][2]>6 && te->addrcluster[i][2]<505) ||(te->addrcluster[i][2]>518 && te->addrcluster[i][2]<1018)) |
552 |
|
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
553 |
} |
} |
554 |
else{ |
else{ |
555 |
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)te->signcluster[i][0]); |
// if((te->addrcluster[i][0]>6 && te->addrcluster[i][0]<505) ||(te->addrcluster[i][0]>518 && te->addrcluster[i][0]<1018)) |
556 |
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)te->signcluster[i][1]); |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
557 |
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)te->signcluster[i][2]); |
// if((te->addrcluster[i][1]>6 && te->addrcluster[i][1]<505) ||(te->addrcluster[i][1]>518 && te->addrcluster[i][1]<1018)) |
558 |
|
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
559 |
|
// if((te->addrcluster[i][2]>6 && te->addrcluster[i][2]<505) ||(te->addrcluster[i][2]>518 && te->addrcluster[i][2]<1018)) |
560 |
|
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
561 |
} |
} |
562 |
} |
} |
563 |
|
|
564 |
WARNING[i]=0; |
WARNING[i]=0; |
565 |
if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ |
if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ |
566 |
ALARM = 1; //general alarm |
ALARM = 1; //general alarm |
640 |
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
641 |
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
642 |
|
|
|
|
|
|
Float_t maxhist=0; |
|
|
TBox b; |
|
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
|
|
|
643 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
644 |
Float_t yyc[maxev-minev]; |
Float_t yyc[maxev-minev]; |
645 |
for (Int_t v=0; v<maxev-minev; v++){ |
for (Int_t v=0; v<maxev-minev; v++){ |
646 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
647 |
} |
} |
|
|
|
|
LandauCanv1[ii]->cd(); |
|
|
pad1[i]->SetFillColor(10); |
|
|
pad1[i]->SetFrameFillColor(10); |
|
|
pad1[i]->Draw(); |
|
|
pad1[i]->cd(); |
|
|
landau1[i][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau1[i][ii]->GetXaxis()->CenterTitle(); |
|
|
landau1[i][ii]->Draw(""); |
|
|
LandauCanv1[ii]->Update(); |
|
|
|
|
|
LandauCanv2[ii]->cd(); |
|
|
pad4[i]->SetFillColor(10); |
|
|
pad4[i]->SetFrameFillColor(10); |
|
|
pad4[i]->Draw(); |
|
|
pad4[i]->cd(); |
|
|
landau2[i][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau2[i][ii]->GetXaxis()->CenterTitle(); |
|
|
landau2[i][ii]->Draw(""); |
|
|
LandauCanv2[ii]->Update(); |
|
|
|
|
|
LandauCanv3[ii]->cd(); |
|
|
pad5[i]->SetFillColor(10); |
|
|
pad5[i]->SetFrameFillColor(10); |
|
|
pad5[i]->Draw(); |
|
|
pad5[i]->cd(); |
|
|
landau3[i][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau3[i][ii]->GetXaxis()->CenterTitle(); |
|
|
landau3[i][ii]->Draw(""); |
|
|
LandauCanv3[ii]->Update(); |
|
|
|
|
|
IlluminaCanv[ii]->cd(); |
|
|
pad2[i]->SetFillColor(10); |
|
|
pad2[i]->SetFrameFillColor(10); |
|
|
pad2[i]->SetLogy(); |
|
|
pad2[i]->Draw(); |
|
|
pad2[i]->cd(); |
|
|
illuminazione[i][ii]->GetXaxis()->SetTitle("strip with max signal"); |
|
|
illuminazione[i][ii]->GetXaxis()->CenterTitle(); |
|
|
illuminazione[i][ii]->Draw(""); |
|
|
if(i==1){ |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(2816.,0.,3060.,maxhist); |
|
|
} |
|
|
else if(i==6){ |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(2560.,0.,2816.,maxhist); |
|
|
b.DrawBox(512.,0.,768.,maxhist); |
|
|
b.DrawBox(1024.,0.,1792.,maxhist); |
|
|
} |
|
|
else if(i==11){ |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(768.,0.,1024.,maxhist); |
|
|
} |
|
|
IlluminaCanv[ii]->Update(); |
|
|
|
|
648 |
|
|
649 |
CompTimeCanv[ii]->cd(); |
CompTimeCanv[ii]->cd(); |
650 |
pad3[i]->SetFillColor(10); |
pad3[i]->SetFillColor(10); |
662 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
663 |
oss1.str(""); |
oss1.str(""); |
664 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |
665 |
}; |
} |
666 |
|
|
667 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
668 |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
700 |
eventnumb[ii]->SetMarkerSize(0.3); |
eventnumb[ii]->SetMarkerSize(0.3); |
701 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
702 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
|
|
|
|
obt=0; |
|
|
for(Int_t i=0; i<5; i++){ |
|
|
Int_t v=0; |
|
|
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
|
|
tree->GetEntry(ev); |
|
|
ph=eT->GetPscuHeader(); |
|
|
|
|
|
if(ph->GetOrbitalTime()<obt && ev>countTEMP){ |
|
|
countTEMP=ev; |
|
|
break; |
|
|
} |
|
|
else{ |
|
|
obt=ph->GetOrbitalTime(); |
|
|
tempt_tmp[v++]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
|
|
} |
|
|
} |
|
|
TempCanv[ii]->cd(); |
|
|
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
|
|
pad6[i]->SetFillColor(10); |
|
|
pad6[i]->Draw(); |
|
|
pad6[i]->cd(); |
|
|
temp[i][ii]= new TGraph(v,xt,tempt_tmp); |
|
|
temp[i][ii]->SetTitle(tit.str().c_str()); |
|
|
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
|
|
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
|
|
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
|
|
temp[i][ii]->GetXaxis()->CenterTitle(); |
|
|
temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
|
|
temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
|
|
temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
|
|
temp[i][ii]->GetYaxis()->SetLabelSize(0.04); |
|
|
temp[i][ii]->GetYaxis()->SetTitleSize(0.04); |
|
|
temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
|
|
temp[i][ii]->GetYaxis()->CenterTitle(); |
|
|
temp[i][ii]->SetMarkerStyle(21); |
|
|
temp[i][ii]->SetMarkerSize(0.2); |
|
|
temp[i][ii]->Draw("ap"); |
|
|
tit.str(""); |
|
|
TempCanv[ii]->Update(); |
|
|
} |
|
703 |
|
|
704 |
|
|
705 |
|
warning.close(); |
706 |
minev=maxev; |
minev=maxev; |
707 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
708 |
countrun=ii+1; |
cntpgdat=ii+1; |
709 |
break; |
break; |
710 |
} |
} |
|
|
|
|
warning.close(); |
|
711 |
} |
} |
712 |
|
|
|
//***************************************** |
|
|
//close all files |
|
|
//***************************************** |
|
713 |
alarm.close(); |
alarm.close(); |
714 |
|
|
715 |
|
//**************************************************************************************** |
716 |
|
//Output figures --- Third sheet: |
717 |
|
//**************************************************************************************** |
718 |
|
|
719 |
|
fromfile.str(""); |
720 |
|
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
721 |
|
isfile<<"Cluster Signal ladder1"; |
722 |
|
LandauCanv1=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
723 |
|
LandauCanv1->SetFillColor(10); |
724 |
|
LandauCanv1->Range(0,0,100,100); |
725 |
|
|
726 |
|
t->SetTextFont(32); |
727 |
|
t->SetTextColor(1); |
728 |
|
t->SetTextAlign(12); |
729 |
|
t->SetTextSize(0.02); |
730 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
731 |
|
t1->SetTextFont(32); |
732 |
|
t1->SetTextColor(1); |
733 |
|
t1->SetTextAlign(12); |
734 |
|
t1->SetTextSize(0.02); |
735 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
736 |
|
isfile.str(""); |
737 |
|
|
738 |
|
//**************************************************************************************** |
739 |
|
//Output figures --- Third sheet: |
740 |
|
//**************************************************************************************** |
741 |
|
|
742 |
|
isfile<<"Cluster Signal ladder2"; |
743 |
|
LandauCanv2=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
744 |
|
LandauCanv2->SetFillColor(10); |
745 |
|
LandauCanv2->Range(0,0,100,100); |
746 |
|
|
747 |
|
t->SetTextFont(32); |
748 |
|
t->SetTextColor(1); |
749 |
|
t->SetTextAlign(12); |
750 |
|
t->SetTextSize(0.02); |
751 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
752 |
|
t1->SetTextFont(32); |
753 |
|
t1->SetTextColor(1); |
754 |
|
t1->SetTextAlign(12); |
755 |
|
t1->SetTextSize(0.02); |
756 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
757 |
|
isfile.str(""); |
758 |
|
|
759 |
|
//**************************************************************************************** |
760 |
|
//Output figures --- Third sheet: |
761 |
|
//**************************************************************************************** |
762 |
|
|
763 |
|
isfile<<"Cluster Signal ladder3"; |
764 |
|
LandauCanv3=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
765 |
|
LandauCanv3->SetFillColor(10); |
766 |
|
LandauCanv3->Range(0,0,100,100); |
767 |
|
|
768 |
|
t->SetTextFont(32); |
769 |
|
t->SetTextColor(1); |
770 |
|
t->SetTextAlign(12); |
771 |
|
t->SetTextSize(0.02); |
772 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
773 |
|
t1->SetTextFont(32); |
774 |
|
t1->SetTextColor(1); |
775 |
|
t1->SetTextAlign(12); |
776 |
|
t1->SetTextSize(0.02); |
777 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
778 |
|
isfile.str(""); |
779 |
|
|
780 |
|
//**************************************************************************************** |
781 |
|
//Output figures --- Fourth sheet: |
782 |
|
//**************************************************************************************** |
783 |
|
|
784 |
|
isfile<<"lighting of the views"; |
785 |
|
IlluminaCanv=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
786 |
|
IlluminaCanv->SetFillColor(10); |
787 |
|
IlluminaCanv->Range(0,0,100,100); |
788 |
|
t->SetTextFont(32); |
789 |
|
t->SetTextColor(1); |
790 |
|
t->SetTextAlign(12); |
791 |
|
t->SetTextSize(0.02); |
792 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
793 |
|
t1->SetTextFont(32); |
794 |
|
t1->SetTextColor(1); |
795 |
|
t1->SetTextAlign(12); |
796 |
|
t1->SetTextSize(0.02); |
797 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
798 |
|
isfile.str(""); |
799 |
|
|
800 |
|
for (Int_t i=0; i<12 ; i++){ |
801 |
|
|
802 |
|
TBox b; |
803 |
|
b.SetFillColor(6); |
804 |
|
b.SetFillStyle(3945); |
805 |
|
|
806 |
|
Float_t maxhist=0; |
807 |
|
LandauCanv1->cd(); |
808 |
|
pad1[i]->SetFillColor(10); |
809 |
|
pad1[i]->SetFrameFillColor(10); |
810 |
|
pad1[i]->Draw(); |
811 |
|
pad1[i]->cd(); |
812 |
|
landau1[i]->GetXaxis()->SetTitle("max signal"); |
813 |
|
landau1[i]->GetXaxis()->CenterTitle(); |
814 |
|
landau1[i]->Draw(""); |
815 |
|
LandauCanv1->Update(); |
816 |
|
|
817 |
|
LandauCanv2->cd(); |
818 |
|
pad4[i]->SetFillColor(10); |
819 |
|
pad4[i]->SetFrameFillColor(10); |
820 |
|
pad4[i]->Draw(); |
821 |
|
pad4[i]->cd(); |
822 |
|
landau2[i]->GetXaxis()->SetTitle("max signal"); |
823 |
|
landau2[i]->GetXaxis()->CenterTitle(); |
824 |
|
landau2[i]->Draw(""); |
825 |
|
LandauCanv2->Update(); |
826 |
|
|
827 |
|
LandauCanv3->cd(); |
828 |
|
pad5[i]->SetFillColor(10); |
829 |
|
pad5[i]->SetFrameFillColor(10); |
830 |
|
pad5[i]->Draw(); |
831 |
|
pad5[i]->cd(); |
832 |
|
landau3[i]->GetXaxis()->SetTitle("max signal"); |
833 |
|
landau3[i]->GetXaxis()->CenterTitle(); |
834 |
|
landau3[i]->Draw(""); |
835 |
|
LandauCanv3->Update(); |
836 |
|
|
837 |
|
IlluminaCanv->cd(); |
838 |
|
pad2[i]->SetFillColor(10); |
839 |
|
pad2[i]->SetFrameFillColor(10); |
840 |
|
pad2[i]->SetLogy(); |
841 |
|
pad2[i]->Draw(); |
842 |
|
pad2[i]->cd(); |
843 |
|
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
844 |
|
illuminazione[i]->GetXaxis()->CenterTitle(); |
845 |
|
illuminazione[i]->Draw(""); |
846 |
|
if(i==1){ |
847 |
|
maxhist= illuminazione[i]->GetMaximum(); |
848 |
|
b.DrawBox(2816.,0.,3060.,maxhist); |
849 |
|
} |
850 |
|
else if(i==6){ |
851 |
|
maxhist= illuminazione[i]->GetMaximum(); |
852 |
|
b.DrawBox(2560.,0.,2816.,maxhist); |
853 |
|
b.DrawBox(512.,0.,768.,maxhist); |
854 |
|
b.DrawBox(1024.,0.,1792.,maxhist); |
855 |
|
} |
856 |
|
else if(i==11){ |
857 |
|
maxhist= illuminazione[i]->GetMaximum(); |
858 |
|
b.DrawBox(768.,0.,1024.,maxhist); |
859 |
|
} |
860 |
|
IlluminaCanv->Update(); |
861 |
|
} |
862 |
|
|
863 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
864 |
//************************************************************************* |
//************************************************************************* |
865 |
// Save output Files |
// Save output Files |
866 |
//************************************************************************* |
//************************************************************************* |
867 |
stringstream out1,out2,out3,command; |
stringstream out1,out2,out3,command; |
868 |
|
Int_t totpg=0; |
869 |
for(Int_t fl=0;fl<countrun;fl++){ |
if(cntpgtemp>cntpgdat) totpg=cntpgtemp; |
870 |
|
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
871 |
|
|
872 |
|
for(Int_t fl=0;fl<totpg;fl++){ |
873 |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
874 |
out1.str(""); |
out1.str(""); |
875 |
out2.str(""); |
out2.str(""); |
879 |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
880 |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
881 |
|
|
882 |
if(countrun==1){ |
if(totpg==1){ |
883 |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
884 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
885 |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
886 |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
887 |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
888 |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
889 |
TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); |
890 |
} |
} |
891 |
else if(countrun>=1){ |
else if(totpg>1){ |
892 |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
893 |
else CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl>0 && fl<cntpgdat) CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
894 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
895 |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
896 |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl==totpg-1){ |
897 |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
898 |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
899 |
if(fl!=countrun-1) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
900 |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); |
901 |
|
} |
902 |
} |
} |
903 |
} |
} |
904 |
else{ |
else{ |
905 |
out1.str(""); |
out1.str(""); |
906 |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
907 |
CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
908 |
out1.str(""); |
out1.str(""); |
909 |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
910 |
TempCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out1.str().c_str()); |
911 |
out1.str(""); |
out1.str(""); |
912 |
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
913 |
EventNumCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out1.str().c_str()); |
914 |
out1.str(""); |
if(fl==countrun-1){ |
915 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
916 |
LandauCanv1[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1."<<outfile.Data(); |
917 |
out1.str(""); |
LandauCanv1->Print(out+out1.str().c_str()); |
918 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
919 |
LandauCanv2[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2."<<outfile.Data(); |
920 |
out1.str(""); |
LandauCanv2->Print(out+out1.str().c_str()); |
921 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
922 |
LandauCanv3[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3."<<outfile.Data(); |
923 |
out1.str(""); |
LandauCanv3->Print(out+out1.str().c_str()); |
924 |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
925 |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting."<<outfile.Data(); |
926 |
|
IlluminaCanv->Print(out+out1.str().c_str()); |
927 |
|
} |
928 |
} |
} |
929 |
} |
} |
930 |
|
|