2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r05 |
* version v1r06 |
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 |
37 |
|
|
38 |
void FTrkQLook_EXPERT(TString file,Int_t fromevent,Int_t toevent, TString outdir, TString outfile) |
void FTrkQLook_EXPERT(TString file,Int_t fromevent,Int_t toevent, TString outdir, TString outfile) |
39 |
{ |
{ |
40 |
|
printf("\nsono io\n"); |
41 |
// |
// |
42 |
// obtain information about the data file and select the output dir |
// obtain information about the data file and select the output dir |
43 |
Int_t dwpos = file.Last('/'); |
Int_t dwpos = file.Last('/'); |
162 |
maxsize+=tmpSize; |
maxsize+=tmpSize; |
163 |
} |
} |
164 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
165 |
Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; |
Int_t tempt[tsize][5]; |
166 |
Int_t countnboot=1; |
Int_t countnboot=1; |
167 |
|
ULong64_t xt[tsize]; |
168 |
// |
// |
169 |
// information about the temperatures |
// information about the temperatures |
170 |
for (Int_t ev=0; ev<tnevent; ev++){ |
for (Int_t ev=0; ev<tnevent; ev++){ |
373 |
/* -----------> pad for histograms */ |
/* -----------> pad for histograms */ |
374 |
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
375 |
|
|
376 |
Int_t v=0,xt_tmp[tsize]; |
Int_t v=0; |
377 |
|
Double_t xt_tmp[tsize], tempt_tmp[tsize]; |
378 |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
379 |
|
|
380 |
if(ev==tsize-1 && i==4) countTEMP=tsize-1; |
if(ev==tsize-1 && i==4) countTEMP=tsize-1; |
384 |
} |
} |
385 |
else{ |
else{ |
386 |
if(tempt[ev][i]!=65535){ |
if(tempt[ev][i]!=65535){ |
387 |
tempt_tmp[v]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
388 |
if(tempt_tmp[v]>0) xt_tmp[v++]=xt[ev]; |
if(tempt_tmp[v]>0) xt_tmp[v++]=(Double_t)xt[ev]; |
389 |
} |
} |
390 |
} |
} |
391 |
} |
} |
502 |
// and fill graphs and histos |
// and fill graphs and histos |
503 |
|
|
504 |
Int_t al=0; |
Int_t al=0; |
505 |
Float_t x[MAXSTORAGE]; |
Double_t x[MAXSTORAGE]; |
506 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
507 |
Float_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
508 |
|
Int_t eventn[12]; |
509 |
|
|
510 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
511 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
558 |
WARNING[i]=0; |
WARNING[i]=0; |
559 |
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){ |
560 |
ALARM = 1; //general alarm |
ALARM = 1; //general alarm |
|
al=1; |
|
561 |
WARNING[i] = 1; // DSP warning |
WARNING[i] = 1; // DSP warning |
562 |
}; |
}; |
563 |
|
|
564 |
if(te->alarm[i]!=0){ // hardware alarm |
if(te->alarm[i]!=0){ // hardware alarm |
565 |
ALARM = 1; |
ALARM = 1; |
|
al=1; |
|
566 |
}; |
}; |
567 |
|
|
568 |
//************************************************************************************** |
//************************************************************************************** |
569 |
// warning for internal number |
// warning for internal number |
570 |
//************************************************************************************** |
//************************************************************************************** |
571 |
if(i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
if(i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
572 |
|
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
573 |
} |
} |
574 |
eventint[(ev-minev)]=te->eventn[0]; |
eventint[(ev-minev)]=te->eventn[0]; |
|
if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1) |
|
|
ALARM=1; |
|
575 |
|
|
576 |
//******************************************************************************************** |
//******************************************************************************************** |
577 |
// file DSP warning |
// file DSP warning |
578 |
//******************************************************************************************** |
//******************************************************************************************** |
579 |
|
|
580 |
if(ALARM==1) { |
if(ALARM==1) { |
581 |
|
al=1; |
582 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
583 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
584 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
602 |
for(Int_t i=0; i<12 ; i++){ |
for(Int_t i=0; i<12 ; i++){ |
603 |
alarm.width(5); alarm << te->DSPnumber[i]; |
alarm.width(5); alarm << te->DSPnumber[i]; |
604 |
alarm.width(8); alarm << te->eventn[i]; |
alarm.width(8); alarm << te->eventn[i]; |
605 |
alarm.width(8); alarm << eventint[(ev-minev)-1]; |
alarm.width(8); alarm << eventn[i]; |
606 |
alarm.width(6); alarm << te->DATAlength[i]; |
alarm.width(6); alarm << te->DATAlength[i]; |
607 |
alarm.width(4); alarm << te->crc[i]; |
alarm.width(4); alarm << te->crc[i]; |
608 |
alarm.width(4); alarm << te->fc[i]; |
alarm.width(4); alarm << te->fc[i]; |
617 |
alarm << endl; |
alarm << endl; |
618 |
} |
} |
619 |
} |
} |
620 |
|
for(Int_t i=0; i<12 ; i++) |
621 |
|
eventn[i]=te->eventn[i]; |
622 |
} |
} |
623 |
} |
} |
624 |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
626 |
// |
// |
627 |
// Draw the graphs |
// Draw the graphs |
628 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
629 |
Float_t yyc[maxev-minev]; |
Double_t yyc[maxev-minev]; |
630 |
for (Int_t v=0; v<maxev-minev; v++){ |
for (Int_t v=0; v<maxev-minev; v++){ |
631 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
632 |
} |
} |
643 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
644 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
645 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
646 |
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
647 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
648 |
oss1.str(""); |
oss1.str(""); |
649 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |