| 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 |
| 219 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
| 220 |
|
|
| 221 |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
| 222 |
alarm1 << " ALARM[1]= "<< hex<< (Int_t)al->ALARM[1]<<dec<<endl; |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[1]<<endl; |
| 223 |
alarm1 << " ALARM[2]= "<< hex<< (Int_t)al->ALARM[2]<<dec<<endl; |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[2]<<endl; |
| 224 |
alarm1 << " CmdDuringTrig= "<< hex<<(Int_t)al->CmdDuringTrig<<endl; |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
| 225 |
alarm1 << " FinalCheck= "<< hex<<(Int_t)al->FinalCheck<<endl; |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
| 226 |
alarm1 << " FlashData= "<< hex<<(Int_t)al->FlashData<<endl; |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
| 227 |
alarm1 << " FlashShutdown= "<< hex<<(Int_t)al->FlashShutdown<<endl; |
alarm1 << " FlashShutdown= 0x"<< (Int_t)al->FlashShutdown<<endl; |
| 228 |
alarm1 << " FlashUpset= "<< hex<<(Int_t)al->FlashUpset<<endl; |
alarm1 << " FlashUpset= 0x"<< (Int_t)al->FlashUpset<<endl; |
| 229 |
alarm1 << " InterCheck= "<< hex<<(Int_t)al->InterCheck<<endl; |
alarm1 << " InterCheck= 0x"<< (Int_t)al->InterCheck<<endl; |
| 230 |
alarm1 << " UnknownCmd= "<< hex<<(Int_t)al->UnknownCmd<<endl<<endl; |
alarm1 << " UnknownCmd= 0x"<<(Int_t)al->UnknownCmd<<endl<<endl; |
| 231 |
|
|
| 232 |
alarm1 << "Alarm variables (range 0-3F)"<<endl; |
alarm1 << "Alarm variables (range 0-3F)"<<endl; |
| 233 |
alarm1 << " CmdIDMA= "<< hex<<(Int_t)al->CmdIDMA<<endl; |
alarm1 << " CmdIDMA= 0x"<< (Int_t)al->CmdIDMA<<endl; |
| 234 |
alarm1 << " DSPSoft= "<< hex<<(Int_t)al->DSPSoft<<endl; |
alarm1 << " DSPSoft= 0x"<< (Int_t)al->DSPSoft<<endl; |
| 235 |
alarm1 << " TrigIDMA= "<< hex<<(Int_t)al->TrigIDMA<<endl<<endl; |
alarm1 << " TrigIDMA= 0x"<< (Int_t)al->TrigIDMA<<endl<<endl; |
| 236 |
|
|
| 237 |
alarm1 << "Alarm bits (range 0-1)"<<endl; |
alarm1 << "Control variables (range 0-3F)"<<endl; |
| 238 |
alarm1 << " Aswr= "<< hex<<(Int_t)al->Aswr<<endl; |
alarm1 << " DSPBusy= 0x"<< (Int_t)al->DSPBusy<<endl; |
| 239 |
alarm1 << " BID[1]= "<< hex<<(Int_t)al->BID[0]<<endl; |
alarm1 << " DSPMask= 0x"<< (Int_t)al->DSPMask<<endl<<endl; |
| 240 |
alarm1 << " BID[2]= "<< hex<<(Int_t)al->BID[1]<<endl; |
|
| 241 |
alarm1 << " BID[3]= "<< hex<<(Int_t)al->BID[2]<<endl; |
alarm1 << "Control variables (range 0-1)"<<endl; |
| 242 |
alarm1 << " BID[4]= "<< hex<<(Int_t)al->BID[3]<<endl; |
alarm1 << " FlashOn= 0x"<< (Int_t)al->FlashOn<<endl<<endl; |
| 243 |
alarm1 << " BID[5]= "<< hex<<(Int_t)al->BID[4]<<endl; |
|
| 244 |
alarm1 << " BID[6]= "<< hex<<(Int_t)al->BID[5]<<endl; |
alarm1 << "Control variables (range 0-3)"<<endl; |
| 245 |
alarm1 << " BID[7]= "<< hex<<(Int_t)al->BID[6]<<endl; |
alarm1 << " TrigMask= 0x"<< (Int_t)al->TrigMask<<endl<<endl; |
| 246 |
alarm1 << " CmdNum= "<< hex<<(Int_t)al->CmdNum<<endl; |
|
| 247 |
alarm1 << " DSPBusy= "<< hex<<(Int_t)al->DSPBusy<<endl; |
alarm1 << "Control bits fixed"<<endl; |
| 248 |
alarm1 << " DSPMask= "<< hex<<(Int_t)al->DSPMask<<endl; |
alarm1 << " Aswr= 0x"<< (Int_t)al->Aswr<<endl; |
| 249 |
alarm1 << " FlashOn= "<< hex<<(Int_t)al->FlashOn<<endl; |
alarm1 << " BID[1]= 0x"<< (Int_t)al->BID[0]<<endl; |
| 250 |
alarm1 << " PNum= "<< hex<<(Int_t)al->PNum<<endl; |
alarm1 << " BID[2]= 0x"<< (Int_t)al->BID[1]<<endl; |
| 251 |
alarm1 << " TrigMask= "<< hex<<(Int_t)al->TrigMask<<endl; |
alarm1 << " BID[3]= 0x"<< (Int_t)al->BID[2]<<endl; |
| 252 |
|
alarm1 << " BID[4]= 0x"<< (Int_t)al->BID[3]<<endl; |
| 253 |
|
alarm1 << " BID[5]= 0x"<< (Int_t)al->BID[4]<<endl; |
| 254 |
|
alarm1 << " BID[6]= 0x"<< (Int_t)al->BID[5]<<endl; |
| 255 |
|
alarm1 << " BID[7]= 0x"<< (Int_t)al->BID[6]<<endl; |
| 256 |
|
alarm1 << " CmdNum= 0x"<< (Int_t)al->CmdNum<<endl; |
| 257 |
|
alarm1 << " PNum= 0x"<< (Int_t)al->PNum<< dec <<endl; |
| 258 |
|
|
| 259 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
| 260 |
|
|
| 261 |
} |
} |
| 267 |
gStyle->SetStatFontSize(0.075); |
gStyle->SetStatFontSize(0.075); |
| 268 |
gStyle->SetOptStat(1110); |
gStyle->SetOptStat(1110); |
| 269 |
gStyle->SetFillColor(10); |
gStyle->SetFillColor(10); |
| 270 |
|
gStyle->SetStatColor(10); |
| 271 |
gStyle->SetTitleFillColor(10); |
gStyle->SetTitleFillColor(10); |
| 272 |
gStyle->SetTitleFontSize(0.1); |
gStyle->SetTitleFontSize(0.1); |
| 273 |
gStyle->SetTitleOffset(0.8,"y"); |
gStyle->SetTitleOffset(0.8,"y"); |
| 286 |
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); |
| 287 |
|
|
| 288 |
|
|
| 289 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countHOBT=0; |
| 290 |
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
| 291 |
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
| 292 |
TGraph *comprtime[12][countrun],*temp[5][countrun]; |
TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun]; |
|
TGraph *eventnumb[countrun]; |
|
| 293 |
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]; |
| 294 |
|
|
| 295 |
|
|
| 296 |
for(Int_t ii=0; ii<countrun;ii++){ |
for(Int_t ii=0; ii<countrun;ii++){ |
| 297 |
TPaveText *pt1; |
TPaveText *pt1; |
| 298 |
TPad *pt,*pt0; |
TPad *pt,*pt0; |
| 299 |
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 |
|
|
|
| 300 |
|
|
| 301 |
ofstream warning(out + "warning.txt",ios::out); |
ofstream warning(out + "warning.txt",ios::out); |
| 302 |
|
|
| 303 |
//**************************************************************************************** |
//**************************************************************************************** |
| 304 |
//Output figures --- First sheet: |
//Output figures --- First sheet: |
| 305 |
//**************************************************************************************** |
//**************************************************************************************** |
| 306 |
|
fromfile.str(""); |
| 307 |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
| 308 |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
| 309 |
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); |
| 320 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 321 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 322 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 323 |
t1->DrawLatex(59.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
| 324 |
isfile.str(""); |
isfile.str(""); |
| 325 |
|
|
| 326 |
//**************************************************************************************** |
//**************************************************************************************** |
| 340 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 341 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 342 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 343 |
t1->DrawLatex(63.4,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
| 344 |
isfile.str(""); |
isfile.str(""); |
| 345 |
|
|
| 346 |
//**************************************************************************************** |
//**************************************************************************************** |
| 361 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 362 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 363 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 364 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
| 365 |
isfile.str(""); |
isfile.str(""); |
| 366 |
|
|
| 367 |
//**************************************************************************************** |
//**************************************************************************************** |
| 382 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 383 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 384 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 385 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
| 386 |
isfile.str(""); |
isfile.str(""); |
| 387 |
|
|
| 388 |
//**************************************************************************************** |
//**************************************************************************************** |
| 403 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 404 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 405 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 406 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
| 407 |
isfile.str(""); |
isfile.str(""); |
| 408 |
|
|
| 409 |
//**************************************************************************************** |
//**************************************************************************************** |
| 423 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 424 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 425 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 426 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
| 427 |
isfile.str(""); |
isfile.str(""); |
| 428 |
|
|
| 429 |
//**************************************************************************************** |
//**************************************************************************************** |
| 444 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 445 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 446 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 447 |
t1->DrawLatex(75.,98.7,isfile.str().c_str()); |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
| 448 |
isfile.str(""); |
isfile.str(""); |
| 449 |
|
|
| 450 |
//************************************************************************************* |
//************************************************************************************* |
| 502 |
|
|
| 503 |
/* -----------> HISTOGRAMS */ |
/* -----------> HISTOGRAMS */ |
| 504 |
|
|
| 505 |
|
tit<<"DSP "<<n+1; |
| 506 |
oss1<<"DSP "<<n*100+ii; |
oss1<<"DSP "<<n*100+ii; |
| 507 |
oss2<<"DSPh "<<n*100+ii; |
oss2<<"DSPh "<<n*100+ii; |
| 508 |
oss3<<"DSP h "<<n*100+ii; |
oss3<<"DSP h "<<n*100+ii; |
| 509 |
oss4<<"DSP h"<<n*100+ii; |
oss4<<"DSP h"<<n*100+ii; |
| 510 |
|
|
| 511 |
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); |
| 512 |
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); |
| 513 |
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(); |
|
| 514 |
|
|
| 515 |
|
illuminazione[n][ii]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); |
| 516 |
|
|
| 517 |
|
tit.str(""); |
| 518 |
oss1.str(""); |
oss1.str(""); |
| 519 |
oss2.str(""); |
oss2.str(""); |
| 520 |
oss3.str(""); |
oss3.str(""); |
| 532 |
// |
// |
| 533 |
// information about the tracker data |
// information about the tracker data |
| 534 |
Int_t warning_dspnumber=0; |
Int_t warning_dspnumber=0; |
| 535 |
Float_t x[30000]; |
Float_t x[MAXSTORAGE]; |
| 536 |
Float_t yc[30000][12]; |
Float_t yc[MAXSTORAGE][12]; |
| 537 |
Float_t eventint[30000]; |
Float_t eventint[MAXSTORAGE]; |
| 538 |
|
|
| 539 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
| 540 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
| 541 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 542 |
|
|
| 543 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
| 544 |
|
|
| 545 |
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){ |
| 546 |
maxev=ev; |
maxev=ev; |
|
printf("prova12 ev=%d\tev-minev=%d\n",ev,ev-minev); |
|
| 547 |
break; |
break; |
| 548 |
} |
} |
| 549 |
else{ |
else{ |
|
// if(ii==32)printf("\nprova1 %d\tev-minev=%d\n",ev,ev-minev); |
|
| 550 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
x[(ev-minev)]= ph->GetOrbitalTime(); |
| 551 |
ALARM=0; |
ALARM=0; |
| 552 |
|
|
| 557 |
|
|
| 558 |
for(Int_t j=0;j<3;j++){ |
for(Int_t j=0;j<3;j++){ |
| 559 |
if(te->signcluster[i][j]!=0){ |
if(te->signcluster[i][j]!=0){ |
| 560 |
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)){ |
| 561 |
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)); |
| 562 |
continue; |
// else |
| 563 |
else illuminazione[dsp][ii]->Fill(hi); |
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]); |
|
| 564 |
} |
} |
| 565 |
} |
} |
| 566 |
} |
} |
| 567 |
|
if(x[ev-minev]>HOBT[countHOBT+1]) |
| 568 |
|
countHOBT+=1; |
| 569 |
|
if(trk_cal_us[countHOBT]!=104){ |
| 570 |
|
if(!(dsp%2)){ |
| 571 |
|
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
| 572 |
|
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
| 573 |
|
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
| 574 |
|
} |
| 575 |
|
else{ |
| 576 |
|
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)te->signcluster[i][0]); |
| 577 |
|
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)te->signcluster[i][1]); |
| 578 |
|
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)te->signcluster[i][2]); |
| 579 |
|
} |
| 580 |
|
} |
| 581 |
|
|
| 582 |
WARNING[i]=0; |
WARNING[i]=0; |
| 583 |
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){ |
| 616 |
//******************************************************************************************** |
//******************************************************************************************** |
| 617 |
// file ALARM |
// file ALARM |
| 618 |
//******************************************************************************************** |
//******************************************************************************************** |
| 619 |
|
|
| 620 |
alarm <<endl<< "================================================="<< endl; |
if(ALARM==1) { |
| 621 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm <<endl<< "================================================="<< endl; |
| 622 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
| 623 |
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
| 624 |
alarm << "================================================="<< endl; |
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
| 625 |
|
alarm << "================================================="<< endl; |
| 626 |
if(ALARM==1) { |
|
| 627 |
alarm << " DSPn"; |
alarm << " DSPn"; |
| 628 |
alarm << " Event"; |
alarm << " Event"; |
| 629 |
alarm << " Words"; |
alarm << " Words"; |
| 654 |
} |
} |
| 655 |
} |
} |
| 656 |
} |
} |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
|
|
|
|
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
|
| 657 |
} |
} |
| 658 |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
| 659 |
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
| 660 |
|
|
|
// printf("prova2\n"); |
|
| 661 |
|
|
| 662 |
Float_t maxhist=0; |
Float_t maxhist=0; |
| 663 |
TBox b; |
TBox b; |
| 664 |
b.SetFillColor(5); |
b.SetFillColor(6); |
| 665 |
|
b.SetFillStyle(3945); |
| 666 |
|
|
| 667 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
| 668 |
Float_t yyc[maxev-minev]; |
Float_t yyc[maxev-minev]; |
| 670 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
| 671 |
} |
} |
| 672 |
|
|
|
printf("prova3\n"); |
|
| 673 |
LandauCanv1[ii]->cd(); |
LandauCanv1[ii]->cd(); |
| 674 |
pad1[i]->SetFillColor(10); |
pad1[i]->SetFillColor(10); |
| 675 |
pad1[i]->SetFrameFillColor(10); |
pad1[i]->SetFrameFillColor(10); |
| 676 |
pad1[i]->Draw(); |
pad1[i]->Draw(); |
| 677 |
pad1[i]->cd(); |
pad1[i]->cd(); |
| 678 |
|
landau1[i][ii]->GetXaxis()->SetTitle("max signal"); |
| 679 |
|
landau1[i][ii]->GetXaxis()->CenterTitle(); |
| 680 |
landau1[i][ii]->Draw(""); |
landau1[i][ii]->Draw(""); |
| 681 |
|
LandauCanv1[ii]->Update(); |
| 682 |
|
|
| 683 |
LandauCanv2[ii]->cd(); |
LandauCanv2[ii]->cd(); |
| 684 |
pad4[i]->SetFillColor(10); |
pad4[i]->SetFillColor(10); |
| 685 |
pad4[i]->SetFrameFillColor(10); |
pad4[i]->SetFrameFillColor(10); |
| 686 |
pad4[i]->Draw(); |
pad4[i]->Draw(); |
| 687 |
pad4[i]->cd(); |
pad4[i]->cd(); |
| 688 |
|
landau2[i][ii]->GetXaxis()->SetTitle("max signal"); |
| 689 |
|
landau2[i][ii]->GetXaxis()->CenterTitle(); |
| 690 |
landau2[i][ii]->Draw(""); |
landau2[i][ii]->Draw(""); |
| 691 |
|
LandauCanv2[ii]->Update(); |
| 692 |
|
|
| 693 |
LandauCanv3[ii]->cd(); |
LandauCanv3[ii]->cd(); |
| 694 |
pad5[i]->SetFillColor(10); |
pad5[i]->SetFillColor(10); |
| 695 |
pad5[i]->SetFrameFillColor(10); |
pad5[i]->SetFrameFillColor(10); |
| 696 |
pad5[i]->Draw(); |
pad5[i]->Draw(); |
| 697 |
pad5[i]->cd(); |
pad5[i]->cd(); |
| 698 |
|
landau3[i][ii]->GetXaxis()->SetTitle("max signal"); |
| 699 |
|
landau3[i][ii]->GetXaxis()->CenterTitle(); |
| 700 |
landau3[i][ii]->Draw(""); |
landau3[i][ii]->Draw(""); |
| 701 |
|
LandauCanv3[ii]->Update(); |
| 702 |
|
|
|
printf("prova4\n"); |
|
| 703 |
IlluminaCanv[ii]->cd(); |
IlluminaCanv[ii]->cd(); |
| 704 |
pad2[i]->SetFillColor(10); |
pad2[i]->SetFillColor(10); |
| 705 |
pad2[i]->SetFrameFillColor(10); |
pad2[i]->SetFrameFillColor(10); |
| 706 |
|
pad2[i]->SetLogy(); |
| 707 |
pad2[i]->Draw(); |
pad2[i]->Draw(); |
| 708 |
pad2[i]->cd(); |
pad2[i]->cd(); |
| 709 |
pad2[i]->SetLogy(); |
illuminazione[i][ii]->GetXaxis()->SetTitle("strip with max signal"); |
| 710 |
// illuminazione[i][ii]->SetStats(KFALSE); |
illuminazione[i][ii]->GetXaxis()->CenterTitle(); |
| 711 |
|
illuminazione[i][ii]->Draw(""); |
| 712 |
if(i==1){ |
if(i==1){ |
|
illuminazione[i][ii]->Draw("ah"); |
|
| 713 |
maxhist= illuminazione[i][ii]->GetMaximum(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
| 714 |
b.DrawBox(2816.,0.,3060.,maxhist); |
b.DrawBox(2816.,0.,3060.,maxhist); |
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same ]["); |
|
| 715 |
} |
} |
| 716 |
else if(i==6){ |
else if(i==6){ |
|
illuminazione[i][ii]->Draw("ah"); |
|
| 717 |
maxhist= illuminazione[i][ii]->GetMaximum(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
| 718 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(2560.,0.,2816.,maxhist); |
| 719 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
| 720 |
b.DrawBox(1024.,0.,1792.,maxhist); |
b.DrawBox(1024.,0.,1792.,maxhist); |
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same]["); |
|
| 721 |
} |
} |
| 722 |
else if(i==11){ |
else if(i==11){ |
|
illuminazione[i][ii]->Draw("ah"); |
|
| 723 |
maxhist= illuminazione[i][ii]->GetMaximum(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
| 724 |
b.DrawBox(768.,0.,1024.,maxhist); |
b.DrawBox(768.,0.,1024.,maxhist); |
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same]["); |
|
| 725 |
} |
} |
| 726 |
else illuminazione[i][ii]->Draw(""); |
IlluminaCanv[ii]->Update(); |
|
|
|
|
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 |
|
|
|
printf("prova6\n"); |
|
| 747 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
| 748 |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
| 749 |
pt1 = new TPaveText(0.004,0.004,0.986,0.996); |
pt1 = new TPaveText(0.004,0.004,0.986,0.996); |
| 781 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
| 782 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
| 783 |
|
|
|
printf("prova7\n"); |
|
|
|
|
| 784 |
obt=0; |
obt=0; |
| 785 |
for(Int_t i=0; i<5; i++){ |
for(Int_t i=0; i<5; i++){ |
| 786 |
Int_t v=0; |
Int_t v=0; |
| 822 |
TempCanv[ii]->Update(); |
TempCanv[ii]->Update(); |
| 823 |
} |
} |
| 824 |
|
|
|
printf("prova8\n"); |
|
| 825 |
minev=maxev; |
minev=maxev; |
|
printf("\ncountrun=%d\n",ii); |
|
| 826 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
| 827 |
countrun=ii+1; |
countrun=ii+1; |
| 828 |
break; |
break; |
| 829 |
} |
} |
| 830 |
|
|
| 831 |
warning.close(); |
warning.close(); |
|
|
|
| 832 |
} |
} |
| 833 |
|
|
| 834 |
//***************************************** |
//***************************************** |
| 835 |
//close all files |
//close all files |
| 836 |
//***************************************** |
//***************************************** |
| 837 |
alarm.close(); |
alarm.close(); |
|
datafile->Close(); |
|
| 838 |
|
|
| 839 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
| 840 |
//************************************************************************* |
//************************************************************************* |
| 872 |
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"); |
| 873 |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
| 874 |
} |
} |
|
|
|
|
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(""); |
|
|
} |
|
| 875 |
} |
} |
| 876 |
else{ |
else{ |
| 877 |
out1.str(""); |
out1.str(""); |
| 896 |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
| 897 |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
| 898 |
} |
} |
| 899 |
|
} |
| 900 |
|
|
| 901 |
|
if(!strcmp(outfile.Data(),"pdf")){ |
| 902 |
|
stringstream com; |
| 903 |
|
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
| 904 |
|
system(com.str().c_str()); |
| 905 |
|
printf("\n---> ps file converted in pdf format!\n"); |
| 906 |
|
com.str(""); |
| 907 |
|
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
| 908 |
|
system(com.str().c_str()); |
| 909 |
|
printf("---> ps file removed!\n\n"); |
| 910 |
|
com.str(""); |
| 911 |
} |
} |
| 912 |
|
|
| 913 |
command.str(""); |
command.str(""); |
| 914 |
command<<"rm -f "<<out<<"warning.txt"; |
command<<"rm -f "<<out<<"warning.txt"; |
| 915 |
system(command.str().c_str()); |
system(command.str().c_str()); |
| 916 |
|
|
| 917 |
gROOT->Reset(); |
gROOT->Reset(); |
| 918 |
return; |
return; |
| 919 |
} |
} |