30 |
#include <tsbt/TsbTRecord.h> |
#include <tsbt/TsbTRecord.h> |
31 |
#include <tsbt/TsbTEvent.h> |
#include <tsbt/TsbTEvent.h> |
32 |
// |
// |
33 |
|
#define MAXSTORAGE 50000 |
34 |
|
|
35 |
void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ |
void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ |
36 |
if ( to == 0 ){ |
if ( to == 0 ){ |
153 |
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
154 |
} |
} |
155 |
countrun+=(Int_t)nevent/30000; |
countrun+=(Int_t)nevent/30000; |
156 |
printf("\ncountrun=%d\n",countrun); |
// printf("\ncountrun=%d\n",countrun); |
157 |
|
|
158 |
// |
// |
159 |
// other variables definitions |
// other variables definitions |
160 |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
161 |
Int_t ALARM=0; |
Int_t ALARM=0; |
162 |
Int_t WARNING[12]; |
Int_t WARNING[12]; |
|
Float_t hi=0; |
|
163 |
|
|
164 |
// |
// |
165 |
// information about the entries for the temperatures |
// information about the entries for the temperatures |
248 |
alarm1 << " DSPMask= "<< hex<<(Int_t)al->DSPMask<<endl; |
alarm1 << " DSPMask= "<< hex<<(Int_t)al->DSPMask<<endl; |
249 |
alarm1 << " FlashOn= "<< hex<<(Int_t)al->FlashOn<<endl; |
alarm1 << " FlashOn= "<< hex<<(Int_t)al->FlashOn<<endl; |
250 |
alarm1 << " PNum= "<< hex<<(Int_t)al->PNum<<endl; |
alarm1 << " PNum= "<< hex<<(Int_t)al->PNum<<endl; |
251 |
alarm1 << " TrigMask= "<< hex<<(Int_t)al->TrigMask<<endl; |
alarm1 << " TrigMask= "<< hex<<(Int_t)al->TrigMask<<dec<<endl; |
252 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
253 |
|
|
254 |
} |
} |
281 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
282 |
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
283 |
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
284 |
TGraph *comprtime[12][countrun],*temp[5][countrun]; |
TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun]; |
|
TGraph *eventnumb[countrun]; |
|
285 |
TH1F *landau1[12][countrun],*landau2[12][countrun],*landau3[12][countrun],*illuminazione[12][countrun]; |
TH1F *landau1[12][countrun],*landau2[12][countrun],*landau3[12][countrun],*illuminazione[12][countrun]; |
286 |
|
|
287 |
|
|
288 |
for(Int_t ii=0; ii<countrun;ii++){ |
for(Int_t ii=0; ii<countrun;ii++){ |
289 |
TPaveText *pt1; |
TPaveText *pt1; |
290 |
TPad *pt,*pt0; |
TPad *pt,*pt0; |
291 |
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
|
|
|
292 |
|
|
293 |
ofstream warning(out + "warning.txt",ios::out); |
ofstream warning(out + "warning.txt",ios::out); |
294 |
|
|
295 |
//**************************************************************************************** |
//**************************************************************************************** |
296 |
//Output figures --- First sheet: |
//Output figures --- First sheet: |
297 |
//**************************************************************************************** |
//**************************************************************************************** |
298 |
|
fromfile.str(""); |
299 |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
300 |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
301 |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
312 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
313 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
314 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
315 |
t1->DrawLatex(59.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
316 |
isfile.str(""); |
isfile.str(""); |
317 |
|
|
318 |
//**************************************************************************************** |
//**************************************************************************************** |
332 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
333 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
334 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
335 |
t1->DrawLatex(63.4,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
336 |
isfile.str(""); |
isfile.str(""); |
337 |
|
|
338 |
//**************************************************************************************** |
//**************************************************************************************** |
353 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
354 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
355 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
356 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
357 |
isfile.str(""); |
isfile.str(""); |
358 |
|
|
359 |
//**************************************************************************************** |
//**************************************************************************************** |
374 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
375 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
376 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
377 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
378 |
isfile.str(""); |
isfile.str(""); |
379 |
|
|
380 |
//**************************************************************************************** |
//**************************************************************************************** |
395 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
396 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
397 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
398 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
399 |
isfile.str(""); |
isfile.str(""); |
400 |
|
|
401 |
//**************************************************************************************** |
//**************************************************************************************** |
415 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
416 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
417 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
418 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
419 |
isfile.str(""); |
isfile.str(""); |
420 |
|
|
421 |
//**************************************************************************************** |
//**************************************************************************************** |
436 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
437 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
438 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
439 |
t1->DrawLatex(75.,98.7,isfile.str().c_str()); |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
440 |
isfile.str(""); |
isfile.str(""); |
441 |
|
|
442 |
//************************************************************************************* |
//************************************************************************************* |
494 |
|
|
495 |
/* -----------> HISTOGRAMS */ |
/* -----------> HISTOGRAMS */ |
496 |
|
|
497 |
|
tit<<"DSP "<<n+1; |
498 |
oss1<<"DSP "<<n*100+ii; |
oss1<<"DSP "<<n*100+ii; |
499 |
oss2<<"DSPh "<<n*100+ii; |
oss2<<"DSPh "<<n*100+ii; |
500 |
oss3<<"DSP h "<<n*100+ii; |
oss3<<"DSP h "<<n*100+ii; |
501 |
oss4<<"DSP h"<<n*100+ii; |
oss4<<"DSP h"<<n*100+ii; |
502 |
|
|
503 |
landau1[n][ii]=new TH1F(oss1.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
landau1[n][ii]= new TH1F(oss1.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
504 |
landau1[n][ii]->GetXaxis()->SetTitle("max signal"); |
landau2[n][ii]= new TH1F(oss2.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
505 |
landau1[n][ii]->GetXaxis()->CenterTitle(); |
landau3[n][ii]= new TH1F(oss3.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
|
landau2[n][ii]=new TH1F(oss2.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
|
|
landau2[n][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau2[n][ii]->GetXaxis()->CenterTitle(); |
|
|
landau3[n][ii]=new TH1F(oss3.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
|
|
landau3[n][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau3[n][ii]->GetXaxis()->CenterTitle(); |
|
|
|
|
|
illuminazione[n][ii]=new TH1F(oss4.str().c_str(),oss1.str().c_str(),3073,-0.5,3072.5); |
|
|
illuminazione[n][ii]->GetXaxis()->SetTitle("strip with max signal"); |
|
|
illuminazione[n][ii]->GetXaxis()->CenterTitle(); |
|
506 |
|
|
507 |
|
illuminazione[n][ii]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); |
508 |
|
|
509 |
|
tit.str(""); |
510 |
oss1.str(""); |
oss1.str(""); |
511 |
oss2.str(""); |
oss2.str(""); |
512 |
oss3.str(""); |
oss3.str(""); |
524 |
// |
// |
525 |
// information about the tracker data |
// information about the tracker data |
526 |
Int_t warning_dspnumber=0; |
Int_t warning_dspnumber=0; |
527 |
Float_t x[30000]; |
Float_t x[MAXSTORAGE]; |
528 |
Float_t yc[30000][12]; |
Float_t yc[MAXSTORAGE][12]; |
529 |
Float_t eventint[30000]; |
Float_t eventint[MAXSTORAGE]; |
530 |
|
|
531 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
532 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
533 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
534 |
|
|
535 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
536 |
|
|
537 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==30000){ |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
538 |
maxev=ev; |
maxev=ev; |
539 |
printf("prova12 ev=%d\tev-minev=%d\n",ev,ev-minev); |
// printf("prova12 ev=%d\tev-minev=%d\n",ev,ev-minev); |
540 |
break; |
break; |
541 |
} |
} |
542 |
else{ |
else{ |
551 |
|
|
552 |
for(Int_t j=0;j<3;j++){ |
for(Int_t j=0;j<3;j++){ |
553 |
if(te->signcluster[i][j]!=0){ |
if(te->signcluster[i][j]!=0){ |
554 |
hi=(j*1024)+te->addrcluster[i][j]; |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
555 |
if((hi>505 && hi<519) ||(hi>1017 && hi<1031) ||(hi>1529 && hi<1543) || (hi>2041 && hi<2055) ||(hi>2553 && hi<2567)) |
// 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)) |
556 |
continue; |
// continue; |
557 |
else illuminazione[dsp][ii]->Fill(hi); |
// else |
558 |
|
illuminazione[dsp][ii]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
|
if(!(dsp%2)){ |
|
|
landau1[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
|
|
landau2[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
|
|
landau3[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
|
|
} |
|
|
else{ |
|
|
landau1[dsp][ii]->Fill(te->signcluster[i][j]); |
|
|
landau2[dsp][ii]->Fill(te->signcluster[i][j]); |
|
|
landau3[dsp][ii]->Fill(te->signcluster[i][j]); |
|
559 |
} |
} |
560 |
} |
} |
561 |
} |
} |
562 |
|
if(!(dsp%2)){ |
563 |
|
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
564 |
|
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
565 |
|
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
566 |
|
} |
567 |
|
else{ |
568 |
|
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)te->signcluster[i][0]); |
569 |
|
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)te->signcluster[i][1]); |
570 |
|
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)te->signcluster[i][2]); |
571 |
|
} |
572 |
|
|
573 |
WARNING[i]=0; |
WARNING[i]=0; |
574 |
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){ |
607 |
//******************************************************************************************** |
//******************************************************************************************** |
608 |
// file ALARM |
// file ALARM |
609 |
//******************************************************************************************** |
//******************************************************************************************** |
610 |
|
|
611 |
alarm <<endl<< "================================================="<< endl; |
if(ALARM==1) { |
612 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm <<endl<< "================================================="<< endl; |
613 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
614 |
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
615 |
alarm << "================================================="<< endl; |
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
616 |
|
alarm << "================================================="<< endl; |
617 |
if(ALARM==1) { |
|
618 |
alarm << " DSPn"; |
alarm << " DSPn"; |
619 |
alarm << " Event"; |
alarm << " Event"; |
620 |
alarm << " Words"; |
alarm << " Words"; |
645 |
} |
} |
646 |
} |
} |
647 |
} |
} |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
|
|
|
|
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
|
648 |
} |
} |
649 |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
650 |
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
651 |
|
|
652 |
// printf("prova2\n"); |
// printf("prova2\n"); |
653 |
|
|
654 |
Float_t maxhist=0; |
Float_t maxhist=0; |
655 |
TBox b; |
TBox b; |
656 |
b.SetFillColor(5); |
b.SetFillColor(6); |
657 |
|
b.SetFillStyle(3945); |
658 |
|
|
659 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
660 |
Float_t yyc[maxev-minev]; |
Float_t yyc[maxev-minev]; |
662 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
663 |
} |
} |
664 |
|
|
665 |
printf("prova3\n"); |
// printf("prova3\n"); |
666 |
LandauCanv1[ii]->cd(); |
LandauCanv1[ii]->cd(); |
667 |
pad1[i]->SetFillColor(10); |
pad1[i]->SetFillColor(10); |
668 |
pad1[i]->SetFrameFillColor(10); |
pad1[i]->SetFrameFillColor(10); |
669 |
pad1[i]->Draw(); |
pad1[i]->Draw(); |
670 |
pad1[i]->cd(); |
pad1[i]->cd(); |
671 |
|
landau1[i][ii]->SetLineColor(1); |
672 |
|
landau1[i][ii]->GetXaxis()->SetTitle("max signal"); |
673 |
|
landau1[i][ii]->GetXaxis()->CenterTitle(); |
674 |
landau1[i][ii]->Draw(""); |
landau1[i][ii]->Draw(""); |
675 |
|
LandauCanv1[ii]->Update(); |
676 |
|
|
677 |
LandauCanv2[ii]->cd(); |
LandauCanv2[ii]->cd(); |
678 |
pad4[i]->SetFillColor(10); |
pad4[i]->SetFillColor(10); |
679 |
pad4[i]->SetFrameFillColor(10); |
pad4[i]->SetFrameFillColor(10); |
680 |
pad4[i]->Draw(); |
pad4[i]->Draw(); |
681 |
pad4[i]->cd(); |
pad4[i]->cd(); |
682 |
|
landau2[i][ii]->SetLineColor(1); |
683 |
|
landau2[i][ii]->SetFillColor(1); |
684 |
|
landau2[i][ii]->GetXaxis()->SetTitle("max signal"); |
685 |
|
landau2[i][ii]->GetXaxis()->CenterTitle(); |
686 |
landau2[i][ii]->Draw(""); |
landau2[i][ii]->Draw(""); |
687 |
|
LandauCanv2[ii]->Update(); |
688 |
|
|
689 |
LandauCanv3[ii]->cd(); |
LandauCanv3[ii]->cd(); |
690 |
pad5[i]->SetFillColor(10); |
pad5[i]->SetFillColor(10); |
691 |
pad5[i]->SetFrameFillColor(10); |
pad5[i]->SetFrameFillColor(10); |
692 |
pad5[i]->Draw(); |
pad5[i]->Draw(); |
693 |
pad5[i]->cd(); |
pad5[i]->cd(); |
694 |
|
landau3[i][ii]->GetXaxis()->SetTitle("max signal"); |
695 |
|
landau3[i][ii]->GetXaxis()->CenterTitle(); |
696 |
landau3[i][ii]->Draw(""); |
landau3[i][ii]->Draw(""); |
697 |
|
LandauCanv3[ii]->Update(); |
698 |
|
|
699 |
printf("prova4\n"); |
// printf("prova4\n"); |
700 |
IlluminaCanv[ii]->cd(); |
IlluminaCanv[ii]->cd(); |
701 |
pad2[i]->SetFillColor(10); |
pad2[i]->SetFillColor(10); |
702 |
pad2[i]->SetFrameFillColor(10); |
pad2[i]->SetFrameFillColor(10); |
703 |
|
pad2[i]->SetLogy(); |
704 |
pad2[i]->Draw(); |
pad2[i]->Draw(); |
705 |
pad2[i]->cd(); |
pad2[i]->cd(); |
|
pad2[i]->SetLogy(); |
|
706 |
// illuminazione[i][ii]->SetStats(KFALSE); |
// illuminazione[i][ii]->SetStats(KFALSE); |
707 |
|
illuminazione[i][ii]->GetXaxis()->SetTitle("strip with max signal"); |
708 |
|
illuminazione[i][ii]->GetXaxis()->CenterTitle(); |
709 |
|
illuminazione[i][ii]->Draw(""); |
710 |
if(i==1){ |
if(i==1){ |
|
illuminazione[i][ii]->Draw("ah"); |
|
711 |
maxhist= illuminazione[i][ii]->GetMaximum(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
712 |
b.DrawBox(2816.,0.,3060.,maxhist); |
b.DrawBox(2816.,0.,3060.,maxhist); |
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same ]["); |
|
713 |
} |
} |
714 |
else if(i==6){ |
else if(i==6){ |
|
illuminazione[i][ii]->Draw("ah"); |
|
715 |
maxhist= illuminazione[i][ii]->GetMaximum(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
716 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(2560.,0.,2816.,maxhist); |
717 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
718 |
b.DrawBox(1024.,0.,1792.,maxhist); |
b.DrawBox(1024.,0.,1792.,maxhist); |
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same]["); |
|
719 |
} |
} |
720 |
else if(i==11){ |
else if(i==11){ |
|
illuminazione[i][ii]->Draw("ah"); |
|
721 |
maxhist= illuminazione[i][ii]->GetMaximum(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
722 |
b.DrawBox(768.,0.,1024.,maxhist); |
b.DrawBox(768.,0.,1024.,maxhist); |
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same]["); |
|
723 |
} |
} |
724 |
else illuminazione[i][ii]->Draw(""); |
IlluminaCanv[ii]->Update(); |
725 |
|
|
726 |
printf("prova5\n"); |
// printf("prova5\n"); |
727 |
|
|
728 |
|
|
729 |
CompTimeCanv[ii]->cd(); |
CompTimeCanv[ii]->cd(); |
741 |
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); |
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); |
742 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
743 |
oss1.str(""); |
oss1.str(""); |
|
|
|
744 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |
|
LandauCanv1[ii]->Update(); |
|
|
LandauCanv2[ii]->Update(); |
|
|
LandauCanv3[ii]->Update(); |
|
|
IlluminaCanv[ii]->Update(); |
|
745 |
}; |
}; |
746 |
|
|
747 |
printf("prova6\n"); |
// printf("prova6\n"); |
748 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
749 |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
750 |
pt1 = new TPaveText(0.004,0.004,0.986,0.996); |
pt1 = new TPaveText(0.004,0.004,0.986,0.996); |
782 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
783 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
784 |
|
|
785 |
printf("prova7\n"); |
// printf("prova7\n"); |
786 |
|
|
787 |
obt=0; |
obt=0; |
788 |
for(Int_t i=0; i<5; i++){ |
for(Int_t i=0; i<5; i++){ |
825 |
TempCanv[ii]->Update(); |
TempCanv[ii]->Update(); |
826 |
} |
} |
827 |
|
|
828 |
printf("prova8\n"); |
// printf("prova8\n"); |
829 |
minev=maxev; |
minev=maxev; |
830 |
printf("\ncountrun=%d\n",ii); |
// printf("\ncountrun=%d\n",ii); |
831 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
832 |
countrun=ii+1; |
countrun=ii+1; |
833 |
break; |
break; |
834 |
} |
} |
835 |
|
|
836 |
warning.close(); |
warning.close(); |
|
|
|
837 |
} |
} |
838 |
|
|
839 |
//***************************************** |
//***************************************** |
840 |
//close all files |
//close all files |
841 |
//***************************************** |
//***************************************** |
842 |
alarm.close(); |
alarm.close(); |
|
datafile->Close(); |
|
843 |
|
|
844 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
845 |
//************************************************************************* |
//************************************************************************* |
877 |
if(fl!=countrun-1) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl!=countrun-1) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
878 |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
879 |
} |
} |
|
|
|
|
if(!strcmp(outfile.Data(),"pdf")){ |
|
|
stringstream com; |
|
|
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
|
|
system(com.str().c_str()); |
|
|
printf("\n---> ps file converted in pdf format!\n"); |
|
|
com.str(""); |
|
|
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
|
|
system(com.str().c_str()); |
|
|
printf("---> ps file removed!\n\n"); |
|
|
com.str(""); |
|
|
} |
|
880 |
} |
} |
881 |
else{ |
else{ |
882 |
out1.str(""); |
out1.str(""); |
901 |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
902 |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
903 |
} |
} |
904 |
|
} |
905 |
|
|
906 |
|
if(!strcmp(outfile.Data(),"pdf")){ |
907 |
|
stringstream com; |
908 |
|
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
909 |
|
system(com.str().c_str()); |
910 |
|
printf("\n---> ps file converted in pdf format!\n"); |
911 |
|
com.str(""); |
912 |
|
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
913 |
|
system(com.str().c_str()); |
914 |
|
printf("---> ps file removed!\n\n"); |
915 |
|
com.str(""); |
916 |
} |
} |
917 |
|
|
918 |
command.str(""); |
command.str(""); |
919 |
command<<"rm -f "<<out<<"warning.txt"; |
command<<"rm -f "<<out<<"warning.txt"; |
920 |
system(command.str().c_str()); |
system(command.str().c_str()); |
921 |
|
|
922 |
gROOT->Reset(); |
gROOT->Reset(); |
923 |
return; |
return; |
924 |
} |
} |