2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r04 |
* 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 |
39 |
{ |
{ |
40 |
// |
// |
41 |
// obtain information about the data file and select the output dir |
// obtain information about the data file and select the output dir |
|
const string filepath=file.Data(); |
|
42 |
Int_t dwpos = file.Last('/'); |
Int_t dwpos = file.Last('/'); |
43 |
Int_t dwpos1 = file.Last('.'); |
Int_t dwpos1 = file.Last('.'); |
44 |
TString base,ffile ; |
TString base,ffile ; |
502 |
Float_t x[MAXSTORAGE]; |
Float_t x[MAXSTORAGE]; |
503 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
504 |
Float_t eventint[MAXSTORAGE]; |
Float_t eventint[MAXSTORAGE]; |
505 |
|
Int_t eventn[12]; |
506 |
|
|
507 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
508 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
509 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
510 |
cod = eh->GetCounter(); |
cod = eh->GetCounter(); |
511 |
|
|
512 |
|
|
513 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
514 |
|
|
515 |
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){ |
522 |
|
|
523 |
Int_t dsp=0; |
Int_t dsp=0; |
524 |
for(Int_t i=0; i<12; i++){ |
for(Int_t i=0; i<12; i++){ |
525 |
|
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
526 |
|
ALARM=1; |
527 |
|
break; |
528 |
|
} |
529 |
|
|
530 |
dsp=te->DSPnumber[i]-1; |
dsp=te->DSPnumber[i]-1; |
531 |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
532 |
|
|
533 |
// |
// |
534 |
// Fill Cluster Signal and Lighting of the view histos |
// Fill Cluster Signal and Lighting of the view histos |
535 |
for(Int_t j=0;j<3;j++){ |
for(Int_t j=0;j<3;j++){ |
555 |
WARNING[i]=0; |
WARNING[i]=0; |
556 |
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){ |
557 |
ALARM = 1; //general alarm |
ALARM = 1; //general alarm |
|
al=1; |
|
558 |
WARNING[i] = 1; // DSP warning |
WARNING[i] = 1; // DSP warning |
559 |
}; |
}; |
560 |
|
|
561 |
if(te->alarm[i]!=0){ // hardware alarm |
if(te->alarm[i]!=0){ // hardware alarm |
562 |
ALARM = 1; |
ALARM = 1; |
|
al=1; |
|
563 |
}; |
}; |
564 |
|
|
565 |
//************************************************************************************** |
//************************************************************************************** |
566 |
// warning for internal number |
// warning for internal number |
567 |
//************************************************************************************** |
//************************************************************************************** |
568 |
if(i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
if(i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
569 |
|
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
570 |
} |
} |
571 |
eventint[(ev-minev)]=te->eventn[0]; |
eventint[(ev-minev)]=te->eventn[0]; |
572 |
if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1) |
|
|
ALARM=1; |
|
|
|
|
573 |
//******************************************************************************************** |
//******************************************************************************************** |
574 |
// file DSP warning |
// file DSP warning |
575 |
//******************************************************************************************** |
//******************************************************************************************** |
576 |
|
|
577 |
if(ALARM==1) { |
if(ALARM==1) { |
578 |
|
al=1; |
579 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
580 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
581 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
599 |
for(Int_t i=0; i<12 ; i++){ |
for(Int_t i=0; i<12 ; i++){ |
600 |
alarm.width(5); alarm << te->DSPnumber[i]; |
alarm.width(5); alarm << te->DSPnumber[i]; |
601 |
alarm.width(8); alarm << te->eventn[i]; |
alarm.width(8); alarm << te->eventn[i]; |
602 |
alarm.width(8); alarm << eventint[(ev-minev)-1]; |
alarm.width(8); alarm << eventn[i]; |
603 |
alarm.width(6); alarm << te->DATAlength[i]; |
alarm.width(6); alarm << te->DATAlength[i]; |
604 |
alarm.width(4); alarm << te->crc[i]; |
alarm.width(4); alarm << te->crc[i]; |
605 |
alarm.width(4); alarm << te->fc[i]; |
alarm.width(4); alarm << te->fc[i]; |
614 |
alarm << endl; |
alarm << endl; |
615 |
} |
} |
616 |
} |
} |
617 |
|
for(Int_t i=0; i<12 ; i++) |
618 |
|
eventn[i]=te->eventn[i]; |
619 |
} |
} |
620 |
} |
} |
621 |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
671 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
672 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
673 |
|
|
|
|
|
674 |
minev=maxev; |
minev=maxev; |
675 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
676 |
cntpgdat=ii+1; |
cntpgdat=ii+1; |
677 |
break; |
break; |
678 |
} |
} |
679 |
|
|
680 |
} |
} |
681 |
|
|
682 |
|
|
683 |
alarm.close(); |
alarm.close(); |
684 |
|
|
685 |
//**************************************************************************************** |
//**************************************************************************************** |