| 2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
| 3 |
* |
* |
| 4 |
* autor: D.Fedele |
* autor: D.Fedele |
| 5 |
* version v1r11 |
* version v1r14 |
| 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 |
| 136 |
} else if (toevent > nevent) { |
} else if (toevent > nevent) { |
| 137 |
maxevent = nevent; |
maxevent = nevent; |
| 138 |
} else { |
} else { |
| 139 |
maxevent = toevent+1; |
maxevent = nevent; |
| 140 |
} |
} |
| 141 |
nevent=maxevent-minevent ; |
nevent=maxevent-minevent ; |
| 142 |
} |
} |
| 161 |
countnboot+=(Int_t)(2*nevent/MAXSTORAGE); |
countnboot+=(Int_t)(2*nevent/MAXSTORAGE); |
| 162 |
// printf("\ncountnboot=%d\n",countnboot); |
// printf("\ncountnboot=%d\n",countnboot); |
| 163 |
|
|
|
|
|
| 164 |
// |
// |
| 165 |
// other variables definitions |
// other variables definitions |
| 166 |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
| 366 |
|
|
| 367 |
|
|
| 368 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
| 369 |
|
ULong_t countALARMx=0,countALARMy=0; |
| 370 |
|
|
| 371 |
// |
// |
| 372 |
// Fill temperature graphs |
// Fill temperature graphs |
| 579 |
mag[i][ii]->GetXaxis()->CenterTitle(); |
mag[i][ii]->GetXaxis()->CenterTitle(); |
| 580 |
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
| 581 |
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
| 582 |
else mag[i][ii]->GetYaxis()->SetRangeUser(2060,2066); |
else mag[i][ii]->GetYaxis()->SetRangeUser(2060,2067); |
| 583 |
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
| 584 |
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
| 585 |
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
| 627 |
break; |
break; |
| 628 |
|
|
| 629 |
case 4: |
case 4: |
| 630 |
li.DrawLine(min,2065.,max,2065.); |
li.DrawLine(min,2066.,max,2066.); |
| 631 |
li.DrawLine(min,2061.,max,2061.); |
li.DrawLine(min,2061.,max,2061.); |
| 632 |
t1->DrawLatex(xlat,2065.15,ma.str().c_str()); |
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
| 633 |
t1->DrawLatex(xlat,2060.85,mi.str().c_str()); |
t1->DrawLatex(xlat,2060.85,mi.str().c_str()); |
| 634 |
break; |
break; |
| 635 |
|
|
| 783 |
WARNING[i] = 1; // DSP warning |
WARNING[i] = 1; // DSP warning |
| 784 |
}; |
}; |
| 785 |
|
|
| 786 |
if(te->alarm[i]!=0){ // hardware alarm |
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
| 787 |
ALARM = 1; |
if(countALARMy==0) |
| 788 |
|
ALARM = 1; |
| 789 |
|
countALARMy+=1; |
| 790 |
|
}; |
| 791 |
|
|
| 792 |
|
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
| 793 |
|
if(countALARMx==0) |
| 794 |
|
ALARM = 1; |
| 795 |
|
countALARMx+=1; |
| 796 |
}; |
}; |
| 797 |
|
|
| 798 |
//************************************************************************************** |
//************************************************************************************** |
| 799 |
// warning for internal number |
// warning for internal number |
| 800 |
//************************************************************************************** |
//************************************************************************************** |
| 801 |
if(i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
| 802 |
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
| 803 |
} |
} |
| 804 |
eventint[(ev-minev)]=te->eventn[0]; |
eventint[(ev-minev)]=te->eventn[0]; |
| 852 |
} |
} |
| 853 |
} |
} |
| 854 |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
| 855 |
|
if(maxev==maxevent-1) { |
| 856 |
|
if(countALARMy!=0){ |
| 857 |
|
if(countALARMy%6!=0) alarm << endl<<endl<< "***** "<<countALARMy/6+1 <<" events with hardware alarm in Y-view *****"<<endl; |
| 858 |
|
else alarm << endl<<endl<< "***** "<<countALARMy/6 <<" events with hardware alarm in Y-view *****"<<endl; |
| 859 |
|
} |
| 860 |
|
if(countALARMx!=0){ |
| 861 |
|
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
| 862 |
|
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
| 863 |
|
} |
| 864 |
|
} |
| 865 |
|
|
| 866 |
// |
// |
| 867 |
// Draw the graphs |
// Draw the graphs |
| 889 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |
| 890 |
} |
} |
| 891 |
|
|
| 892 |
|
|
| 893 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
| 894 |
pt = new TPad("pt"," ",0.02,0.01,1.,0.98,18,0,0); |
pt = new TPad("pt"," ",0.02,0.01,1.,0.98,18,0,0); |
| 895 |
pt->SetFillColor(10); |
pt->SetFillColor(10); |
| 912 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
| 913 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
| 914 |
eventnumb[ii]->SetMarkerSize(0.2); |
eventnumb[ii]->SetMarkerSize(0.2); |
| 915 |
|
oss1.str(""); |
| 916 |
|
oss1<<"number of events in this graph: "<<maxev-minev; |
| 917 |
|
t->SetTextColor(kBlue); |
| 918 |
|
t->SetTextSize(0.02); |
| 919 |
|
double xtex=0,ytex=0; |
| 920 |
|
xtex=x[maxev-minev-1]-(x[maxev-minev-1]-x[0])/3; |
| 921 |
|
ytex=1000.+eventnumb[ii]->GetYaxis()->GetXmax(); |
| 922 |
|
t->DrawLatex(xtex,ytex,oss1.str().c_str()); |
| 923 |
|
oss1.str(""); |
| 924 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
| 925 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
| 926 |
|
|
| 932 |
|
|
| 933 |
} |
} |
| 934 |
|
|
|
|
|
| 935 |
alarm.close(); |
alarm.close(); |
| 936 |
|
|
| 937 |
//**************************************************************************************** |
//**************************************************************************************** |
| 1087 |
b.SetFillColor(6); |
b.SetFillColor(6); |
| 1088 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
| 1089 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(2560.,0.,2816.,maxhist); |
| 1090 |
b.DrawBox(1024.,0.,1792.,maxhist); |
b.DrawBox(1024.,0.,1535.,maxhist); |
| 1091 |
|
|
| 1092 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1093 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1094 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
| 1095 |
|
b.DrawBox(1536.,0.,1792.,maxhist); |
| 1096 |
} |
} |
| 1097 |
else if(i==7){ |
else if(i==7){ |
| 1098 |
maxhist= illuminazione[i]->GetMaximum(); |
maxhist= illuminazione[i]->GetMaximum(); |
| 1100 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1101 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
| 1102 |
} |
} |
| 1103 |
|
else if(i==9){ |
| 1104 |
|
maxhist=illuminazione[i]->GetMaximum(); |
| 1105 |
|
b.SetFillColor(107); |
| 1106 |
|
b.SetFillStyle(3954); |
| 1107 |
|
b.DrawBox(256.,0.,384.,maxhist); |
| 1108 |
|
} |
| 1109 |
else if(i==11){ |
else if(i==11){ |
| 1110 |
maxhist= illuminazione[i]->GetMaximum(); |
maxhist= illuminazione[i]->GetMaximum(); |
| 1111 |
b.SetFillColor(6); |
b.SetFillColor(6); |
| 1116 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1117 |
b.DrawBox(0.,0.,512.,maxhist); |
b.DrawBox(0.,0.,512.,maxhist); |
| 1118 |
b.DrawBox(1920.,0.,2048.,maxhist); |
b.DrawBox(1920.,0.,2048.,maxhist); |
| 1119 |
|
b.DrawBox(2176.,0.,2304.,maxhist); |
| 1120 |
} |
} |
| 1121 |
IlluminaCanv->Update(); |
IlluminaCanv->Update(); |
| 1122 |
} |
} |
| 1132 |
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
| 1133 |
|
|
| 1134 |
for(Int_t fl=0;fl<totpg;fl++){ |
for(Int_t fl=0;fl<totpg;fl++){ |
| 1135 |
|
|
| 1136 |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
| 1137 |
out1.str(""); |
out1.str(""); |
| 1138 |
out2.str(""); |
out2.str(""); |