2 |
* FTrkQLook_EXPERT.cxx |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r21 |
* version v1r25 |
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 |
143 |
|
|
144 |
// |
// |
145 |
// information about the RunHeader |
// information about the RunHeader |
146 |
ULong64_t HOBT[neventH]; |
ULong_t HOBT[neventH]; |
147 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
148 |
ULong_t acq_info[neventH]; |
ULong_t acq_info[neventH]; |
149 |
Int_t countnboot=1; |
Int_t countnboot=1; |
180 |
} |
} |
181 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
182 |
Int_t tempt[tsize][5]; |
Int_t tempt[tsize][5]; |
183 |
ULong64_t xt[tsize]; |
ULong_t xt[tsize]; |
184 |
|
|
185 |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
186 |
// |
// |
212 |
} |
} |
213 |
const Int_t bsize=maxsize; |
const Int_t bsize=maxsize; |
214 |
Int_t magt[bsize][5]; |
Int_t magt[bsize][5]; |
215 |
ULong64_t xb[bsize]; |
ULong_t xb[bsize]; |
216 |
siztmp=0; |
siztmp=0; |
217 |
// |
// |
218 |
// information about the magnetic field |
// information about the magnetic field |
249 |
// write the file for the TrkAlarm packet |
// write the file for the TrkAlarm packet |
250 |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
251 |
else{ |
else{ |
252 |
Long64_t obt=0; |
ULong_t obt=0; |
253 |
for (Int_t ev=0; ev<alnevent; ev++){ |
for (Int_t ev=0; ev<alnevent; ev++){ |
254 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
255 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
256 |
|
|
257 |
if(ph->GetOrbitalTime()<obt && ev>0) |
if((ULong_t)ph->GetOrbitalTime()<obt && ev>0) |
258 |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
259 |
obt=ph->GetOrbitalTime(); |
obt=ph->GetOrbitalTime(); |
260 |
|
|
261 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl; |
262 |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
263 |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
264 |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
265 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
266 |
|
|
737 |
// and fill graphs and histos |
// and fill graphs and histos |
738 |
|
|
739 |
Int_t al=0; |
Int_t al=0; |
740 |
|
ULong_t obtx=0; |
741 |
Double_t x[MAXSTORAGE]; |
Double_t x[MAXSTORAGE]; |
742 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
743 |
Double_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
751 |
|
|
752 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
753 |
|
|
754 |
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){ |
755 |
maxev=ev; |
maxev=ev; |
756 |
break; |
break; |
757 |
} |
} |
758 |
else{ |
else{ |
759 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
obtx = ph->GetOrbitalTime(); |
760 |
|
x[(ev-minev)]=(Double_t)obtx; |
761 |
ALARM=0; |
ALARM=0; |
762 |
Int_t dsp=0; |
Int_t dsp=0; |
763 |
Int_t noacq=0; |
Int_t noacq=0; |
891 |
al=1; |
al=1; |
892 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
893 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
894 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
895 |
alarm << "Total events "<<nevent<<endl; |
alarm << "Total events "<<nevent<<endl; |
896 |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
897 |
alarm << "================================================="<< endl; |
alarm << "================================================="<< endl; |
972 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
973 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
974 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
975 |
|
if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501); |
976 |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
977 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
978 |
oss1.str(""); |
oss1.str(""); |
998 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
999 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
1000 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
1001 |
|
if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501); |
1002 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
1003 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
1004 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
1176 |
b.SetFillStyle(3945); |
b.SetFillStyle(3945); |
1177 |
b.DrawBox(2944.,0.,3070.,maxhist); |
b.DrawBox(2944.,0.,3070.,maxhist); |
1178 |
|
|
1179 |
b.SetFillColor(107);2 |
b.SetFillColor(107); |
1180 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1181 |
b.DrawBox(384.,0.,512.,maxhist); |
b.DrawBox(384.,0.,512.,maxhist); |
1182 |
b.DrawBox(2048.,0.,2432.,maxhist); |
b.DrawBox(2048.,0.,2432.,maxhist); |
1193 |
b.DrawBox(256.,0.,512.,maxhist); |
b.DrawBox(256.,0.,512.,maxhist); |
1194 |
b.DrawBox(2816.,0.,3070.,maxhist); |
b.DrawBox(2816.,0.,3070.,maxhist); |
1195 |
} |
} |
1196 |
|
else if(i==5){ |
1197 |
|
b.SetFillColor(107); |
1198 |
|
b.SetFillStyle(3954); |
1199 |
|
b.DrawBox(896.,0.,1024.,maxhist); |
1200 |
|
} |
1201 |
else if(i==6){ |
else if(i==6){ |
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
|
b.DrawBox(1024.,0.,1280.,maxhist); |
|
|
|
|
1202 |
b.SetFillColor(107); |
b.SetFillColor(107); |
1203 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
1204 |
b.DrawBox(512.,0.,768.,maxhist); |
b.DrawBox(512.,0.,768.,maxhist); |
1205 |
|
b.DrawBox(1024.,0.,1280.,maxhist); |
1206 |
b.DrawBox(1280.,0.,1792.,maxhist); |
b.DrawBox(1280.,0.,1792.,maxhist); |
1207 |
b.DrawBox(2560.,0.,2816.,maxhist); |
b.DrawBox(2560.,0.,2816.,maxhist); |
1208 |
} |
} |
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 |
b.DrawBox(1024.,0.,1535.,maxhist); |
b.DrawBox(896.,0.,1535.,maxhist); |
1214 |
|
b.DrawBox(2024.,0.,2280.,maxhist); |
1215 |
} |
} |
1216 |
else if(i==8){ |
else if(i==8){ |
1217 |
b.SetFillColor(107); |
b.SetFillColor(107); |