2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r15 |
* version v1r21 |
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 |
366 |
|
|
367 |
TLatex *t=new TLatex(); |
TLatex *t=new TLatex(); |
368 |
TLatex *t1=new TLatex(); |
TLatex *t1=new TLatex(); |
|
|
|
369 |
|
|
370 |
|
TLine li,liva1; |
371 |
|
|
372 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
373 |
ULong_t countALARMx=0,countALARMy=0; |
ULong_t countALARMx=0,countALARMy=0,countFC[12],countFL1[12],countFL2[12],countFL3[12],countFL4[12],countFL5[12],countFL6[12]; |
374 |
|
|
375 |
|
for(int i=0; i<12; i++){ |
376 |
|
countFC[i]=0; |
377 |
|
countFL1[i]=0; |
378 |
|
countFL2[i]=0; |
379 |
|
countFL3[i]=0; |
380 |
|
countFL4[i]=0; |
381 |
|
countFL5[i]=0; |
382 |
|
countFL6[i]=0; |
383 |
|
} |
384 |
|
|
385 |
// |
// |
386 |
// Fill temperature graphs |
// Fill temperature graphs |
534 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
535 |
isfile.str(""); |
isfile.str(""); |
536 |
|
|
|
TLine li; |
|
537 |
li.SetLineStyle(1); |
li.SetLineStyle(1); |
538 |
li.SetLineWidth(1); |
li.SetLineWidth(1); |
539 |
li.SetLineColor(190); |
li.SetLineColor(190); |
804 |
} |
} |
805 |
|
|
806 |
WARNING[i]=0; |
WARNING[i]=0; |
807 |
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){ |
808 |
ALARM = 1; //general alarm |
if(countFC[dsp]==0){ |
809 |
WARNING[i] = 1; // DSP warning |
ALARM = 1; //general alarm |
810 |
|
WARNING[i] = 1; // DSP warning |
811 |
|
} |
812 |
|
countFC[dsp]+=1; |
813 |
|
}; |
814 |
|
|
815 |
|
if(te->fl1[i]!=0){ |
816 |
|
if(countFL1[dsp]==0){ |
817 |
|
ALARM = 1; //general alarm |
818 |
|
WARNING[i] = 1; // DSP warning |
819 |
|
} |
820 |
|
countFL1[dsp]+=1; |
821 |
|
}; |
822 |
|
|
823 |
|
if(te->fl2[i]!=0){ |
824 |
|
if(countFL2[dsp]==0){ |
825 |
|
ALARM = 1; //general alarm |
826 |
|
WARNING[i] = 1; // DSP warning |
827 |
|
} |
828 |
|
countFL2[dsp]+=1; |
829 |
|
}; |
830 |
|
|
831 |
|
if(te->fl3[i]!=0){ |
832 |
|
if(countFL3[dsp]==0){ |
833 |
|
ALARM = 1; //general alarm |
834 |
|
WARNING[i] = 1; // DSP warning |
835 |
|
} |
836 |
|
countFL3[dsp]+=1; |
837 |
|
}; |
838 |
|
|
839 |
|
if(te->fl4[i]!=0){ |
840 |
|
if(countFL4[dsp]==0){ |
841 |
|
ALARM = 1; //general alarm |
842 |
|
WARNING[i] = 1; // DSP warning |
843 |
|
} |
844 |
|
countFL4[dsp]+=1; |
845 |
|
}; |
846 |
|
|
847 |
|
if(te->fl5[i]!=0){ |
848 |
|
if(countFL5[dsp]==0){ |
849 |
|
ALARM = 1; //general alarm |
850 |
|
WARNING[i] = 1; // DSP warning |
851 |
|
} |
852 |
|
countFL5[dsp]+=1; |
853 |
|
}; |
854 |
|
|
855 |
|
if(te->fl6[i]!=0){ |
856 |
|
if(countFL6[dsp]==0){ |
857 |
|
ALARM = 1; //general alarm |
858 |
|
WARNING[i] = 1; // DSP warning |
859 |
|
} |
860 |
|
countFL6[dsp]+=1; |
861 |
}; |
}; |
862 |
|
|
863 |
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
939 |
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
940 |
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
941 |
} |
} |
942 |
|
for(int p=0; p<12; p++){ |
943 |
|
if(countFC[p]!=0) alarm << endl<<endl<< "***** "<<countFC[p] <<" events with fc!=0 in DSP "<<p+1<<" *****"<<endl; |
944 |
|
if(countFL1[p]!=0) alarm << endl<<endl<< "***** "<<countFL1[p] <<" events with fl1!=0 in DSP "<<p+1<<" *****"<<endl; |
945 |
|
if(countFL2[p]!=0) alarm << endl<<endl<< "***** "<<countFL2[p] <<" events with fl2!=0 in DSP "<<p+1<<" *****"<<endl; |
946 |
|
if(countFL3[p]!=0) alarm << endl<<endl<< "***** "<<countFL3[p] <<" events with fl3!=0 in DSP "<<p+1<<" *****"<<endl; |
947 |
|
if(countFL4[p]!=0) alarm << endl<<endl<< "***** "<<countFL4[p] <<" events with fl4!=0 in DSP "<<p+1<<" *****"<<endl; |
948 |
|
if(countFL5[p]!=0) alarm << endl<<endl<< "***** "<<countFL5[p] <<" events with fl5!=0 in DSP "<<p+1<<" *****"<<endl; |
949 |
|
if(countFL6[p]!=0) alarm << endl<<endl<< "***** "<<countFL6[p] <<" events with fl6!=0 in DSP "<<p+1<<" *****"<<endl; |
950 |
|
} |
951 |
} |
} |
952 |
|
|
953 |
// |
// |
1112 |
|
|
1113 |
TBox b; |
TBox b; |
1114 |
|
|
1115 |
Float_t maxhist=0; |
Float_t maxhist=0,va1x=0; |
1116 |
LandauCanv1->cd(); |
LandauCanv1->cd(); |
1117 |
pad1[i]->SetFillColor(10); |
pad1[i]->SetFillColor(10); |
1118 |
pad1[i]->SetFrameFillColor(10); |
pad1[i]->SetFrameFillColor(10); |
1143 |
landau3[i]->Draw(""); |
landau3[i]->Draw(""); |
1144 |
LandauCanv3->Update(); |
LandauCanv3->Update(); |
1145 |
|
|
1146 |
|
|
1147 |
|
li.SetLineColor(38); |
1148 |
|
li.SetLineStyle(4); |
1149 |
|
li.SetLineWidth(2); |
1150 |
|
liva1.SetLineColor(42); |
1151 |
|
liva1.SetLineStyle(3); |
1152 |
|
liva1.SetLineWidth(1); |
1153 |
|
|
1154 |
IlluminaCanv->cd(); |
IlluminaCanv->cd(); |
1155 |
pad2[i]->SetFillColor(10); |
pad2[i]->SetFillColor(10); |
1156 |
pad2[i]->SetFrameFillColor(10); |
pad2[i]->SetFrameFillColor(10); |
1160 |
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
1161 |
illuminazione[i]->GetXaxis()->CenterTitle(); |
illuminazione[i]->GetXaxis()->CenterTitle(); |
1162 |
illuminazione[i]->Draw(""); |
illuminazione[i]->Draw(""); |
1163 |
|
maxhist= illuminazione[i]->GetMaximum(); |
1164 |
if(i==0){ |
if(i==0){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
1165 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1166 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1167 |
|
b.DrawBox(256.,0.,384.,maxhist); |
1168 |
b.DrawBox(768.,0.,2047.,maxhist); |
b.DrawBox(768.,0.,2047.,maxhist); |
1169 |
} |
} |
1170 |
else if(i==1){ |
else if(i==1){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
1171 |
b.SetFillColor(6); |
b.SetFillColor(6); |
1172 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
1173 |
b.DrawBox(2944.,0.,3060.,maxhist); |
b.DrawBox(2944.,0.,3070.,maxhist); |
1174 |
|
|
1175 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1176 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1177 |
|
b.DrawBox(384.,0.,512.,maxhist); |
1178 |
|
b.DrawBox(2048.,0.,2432.,maxhist); |
1179 |
b.DrawBox(2816.,0.,2944.,maxhist); |
b.DrawBox(2816.,0.,2944.,maxhist); |
1180 |
b.DrawBox(2048.,0.,2176.,maxhist); |
} |
1181 |
|
else if(i==3){ |
1182 |
|
b.SetFillColor(107); |
1183 |
|
b.SetFillStyle(3954); |
1184 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
1185 |
} |
} |
1186 |
else if(i==4){ |
else if(i==4){ |
|
maxhist=illuminazione[i]->GetMaximum(); |
|
1187 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1188 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1189 |
b.DrawBox(384.,0.,512.,maxhist); |
b.DrawBox(256.,0.,512.,maxhist); |
1190 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
1191 |
} |
} |
1192 |
else if(i==6){ |
else if(i==6){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
1193 |
b.SetFillColor(6); |
b.SetFillColor(6); |
1194 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
1195 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(1024.,0.,1280.,maxhist); |
|
b.DrawBox(1024.,0.,1535.,maxhist); |
|
1196 |
|
|
1197 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1198 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1199 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
1200 |
b.DrawBox(1536.,0.,1792.,maxhist); |
b.DrawBox(1280.,0.,1792.,maxhist); |
1201 |
} |
b.DrawBox(2560.,0.,2816.,maxhist); |
1202 |
|
} |
1203 |
else if(i==7){ |
else if(i==7){ |
1204 |
maxhist= illuminazione[i]->GetMaximum(); |
b.SetFillColor(107); |
1205 |
|
b.SetFillStyle(3954); |
1206 |
|
b.DrawBox(512.,0.,768.,maxhist); |
1207 |
|
b.DrawBox(1024.,0.,1535.,maxhist); |
1208 |
|
} |
1209 |
|
else if(i==8){ |
1210 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1211 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1212 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
1213 |
} |
} |
1214 |
else if(i==9){ |
else if(i==9){ |
|
maxhist=illuminazione[i]->GetMaximum(); |
|
1215 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1216 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1217 |
b.DrawBox(256.,0.,384.,maxhist); |
b.DrawBox(256.,0.,384.,maxhist); |
1218 |
|
b.DrawBox(1280.,0.,1535.,maxhist); |
1219 |
|
b.DrawBox(1792.,0.,1920.,maxhist); |
1220 |
|
} |
1221 |
|
else if(i==10){ |
1222 |
|
b.SetFillColor(107); |
1223 |
|
b.SetFillStyle(3954); |
1224 |
|
b.DrawBox(1024.,0.,1152.,maxhist); |
1225 |
|
b.DrawBox(2048.,0.,3070.,maxhist); |
1226 |
} |
} |
1227 |
else if(i==11){ |
else if(i==11){ |
|
maxhist= illuminazione[i]->GetMaximum(); |
|
1228 |
b.SetFillColor(6); |
b.SetFillColor(6); |
1229 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
1230 |
b.DrawBox(768.,0.,1024.,maxhist); |
b.DrawBox(768.,0.,1024.,maxhist); |
1234 |
b.DrawBox(0.,0.,512.,maxhist); |
b.DrawBox(0.,0.,512.,maxhist); |
1235 |
b.DrawBox(1920.,0.,2560.,maxhist); |
b.DrawBox(1920.,0.,2560.,maxhist); |
1236 |
} |
} |
1237 |
|
for(int va=1; va<24; va++){ |
1238 |
|
va1x=128*va; |
1239 |
|
liva1.DrawLine(va1x,0.,va1x,maxhist); |
1240 |
|
} |
1241 |
|
li.DrawLine(1024.5,0,1024.5,maxhist); |
1242 |
|
li.DrawLine(2048.5,0,2048.5,maxhist); |
1243 |
IlluminaCanv->Update(); |
IlluminaCanv->Update(); |
1244 |
} |
} |
1245 |
|
|