1 |
|
|
2 |
/** |
/** |
3 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
4 |
* |
* |
5 |
* autor: D.Fedele |
* autor: D.Fedele |
6 |
* version v1r21 |
* version v1r27 |
7 |
* Parameters: |
* Parameters: |
8 |
* file - the data file to analyze |
* file - the data file to analyze |
9 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
144 |
|
|
145 |
// |
// |
146 |
// information about the RunHeader |
// information about the RunHeader |
147 |
ULong64_t HOBT[neventH]; |
ULong_t HOBT[neventH]; |
148 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
149 |
ULong_t acq_info[neventH]; |
ULong_t acq_info[neventH]; |
150 |
Int_t countnboot=1; |
Int_t countnboot=1; |
181 |
} |
} |
182 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
183 |
Int_t tempt[tsize][5]; |
Int_t tempt[tsize][5]; |
184 |
ULong64_t xt[tsize]; |
ULong_t xt[tsize]; |
185 |
|
|
186 |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
187 |
// |
// |
213 |
} |
} |
214 |
const Int_t bsize=maxsize; |
const Int_t bsize=maxsize; |
215 |
Int_t magt[bsize][5]; |
Int_t magt[bsize][5]; |
216 |
ULong64_t xb[bsize]; |
ULong_t xb[bsize]; |
217 |
siztmp=0; |
siztmp=0; |
218 |
// |
// |
219 |
// information about the magnetic field |
// information about the magnetic field |
250 |
// write the file for the TrkAlarm packet |
// write the file for the TrkAlarm packet |
251 |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
252 |
else{ |
else{ |
253 |
Long64_t obt=0; |
ULong_t obt=0; |
254 |
for (Int_t ev=0; ev<alnevent; ev++){ |
for (Int_t ev=0; ev<alnevent; ev++){ |
255 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
256 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
257 |
|
|
258 |
if(ph->GetOrbitalTime()<obt && ev>0) |
if((ULong_t)ph->GetOrbitalTime()<obt && ev>0) |
259 |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
260 |
obt=ph->GetOrbitalTime(); |
obt=ph->GetOrbitalTime(); |
261 |
|
|
262 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl; |
263 |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
264 |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
265 |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
266 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
267 |
|
|
621 |
|
|
622 |
case 1: |
case 1: |
623 |
li.DrawLine(min,2055.,max,2055.); |
li.DrawLine(min,2055.,max,2055.); |
624 |
li.DrawLine(min,2050.,max,2050.); |
li.DrawLine(min,2049.,max,2049.); |
625 |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
626 |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2048.7,mi.str().c_str()); |
627 |
break; |
break; |
628 |
|
|
629 |
case 2: |
case 2: |
630 |
li.DrawLine(min,2056.,max,2056.); |
li.DrawLine(min,2056.,max,2056.); |
631 |
li.DrawLine(min,2051.,max,2051.); |
li.DrawLine(min,2050.,max,2050.); |
632 |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
633 |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
634 |
break; |
break; |
635 |
|
|
636 |
case 3: |
case 3: |
637 |
li.DrawLine(min,2057.,max,2057.); |
li.DrawLine(min,2057.,max,2057.); |
638 |
li.DrawLine(min,2052.,max,2052.); |
li.DrawLine(min,2051.,max,2051.); |
639 |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
640 |
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
641 |
break; |
break; |
642 |
|
|
643 |
case 4: |
case 4: |
644 |
li.DrawLine(min,2066.,max,2066.); |
li.DrawLine(min,2066.,max,2066.); |
645 |
li.DrawLine(min,2060.,max,2060.); |
li.DrawLine(min,2060.,max,2060.); |
646 |
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
t1->DrawLatex(xlat,2066.2,ma.str().c_str()); |
647 |
t1->DrawLatex(xlat,2059.85,mi.str().c_str()); |
t1->DrawLatex(xlat,2059.8,mi.str().c_str()); |
648 |
break; |
break; |
649 |
|
|
650 |
} |
} |
738 |
// and fill graphs and histos |
// and fill graphs and histos |
739 |
|
|
740 |
Int_t al=0; |
Int_t al=0; |
741 |
|
ULong_t obtx=0; |
742 |
Double_t x[MAXSTORAGE]; |
Double_t x[MAXSTORAGE]; |
743 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
744 |
Double_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
752 |
|
|
753 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
754 |
|
|
755 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
if(((ULong_t)ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
756 |
maxev=ev; |
maxev=ev; |
757 |
break; |
break; |
758 |
} |
} |
759 |
else{ |
else{ |
760 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
obtx = ph->GetOrbitalTime(); |
761 |
|
x[(ev-minev)]=(Double_t)obtx; |
762 |
ALARM=0; |
ALARM=0; |
763 |
Int_t dsp=0; |
Int_t dsp=0; |
764 |
Int_t noacq=0; |
Int_t noacq=0; |
892 |
al=1; |
al=1; |
893 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
894 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
895 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
896 |
alarm << "Total events "<<nevent<<endl; |
alarm << "Total events "<<nevent<<endl; |
897 |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
898 |
alarm << "================================================="<< endl; |
alarm << "================================================="<< endl; |
973 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
974 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
975 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
976 |
|
if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501); |
977 |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
978 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
979 |
oss1.str(""); |
oss1.str(""); |
999 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
1000 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
1001 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
1002 |
|
if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501); |
1003 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
1004 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
1005 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
1111 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1112 |
isfile.str(""); |
isfile.str(""); |
1113 |
|
|
1114 |
|
isfile<<"Boxes so colored point out chips broken before the launch and never resumed"; |
1115 |
|
t->SetTextColor(6); |
1116 |
|
t->SetTextSize(0.018); |
1117 |
|
t->DrawLatex(7.,97.2,isfile.str().c_str()); |
1118 |
|
isfile.str(""); |
1119 |
|
|
1120 |
|
isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)"; |
1121 |
|
t->SetTextColor(107); |
1122 |
|
t->DrawLatex(7.,95.7,isfile.str().c_str()); |
1123 |
|
isfile.str(""); |
1124 |
|
t->SetTextColor(1); |
1125 |
|
|
1126 |
// |
// |
1127 |
// Draw the histos |
// Draw the histos |
1128 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
1192 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1193 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1194 |
b.DrawBox(384.,0.,512.,maxhist); |
b.DrawBox(384.,0.,512.,maxhist); |
1195 |
|
b.DrawBox(896.,0.,1024.,maxhist); |
1196 |
b.DrawBox(2048.,0.,2432.,maxhist); |
b.DrawBox(2048.,0.,2432.,maxhist); |
1197 |
b.DrawBox(2816.,0.,2944.,maxhist); |
b.DrawBox(2816.,0.,2944.,maxhist); |
1198 |
} |
} |
1207 |
b.DrawBox(256.,0.,512.,maxhist); |
b.DrawBox(256.,0.,512.,maxhist); |
1208 |
b.DrawBox(2816.,0.,3070.,maxhist); |
b.DrawBox(2816.,0.,3070.,maxhist); |
1209 |
} |
} |
1210 |
|
else if(i==5){ |
1211 |
|
b.SetFillColor(107); |
1212 |
|
b.SetFillStyle(3954); |
1213 |
|
b.DrawBox(896.,0.,1024.,maxhist); |
1214 |
|
// b.DrawBox(1664.,0.,1792.,maxhist); |
1215 |
|
} |
1216 |
else if(i==6){ |
else if(i==6){ |
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
|
b.DrawBox(1024.,0.,1280.,maxhist); |
|
|
|
|
1217 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1218 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1219 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
1220 |
|
b.DrawBox(1024.,0.,1280.,maxhist); |
1221 |
b.DrawBox(1280.,0.,1792.,maxhist); |
b.DrawBox(1280.,0.,1792.,maxhist); |
1222 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(2560.,0.,2816.,maxhist); |
1223 |
} |
} |
1225 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1226 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1227 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
1228 |
b.DrawBox(1024.,0.,1535.,maxhist); |
b.DrawBox(896.,0.,1535.,maxhist); |
1229 |
|
b.DrawBox(2024.,0.,2280.,maxhist); |
1230 |
} |
} |
1231 |
else if(i==8){ |
else if(i==8){ |
1232 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1236 |
else if(i==9){ |
else if(i==9){ |
1237 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1238 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1239 |
|
b.DrawBox(0.,0.,128.,maxhist); |
1240 |
b.DrawBox(256.,0.,384.,maxhist); |
b.DrawBox(256.,0.,384.,maxhist); |
1241 |
|
b.DrawBox(512.,0.,640.,maxhist); |
1242 |
|
b.DrawBox(896.,0.,1024.,maxhist); |
1243 |
b.DrawBox(1280.,0.,1535.,maxhist); |
b.DrawBox(1280.,0.,1535.,maxhist); |
1244 |
b.DrawBox(1792.,0.,1920.,maxhist); |
b.DrawBox(1664.,0.,1920.,maxhist); |
1245 |
} |
} |
1246 |
else if(i==10){ |
else if(i==10){ |
1247 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1248 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1249 |
b.DrawBox(1024.,0.,1152.,maxhist); |
b.DrawBox(0.,0.,512.,maxhist); |
1250 |
b.DrawBox(2048.,0.,3070.,maxhist); |
b.DrawBox(1024.,0.,3070.,maxhist); |
1251 |
} |
} |
1252 |
else if(i==11){ |
else if(i==11){ |
1253 |
b.SetFillColor(6); |
b.SetFillColor(6); |
1258 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1259 |
b.DrawBox(0.,0.,512.,maxhist); |
b.DrawBox(0.,0.,512.,maxhist); |
1260 |
b.DrawBox(1920.,0.,2560.,maxhist); |
b.DrawBox(1920.,0.,2560.,maxhist); |
1261 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
1262 |
} |
} |
1263 |
for(int va=1; va<24; va++){ |
for(int va=1; va<24; va++){ |
1264 |
va1x=128*va; |
va1x=128*va; |