25 |
#include <physics/tracker/TrackerEvent.h> |
#include <physics/tracker/TrackerEvent.h> |
26 |
#include <PscuHeader.h> |
#include <PscuHeader.h> |
27 |
#include <EventHeader.h> |
#include <EventHeader.h> |
28 |
|
#include <RunHeaderEvent.h> |
29 |
#include <TrkAlarmEvent.h> |
#include <TrkAlarmEvent.h> |
30 |
#include <tsbt/TsbTRecord.h> |
#include <tsbt/TsbTRecord.h> |
31 |
#include <tsbt/TsbTEvent.h> |
#include <tsbt/TsbTEvent.h> |
32 |
// |
// |
33 |
|
|
34 |
void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ |
void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ |
35 |
if ( to == 0 ){ |
if ( to == 0 ){ |
36 |
Int_t t2length = s2.Length(); |
Int_t t2length = s2.Length(); |
37 |
s1 = ""; |
s1 = ""; |
38 |
to = t2length; |
to = t2length; |
39 |
}; |
}; |
40 |
for (Int_t i = from; i<to; i++){ |
for (Int_t i = from; i<to; i++){ |
41 |
s1.Append(s2[i],1); |
s1.Append(s2[i],1); |
42 |
}; |
}; |
43 |
}; |
}; |
44 |
|
|
45 |
|
|
48 |
// |
// |
49 |
// obtain information about the data file and select the output dir |
// obtain information about the data file and select the output dir |
50 |
const string filepath=file.Data(); |
const string filepath=file.Data(); |
51 |
Int_t dwpos = filepath.rfind("DW_"); |
Int_t dwpos = filepath.rfind("/"); |
52 |
Int_t dwpos1 = filepath.find(".root"); |
Int_t dwpos1 = filepath.find(".root"); |
53 |
TString fpath=(filepath.c_str()); |
TString fpath=(filepath.c_str()); |
54 |
TString base,ffile ; |
TString base,ffile ; |
55 |
stringcopy(ffile,fpath,dwpos,dwpos1); |
stringcopy(ffile,fpath,dwpos+1,dwpos1); |
56 |
stringcopy(base,fpath,0,dwpos); |
stringcopy(base,fpath,0,dwpos); |
57 |
|
if(dwpos>0) base+="/"; |
58 |
|
|
59 |
TString out; |
TString out; |
60 |
if(outdir.Length()==0){ |
if(outdir.Length()==0){ |
68 |
pamela::TsbTEvent *event = 0; |
pamela::TsbTEvent *event = 0; |
69 |
pamela::TsbTRecord *record = 0; |
pamela::TsbTRecord *record = 0; |
70 |
pamela::tracker::TrackerEvent *te=0; |
pamela::tracker::TrackerEvent *te=0; |
71 |
pamela::EventHeader *eh=0,*aleh=0; |
pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0; |
72 |
pamela::PscuHeader *ph=0; |
pamela::PscuHeader *ph=0,*pH=0; |
73 |
pamela::TrkAlarmEvent *al=0; |
pamela::TrkAlarmEvent *al=0; |
74 |
|
pamela::RunHeaderEvent *reh=0; |
75 |
|
|
76 |
TFile *datafile = new TFile(file); |
TFile *datafile = new TFile(file); |
77 |
|
|
78 |
TTree *tree = (TTree*)datafile->Get("TsbT"); |
TTree *tree = (TTree*)datafile->Get("TsbT"); |
79 |
tree->SetBranchAddress("TsbT",&event); |
tree->SetBranchAddress("TsbT",&event); |
80 |
|
tree->SetBranchAddress("Header",&eT); |
81 |
|
|
82 |
TTree *altr = (TTree*)datafile->Get("TrkAlarm"); |
TTree *altr = (TTree*)datafile->Get("TrkAlarm"); |
83 |
altr->SetBranchAddress("TrkAlarm",&al); |
altr->SetBranchAddress("TrkAlarm",&al); |
87 |
tr->SetBranchAddress("Tracker",&te); |
tr->SetBranchAddress("Tracker",&te); |
88 |
tr->SetBranchAddress("Header",&eh); |
tr->SetBranchAddress("Header",&eh); |
89 |
|
|
90 |
|
TTree *otr = (TTree*)datafile->Get("RunHeader"); |
91 |
|
otr->SetBranchAddress("Header",&eH); |
92 |
|
otr->SetBranchAddress("RunHeader",&reh); |
93 |
|
|
94 |
Long64_t nevent = tr->GetEntries(); |
Long64_t nevent = tr->GetEntries(); |
95 |
|
Long64_t neventH = otr->GetEntries(); |
96 |
Long64_t tnevent = tree->GetEntries(); |
Long64_t tnevent = tree->GetEntries(); |
97 |
Long64_t alnevent = altr->GetEntries(); |
Long64_t alnevent = altr->GetEntries(); |
98 |
Int_t minevent=0; |
Int_t minevent=0; |
99 |
Int_t maxevent=0; |
Int_t maxevent=0; |
100 |
|
|
101 |
printf("Number of total events: %lld\n",nevent); |
printf("Number of total events: %lld\n",nevent); |
102 |
|
printf("Number of header events: %lld\n",neventH); |
103 |
|
printf("Number of TsbT events: %lld\n",tnevent); |
104 |
|
printf("Number of TrkAlarm packet events: %lld\n",alnevent); |
105 |
|
|
106 |
if (nevent<=0){ |
if (nevent<=0){ |
107 |
datafile->Close(); |
datafile->Close(); |
134 |
nevent=maxevent-minevent ; |
nevent=maxevent-minevent ; |
135 |
} |
} |
136 |
|
|
137 |
|
Long64_t obt=0; |
138 |
if (fromevent!=0) |
const Int_t sizeH=neventH; |
139 |
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
ULong64_t HOBT[sizeH]; |
140 |
else |
Int_t trk_cal_us[sizeH],countrun=1; |
141 |
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
for (Int_t vi=0; vi<sizeH;vi++){ |
142 |
|
HOBT[vi]=0; |
143 |
|
trk_cal_us[vi]=0; |
144 |
|
} |
145 |
|
for (Int_t ev=0; ev<neventH; ev++){ |
146 |
|
otr->GetEntry(ev); |
147 |
|
pH = eH->GetPscuHeader(); |
148 |
|
HOBT[ev]= pH->GetOrbitalTime(); |
149 |
|
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
150 |
|
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
151 |
|
countrun+=1; |
152 |
|
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
153 |
|
} |
154 |
|
countrun+=(Int_t)nevent/30000; |
155 |
|
printf("\ncountrun=%d\n",countrun); |
156 |
|
|
157 |
// |
// |
158 |
// other variables definitions |
// other variables definitions |
159 |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
|
Int_t warning_dspnumber=0; |
|
160 |
Int_t ALARM=0; |
Int_t ALARM=0; |
161 |
Int_t WARNING[12]; |
Int_t WARNING[12]; |
162 |
const Int_t size=nevent; |
Float_t hi=0; |
163 |
Int_t dsp=0; |
|
|
Double_t yd[size*12], yc[size*12], x[size], eventint[size]; |
|
|
Double_t yyc[size], hi=0, land[size*12][3], illum[size*12][3] ; |
|
|
|
|
|
TGraph *comprtime,*temp[5]; |
|
|
TGraph *eventnumb; |
|
|
TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; |
|
|
TPaveText *pt1; |
|
|
TPad *pt; |
|
|
|
|
164 |
// |
// |
165 |
// information about the entries for the temperatures |
// information about the entries for the temperatures |
166 |
Int_t tmpSize=0,siztmp=0,maxsize=0; |
Int_t tmpSize=0,siztmp=0,maxsize=0; |
171 |
} |
} |
172 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
173 |
Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; |
Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; |
174 |
|
// |
175 |
|
// information about the temperatures |
176 |
|
for (Int_t ev=0; ev<tnevent; ev++){ |
177 |
|
tree->GetEntry(ev); |
178 |
|
tmpSize = event->Records->GetEntries(); |
179 |
|
for (Int_t j = 0; j < tmpSize; j++){ |
180 |
|
record = (pamela::TsbTRecord*)event->Records->At(j); |
181 |
|
xt[siztmp]=record->RECORD_OBT; //0.051*record->RECORD_OBT; |
182 |
|
for (Int_t z = 0; z < 5; z++){ |
183 |
|
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
184 |
|
} |
185 |
|
siztmp++; |
186 |
|
} |
187 |
|
} |
188 |
|
|
189 |
// |
// |
190 |
// open the output text files for the alarms |
// open the output text files for the alarms |
191 |
ofstream warning(out + "warning.txt",ios::out); |
TString fname1 = out+ffile; |
192 |
TString fname = out+ffile; |
TString fname = out+ffile; |
|
TString fname1 = out+ffile; |
|
193 |
int slen=fname.Length(); |
int slen=fname.Length(); |
194 |
int last=fname.Last('_'); |
int last=fname.Last('_'); |
195 |
if(last<(slen-1))fname.Append('_'); |
if(last<(slen-1))fname.Append('_'); |
196 |
fname.Append("Trk-ALARM-report.txt"); |
fname.Append("FTrk-DSP-report.txt"); |
197 |
ofstream alarm(fname,ios::out); |
ofstream alarm(fname,ios::out); |
198 |
alarm << "TRACKER ALARM REPORT - Downlink " << ffile<< endl; |
alarm << "TRACKER DSP REPORT - Downlink " << ffile<< endl; |
199 |
fname1.Append("_TrkAlarm-pkt-report.txt"); |
fname1.Append("_FTrkAlarm-pkt-report.txt"); |
200 |
ofstream alarm1(fname1,ios::out); |
ofstream alarm1(fname1,ios::out); |
201 |
alarm1 << "TrkAlarm pkt REPORT - Downlink " << ffile<< endl; |
alarm1 << "TrkAlarm pkt REPORT - Downlink " << ffile<< endl; |
202 |
|
|
208 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
209 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
210 |
|
|
211 |
|
if(ph->GetOrbitalTime()<obt && ev>0) |
212 |
|
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
213 |
|
obt=ph->GetOrbitalTime(); |
214 |
|
|
215 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl; |
216 |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
217 |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
218 |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
219 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl<<endl; |
220 |
|
|
221 |
alarm1 << " ALARM[1]= "<<(Int_t)al->ALARM[1]<<endl; |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
222 |
alarm1 << " ALARM[2]= "<<(Int_t)al->ALARM[2]<<endl; |
alarm1 << " ALARM[1]= "<< hex<< (Int_t)al->ALARM[1]<<dec<<endl; |
223 |
alarm1 << " Aswr= "<<(Int_t)al->Aswr<<endl; |
alarm1 << " ALARM[2]= "<< hex<< (Int_t)al->ALARM[2]<<dec<<endl; |
224 |
alarm1 << " BID[1]= "<<(Int_t)al->BID[0]<<endl; |
alarm1 << " CmdDuringTrig= "<< hex<<(Int_t)al->CmdDuringTrig<<endl; |
225 |
alarm1 << " BID[2]= "<<(Int_t)al->BID[1]<<endl; |
alarm1 << " FinalCheck= "<< hex<<(Int_t)al->FinalCheck<<endl; |
226 |
alarm1 << " BID[3]= "<<(Int_t)al->BID[2]<<endl; |
alarm1 << " FlashData= "<< hex<<(Int_t)al->FlashData<<endl; |
227 |
alarm1 << " BID[4]= "<<(Int_t)al->BID[3]<<endl; |
alarm1 << " FlashShutdown= "<< hex<<(Int_t)al->FlashShutdown<<endl; |
228 |
alarm1 << " BID[5]= "<<(Int_t)al->BID[4]<<endl; |
alarm1 << " FlashUpset= "<< hex<<(Int_t)al->FlashUpset<<endl; |
229 |
alarm1 << " BID[6]= "<<(Int_t)al->BID[5]<<endl; |
alarm1 << " InterCheck= "<< hex<<(Int_t)al->InterCheck<<endl; |
230 |
alarm1 << " BID[7]= "<<(Int_t)al->BID[6]<<endl; |
alarm1 << " UnknownCmd= "<< hex<<(Int_t)al->UnknownCmd<<endl<<endl; |
231 |
alarm1 << " CmdDuringTrig= "<<(Int_t)al->CmdDuringTrig<<endl; |
|
232 |
alarm1 << " CmdIDMA= "<<(Int_t)al->CmdIDMA<<endl; |
alarm1 << "Alarm variables (range 0-3F)"<<endl; |
233 |
alarm1 << " CmdNum= "<<(Int_t)al->CmdNum<<endl; |
alarm1 << " CmdIDMA= "<< hex<<(Int_t)al->CmdIDMA<<endl; |
234 |
alarm1 << " DSPBusy= "<<(Int_t)al->DSPBusy<<endl; |
alarm1 << " DSPSoft= "<< hex<<(Int_t)al->DSPSoft<<endl; |
235 |
alarm1 << " DSPMask= "<<(Int_t)al->DSPMask<<endl; |
alarm1 << " TrigIDMA= "<< hex<<(Int_t)al->TrigIDMA<<endl<<endl; |
236 |
alarm1 << " DSPSoft= "<<(Int_t)al->DSPSoft<<endl; |
|
237 |
alarm1 << " FinalCheck= "<<(Int_t)al->FinalCheck<<endl; |
alarm1 << "Alarm bits (range 0-1)"<<endl; |
238 |
alarm1 << " FlashData= "<<(Int_t)al->FlashData<<endl; |
alarm1 << " Aswr= "<< hex<<(Int_t)al->Aswr<<endl; |
239 |
alarm1 << " FlashOn= "<<(Int_t)al->FlashOn<<endl; |
alarm1 << " BID[1]= "<< hex<<(Int_t)al->BID[0]<<endl; |
240 |
alarm1 << " FlashShutdown= "<<(Int_t)al->FlashShutdown<<endl; |
alarm1 << " BID[2]= "<< hex<<(Int_t)al->BID[1]<<endl; |
241 |
alarm1 << " FlashUpset= "<<(Int_t)al->FlashUpset<<endl; |
alarm1 << " BID[3]= "<< hex<<(Int_t)al->BID[2]<<endl; |
242 |
alarm1 << " InterCheck= "<<(Int_t)al->InterCheck<<endl; |
alarm1 << " BID[4]= "<< hex<<(Int_t)al->BID[3]<<endl; |
243 |
alarm1 << " PNum= "<<(Int_t)al->PNum<<endl; |
alarm1 << " BID[5]= "<< hex<<(Int_t)al->BID[4]<<endl; |
244 |
alarm1 << " TrigIDMA= "<<(Int_t)al->TrigIDMA<<endl; |
alarm1 << " BID[6]= "<< hex<<(Int_t)al->BID[5]<<endl; |
245 |
alarm1 << " TrigMask= "<<(Int_t)al->TrigMask<<endl; |
alarm1 << " BID[7]= "<< hex<<(Int_t)al->BID[6]<<endl; |
246 |
alarm1 << " UnknownCmd= "<<(Int_t)al->UnknownCmd<<endl; |
alarm1 << " CmdNum= "<< hex<<(Int_t)al->CmdNum<<endl; |
247 |
} |
alarm1 << " DSPBusy= "<< hex<<(Int_t)al->DSPBusy<<endl; |
248 |
} |
alarm1 << " DSPMask= "<< hex<<(Int_t)al->DSPMask<<endl; |
249 |
|
alarm1 << " FlashOn= "<< hex<<(Int_t)al->FlashOn<<endl; |
250 |
//*************************************************************************************** |
alarm1 << " PNum= "<< hex<<(Int_t)al->PNum<<endl; |
251 |
// LOOP on each event |
alarm1 << " TrigMask= "<< hex<<(Int_t)al->TrigMask<<endl; |
252 |
//*************************************************************************************** |
alarm1 << "================================================="<< endl<<endl; |
|
|
|
|
// |
|
|
// information about the temperatures |
|
|
for (Int_t ev=0; ev<tnevent; ev++){ |
|
|
tree->GetEntry(ev); |
|
|
tmpSize = event->Records->GetEntries(); |
|
|
for (Int_t j = 0; j < tmpSize; j++){ |
|
|
record = (pamela::TsbTRecord*)event->Records->At(j); |
|
|
xt[siztmp]=record->RECORD_OBT; //0.051*record->RECORD_OBT; |
|
|
for (Int_t z = 0; z < 5; z++){ |
|
|
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
|
|
} |
|
|
siztmp++; |
|
|
} |
|
|
} |
|
|
|
|
|
// |
|
|
// information about the tracker data |
|
|
for (Int_t ev=minevent; ev<maxevent; ev++){ |
|
|
tr->GetEntry(ev); |
|
|
ph = eh->GetPscuHeader(); |
|
|
dsp=0; |
|
|
ALARM=0; |
|
|
for(Int_t i=0; i<12; i++){ |
|
|
dsp=te->DSPnumber[i]-1; |
|
|
yd[(ev-minevent)*12+dsp]= te->DATAlength[i]; |
|
|
yc[(ev-minevent)*12+dsp]= 0.051*te->compressiontime[i]; |
|
|
for(Int_t j=0;j<3;j++){ |
|
|
illum[(ev-minevent)*12+dsp][j]=te->addrcluster[i][j]; |
|
|
if(!(dsp%2)&&(te->signcluster[i][j])!=0) |
|
|
land[(ev-minevent)*12+dsp][j]=1024-(te->signcluster[i][j]); |
|
|
else land[(ev-minevent)*12+dsp][j]=te->signcluster[i][j]; |
|
|
} |
|
|
x[(ev-minevent)]= ph->GetOrbitalTime(); |
|
|
|
|
|
WARNING[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){ |
|
|
ALARM = 1; //general alarm |
|
|
WARNING[i] = 1; // DSP warning |
|
|
}; |
|
|
|
|
|
if(te->alarm[i]!=0){ // hardware alarm |
|
|
ALARM = 1; |
|
|
}; |
|
|
|
|
|
//************************************************************************************** |
|
|
// warning for internal number |
|
|
//************************************************************************************** |
|
|
if(i<=10){ |
|
|
if(te->eventn[i]!=te->eventn[i+1]){ |
|
|
warning_dspnumber++; |
|
|
warning<< "==> WARNING!! Check entry "<< ev<<" (DSP "<<dsp<<")" <<endl<< |
|
|
"eventn["<<i<<"]= "<<te->eventn[i]<<"!= eventn["<<i+1<<"]= "<< te->eventn[i+1]<<endl; |
|
|
} |
|
|
else |
|
|
eventint[(ev-minevent)]=te->eventn[0]; |
|
|
} |
|
|
} |
|
|
|
|
|
if(ev<=maxevent-1){ |
|
|
|
|
|
if((ev-minevent)>=1 && eventint[(ev-minevent)]!=eventint[(ev-minevent)-1]+1 && eventint[(ev-minevent)]!=1){ |
|
|
warning_dspnumber++; |
|
|
warning<< "==> WARNING!! Check entry "<< ev<<endl<< |
|
|
" DSP event num.= "<< eventint[(ev-minevent)]<< |
|
|
" is different from (previus+1) ="<<eventint[(ev-minevent)-1]+1 <<"\n"<<endl; |
|
|
} |
|
|
}; |
|
|
|
|
|
//******************************************************************************************** |
|
|
// file ALARM |
|
|
//******************************************************************************************** |
|
|
if(ALARM==1) { |
|
|
|
|
|
alarm << "================================================="<< endl; |
|
|
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
|
|
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
|
|
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
|
|
alarm << "================================================="<< endl; |
|
253 |
|
|
|
alarm << " DSPn"; |
|
|
alarm << " Event"; |
|
|
alarm << " Words"; |
|
|
alarm << " crc"; |
|
|
alarm << " FC"; |
|
|
alarm << " FL1"; |
|
|
alarm << " FL2"; |
|
|
alarm << " FL3"; |
|
|
alarm << " FL4"; |
|
|
alarm << " FL5"; |
|
|
alarm << " FL6" << endl; |
|
|
|
|
|
for(Int_t i=0; i<12 ; i++){ |
|
|
alarm.width(5); alarm << te->DSPnumber[i]; |
|
|
alarm.width(6); alarm << te->eventn[i]; |
|
|
alarm.width(6); alarm << te->DATAlength[i]; |
|
|
alarm.width(4); alarm << te->crc[i]; |
|
|
alarm.width(4); alarm << te->fc[i]; |
|
|
alarm.width(4); alarm << te->fl1[i]; |
|
|
alarm.width(4); alarm << te->fl2[i]; |
|
|
alarm.width(4); alarm << te->fl3[i]; |
|
|
alarm.width(4); alarm << te->fl4[i]; |
|
|
alarm.width(4); alarm << te->fl5[i]; |
|
|
alarm.width(4); alarm << te->fl6[i]; |
|
|
if(te->alarm[i]!=0)alarm<<" >> ALARM "; |
|
|
if(WARNING[i]!=0)alarm<<" (DSP warning) "; |
|
|
alarm << endl; |
|
|
} |
|
254 |
} |
} |
255 |
} |
} |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
|
|
|
|
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
|
|
|
|
|
//***************************************** |
|
|
//close all files |
|
|
//***************************************** |
|
|
warning.close(); |
|
|
alarm.close(); |
|
|
datafile->Close(); |
|
256 |
|
|
257 |
|
|
258 |
gStyle->SetLabelSize(0.05,"x"); |
gStyle->SetLabelSize(0.05,"x"); |
267 |
gStyle->SetTitleSize(0.06,"y"); |
gStyle->SetTitleSize(0.06,"y"); |
268 |
gStyle->SetTitleSize(0.055,"x"); |
gStyle->SetTitleSize(0.055,"x"); |
269 |
|
|
270 |
//**************************************************************************************** |
|
271 |
//Output figures --- First sheet: |
//*************************************************************************************** |
272 |
//**************************************************************************************** |
// LOOP on each event |
273 |
|
//*************************************************************************************** |
274 |
|
|
275 |
|
if (fromevent!=0) |
276 |
|
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
277 |
|
else |
278 |
|
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
279 |
|
|
280 |
|
|
281 |
|
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
282 |
|
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
283 |
|
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
284 |
|
TGraph *comprtime[12][countrun],*temp[5][countrun]; |
285 |
|
TGraph *eventnumb[countrun]; |
286 |
|
TH1F *landau1[12][countrun],*landau2[12][countrun],*landau3[12][countrun],*illuminazione[12][countrun]; |
287 |
|
|
288 |
|
for(Int_t ii=0; ii<countrun;ii++){ |
289 |
|
TPaveText *pt1; |
290 |
|
TPad *pt,*pt0; |
291 |
|
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
292 |
|
|
293 |
|
|
294 |
TCanvas *CompTimeCanv=new TCanvas("Tracker_Detector_Report_4/6","",900,1200); |
ofstream warning(out + "warning.txt",ios::out); |
295 |
CompTimeCanv->SetFillColor(10); |
|
296 |
CompTimeCanv->Range(0,0,100,100); |
//**************************************************************************************** |
297 |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
//Output figures --- First sheet: |
298 |
isfile<<"COMPRESSIONTIME vs. OBT"; |
//**************************************************************************************** |
299 |
TLatex *t=new TLatex(); |
|
300 |
t->SetTextFont(32); |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
301 |
t->SetTextColor(1); |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
302 |
t->SetTextAlign(12); |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
303 |
t->SetTextSize(0.02); |
CompTimeCanv[ii]->SetFillColor(10); |
304 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
CompTimeCanv[ii]->Range(0,0,100,100); |
305 |
TLatex *t1=new TLatex(); |
TLatex *t=new TLatex(); |
306 |
t1->SetTextFont(32); |
t->SetTextFont(32); |
307 |
t1->SetTextColor(1); |
t->SetTextColor(1); |
308 |
t1->SetTextAlign(12); |
t->SetTextAlign(12); |
309 |
t1->SetTextSize(0.02); |
t->SetTextSize(0.02); |
310 |
t1->DrawLatex(64.,98.7,isfile.str().c_str()); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
311 |
isfile.str(""); |
TLatex *t1=new TLatex(); |
312 |
|
t1->SetTextFont(32); |
313 |
//**************************************************************************************** |
t1->SetTextColor(1); |
314 |
//Output figures --- Second sheet: |
t1->SetTextAlign(12); |
315 |
//**************************************************************************************** |
t1->SetTextSize(0.02); |
316 |
|
t1->DrawLatex(59.,98.7,isfile.str().c_str()); |
317 |
TCanvas *EventNumCanv=new TCanvas("Tracker_Detector_Report_5/6","",900,1200); |
isfile.str(""); |
318 |
EventNumCanv->SetFillColor(10); |
|
319 |
EventNumCanv->Range(0,0,100,100); |
//**************************************************************************************** |
320 |
isfile<<"WARNINGS on DSP EVENT NUMBER "; |
//Output figures --- Second sheet: |
321 |
t->SetTextFont(32); |
//**************************************************************************************** |
322 |
t->SetTextColor(1); |
|
323 |
t->SetTextAlign(12); |
isfile<<"WARNINGS on DSP EVENT NUMBER pag"<<ii+1; |
324 |
t->SetTextSize(0.02); |
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
325 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
EventNumCanv[ii]->SetFillColor(10); |
326 |
t1->SetTextFont(32); |
EventNumCanv[ii]->Range(0,0,100,100); |
327 |
t1->SetTextColor(1); |
t->SetTextFont(32); |
328 |
t1->SetTextAlign(12); |
t->SetTextColor(1); |
329 |
t1->SetTextSize(0.02); |
t->SetTextAlign(12); |
330 |
t1->DrawLatex(68.4,98.7,isfile.str().c_str()); |
t->SetTextSize(0.02); |
331 |
isfile.str(""); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
332 |
|
t1->SetTextFont(32); |
333 |
//**************************************************************************************** |
t1->SetTextColor(1); |
334 |
//Output figures --- Third sheet: |
t1->SetTextAlign(12); |
335 |
//**************************************************************************************** |
t1->SetTextSize(0.02); |
336 |
|
t1->DrawLatex(63.4,98.7,isfile.str().c_str()); |
337 |
TCanvas *LandauCanv1=new TCanvas("Landau ladder1","",900,1200); |
isfile.str(""); |
338 |
LandauCanv1->SetFillColor(10); |
|
339 |
LandauCanv1->Range(0,0,100,100); |
//**************************************************************************************** |
340 |
isfile<<"Landau ladder1"; |
//Output figures --- Third sheet: |
341 |
|
//**************************************************************************************** |
342 |
t->SetTextFont(32); |
|
343 |
t->SetTextColor(1); |
isfile<<"Cluster Signal ladder1 pag"<<ii+1; |
344 |
t->SetTextAlign(12); |
LandauCanv1[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
345 |
t->SetTextSize(0.02); |
LandauCanv1[ii]->SetFillColor(10); |
346 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
LandauCanv1[ii]->Range(0,0,100,100); |
347 |
t1->SetTextFont(32); |
|
348 |
t1->SetTextColor(1); |
t->SetTextFont(32); |
349 |
t1->SetTextAlign(12); |
t->SetTextColor(1); |
350 |
t1->SetTextSize(0.02); |
t->SetTextAlign(12); |
351 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t->SetTextSize(0.02); |
352 |
isfile.str(""); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
353 |
|
t1->SetTextFont(32); |
354 |
|
t1->SetTextColor(1); |
355 |
|
t1->SetTextAlign(12); |
356 |
|
t1->SetTextSize(0.02); |
357 |
|
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
358 |
|
isfile.str(""); |
359 |
|
|
360 |
//**************************************************************************************** |
//**************************************************************************************** |
361 |
//Output figures --- Third sheet: |
//Output figures --- Third sheet: |
362 |
//**************************************************************************************** |
//**************************************************************************************** |
363 |
|
|
364 |
TCanvas *LandauCanv2=new TCanvas("Landau ladder2","",900,1200); |
isfile<<"Cluster Signal ladder2 pag"<<ii+1; |
365 |
LandauCanv2->SetFillColor(10); |
LandauCanv2[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
366 |
LandauCanv2->Range(0,0,100,100); |
LandauCanv2[ii]->SetFillColor(10); |
367 |
isfile<<"Landau ladder2"; |
LandauCanv2[ii]->Range(0,0,100,100); |
368 |
|
|
369 |
t->SetTextFont(32); |
t->SetTextFont(32); |
370 |
t->SetTextColor(1); |
t->SetTextColor(1); |
371 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
372 |
t->SetTextSize(0.02); |
t->SetTextSize(0.02); |
373 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
374 |
t1->SetTextFont(32); |
t1->SetTextFont(32); |
375 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
376 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
377 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
378 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
379 |
isfile.str(""); |
isfile.str(""); |
380 |
|
|
381 |
//**************************************************************************************** |
//**************************************************************************************** |
382 |
//Output figures --- Third sheet: |
//Output figures --- Third sheet: |
383 |
//**************************************************************************************** |
//**************************************************************************************** |
384 |
|
|
385 |
TCanvas *LandauCanv3=new TCanvas("Landau ladder3","",900,1200); |
isfile<<"Cluster Signal ladder3 pag"<<ii+1; |
386 |
LandauCanv3->SetFillColor(10); |
LandauCanv3[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
387 |
LandauCanv3->Range(0,0,100,100); |
LandauCanv3[ii]->SetFillColor(10); |
388 |
isfile<<"Landau ladder3"; |
LandauCanv3[ii]->Range(0,0,100,100); |
389 |
|
|
390 |
t->SetTextFont(32); |
t->SetTextFont(32); |
391 |
t->SetTextColor(1); |
t->SetTextColor(1); |
392 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
393 |
t->SetTextSize(0.02); |
t->SetTextSize(0.02); |
394 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
395 |
t1->SetTextFont(32); |
t1->SetTextFont(32); |
396 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
397 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
398 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
399 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
400 |
isfile.str(""); |
isfile.str(""); |
401 |
|
|
402 |
//**************************************************************************************** |
//**************************************************************************************** |
403 |
//Output figures --- Fourth sheet: |
//Output figures --- Fourth sheet: |
404 |
//**************************************************************************************** |
//**************************************************************************************** |
405 |
|
|
406 |
TCanvas *IlluminaCanv=new TCanvas("Illuminazione","",900,1200); |
isfile<<"lighting of the views pag"<<ii+1; |
407 |
IlluminaCanv->SetFillColor(10); |
IlluminaCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
408 |
IlluminaCanv->Range(0,0,100,100); |
IlluminaCanv[ii]->SetFillColor(10); |
409 |
isfile<<"lighting of the views"; |
IlluminaCanv[ii]->Range(0,0,100,100); |
410 |
t->SetTextFont(32); |
t->SetTextFont(32); |
411 |
t->SetTextColor(1); |
t->SetTextColor(1); |
412 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
413 |
t->SetTextSize(0.02); |
t->SetTextSize(0.02); |
414 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
415 |
t1->SetTextFont(32); |
t1->SetTextFont(32); |
416 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
417 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
418 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
419 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
420 |
isfile.str(""); |
isfile.str(""); |
421 |
|
|
422 |
//**************************************************************************************** |
//**************************************************************************************** |
423 |
//Output figures --- Fifth sheet: |
//Output figures --- Fifth sheet: |
424 |
//**************************************************************************************** |
//**************************************************************************************** |
425 |
|
|
426 |
TCanvas *TempCanv=new TCanvas("Tracker_Detector_Temperaturt","",900,1200); |
isfile<<"Temperatures vs OBT pag"<<ii+1; |
427 |
TempCanv->SetFillColor(10); |
TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
428 |
TempCanv->Range(0,0,100,100); |
TempCanv[ii]->SetFillColor(10); |
429 |
isfile<<"Temperatures vs OBT"; |
TempCanv[ii]->Range(0,0,100,100); |
430 |
|
|
431 |
t->SetTextFont(32); |
t->SetTextFont(32); |
432 |
t->SetTextColor(1); |
t->SetTextColor(1); |
433 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
434 |
t->SetTextSize(0.02); |
t->SetTextSize(0.02); |
435 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
436 |
t1->SetTextFont(32); |
t1->SetTextFont(32); |
437 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
438 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
439 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
440 |
t1->DrawLatex(80.,98.7,isfile.str().c_str()); |
t1->DrawLatex(75.,98.7,isfile.str().c_str()); |
441 |
isfile.str(""); |
isfile.str(""); |
442 |
|
|
443 |
//************************************************************************************* |
//************************************************************************************* |
444 |
//book pads and histos |
//book pads and histos |
445 |
//*************************************************************************************** |
//*************************************************************************************** |
446 |
|
Float_t posy = 0.95; // up y-coord - top pads |
447 |
|
Float_t hpad = 0; // pad height |
448 |
|
Float_t posx1=0; // left x-coord - pad column |
449 |
|
Float_t posx0=0; // x-coord - column division |
450 |
|
Float_t wrel = 0; // relative x size of first sub-column |
451 |
|
Float_t marg = 0.004; // margin among pads |
452 |
|
Float_t tposy = 0.95; // up y-coord - top pads |
453 |
|
Float_t thpad = 0; // pad height |
454 |
|
Float_t tposx1=0; // left x-coord - pad column |
455 |
|
Float_t tposx0=0; // x-coord - column division |
456 |
|
Float_t twrel = 0; // relative x size of first sub-column |
457 |
|
Float_t tmarg = 0.004; // margin among pads |
458 |
|
|
459 |
|
hpad = (posy-marg*11)/6; |
460 |
|
wrel = (1-marg*4)/2; |
461 |
|
thpad = (tposy-tmarg*5)/3; |
462 |
|
twrel = (1-tmarg*4)/2; |
463 |
|
|
464 |
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
for(Int_t n = 0; n<12; n++) { |
|
Double_t posy = 0.95; // up y-coord - top pads |
|
|
Double_t hpad = 0; // pad height |
|
|
Double_t posx1=0; // left x-coord - pad column |
|
|
Double_t posx0=0; // x-coord - column division |
|
|
Double_t wrel = 0; // relative x size of first sub-column |
|
|
Double_t marg = 0.004; // margin among pads |
|
|
Double_t tposy = 0.95; // up y-coord - top pads |
|
|
Double_t thpad = 0; // pad height |
|
|
Double_t tposx1=0; // left x-coord - pad column |
|
|
Double_t tposx0=0; // x-coord - column division |
|
|
Double_t twrel = 0; // relative x size of first sub-column |
|
|
Double_t tmarg = 0.004; // margin among pads |
|
|
|
|
|
hpad = (posy-marg*11)/6; |
|
|
wrel = (1-marg*4)/2; |
|
|
thpad = (tposy-tmarg*5)/3; |
|
|
twrel = (1-tmarg*4)/2; |
|
|
stringstream title; |
|
|
stringstream hid; |
|
|
|
|
|
for(Int_t n = 0; n<12; n++) { |
|
465 |
|
|
466 |
if ( (n+1)%2==1 ) { |
if ( (n+1)%2==1 ) { |
467 |
if(n>1) posy = posy-(marg*2+hpad); |
if(n>1) posy = posy-(marg*2+hpad); |
468 |
posx1 = marg; |
posx1 = marg; |
469 |
posx0 = posx1 + wrel; |
posx0 = posx1 + wrel; |
470 |
} |
} |
471 |
else { |
else { |
472 |
posx1 = posx0 + 2*marg; |
posx1 = posx0 + 2*marg; |
473 |
posx0 = posx1 + wrel; |
posx0 = posx1 + wrel; |
474 |
} |
} |
475 |
|
|
476 |
if ( (n+1)%2==1 ) { |
if ( (n+1)%2==1 ) { |
477 |
if(n>1) tposy = tposy-(tmarg*2+thpad); |
if(n>1) tposy = tposy-(tmarg*2+thpad); |
478 |
tposx1 = tmarg; |
tposx1 = tmarg; |
479 |
tposx0 = tposx1 + twrel; |
tposx0 = tposx1 + twrel; |
480 |
} |
} |
481 |
else { |
else { |
482 |
tposx1 = tposx0 + 2*tmarg; |
tposx1 = tposx0 + 2*tmarg; |
483 |
tposx0 = tposx1 + twrel; |
tposx0 = tposx1 + twrel; |
484 |
} |
} |
485 |
|
|
486 |
|
|
487 |
/* -----------> pad for histograms */ |
/* -----------> pad for histograms */ |
488 |
pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
489 |
pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
490 |
pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
491 |
pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
492 |
pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); |
493 |
if(n<5) pad6[n] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
if(n<5) pad6[n] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
494 |
|
|
495 |
|
|
496 |
/* -----------> HISTOGRAMS */ |
/* -----------> HISTOGRAMS */ |
497 |
|
|
498 |
oss1<<"DSP "<<n+1; |
oss1<<"DSP "<<n*100+ii; |
499 |
oss2<<"DSPh "<<n+1; |
oss2<<"DSPh "<<n*100+ii; |
500 |
oss3<<"DSP h "<<n+1; |
oss3<<"DSP h "<<n*100+ii; |
501 |
oss4<<"DSP h"<<n+1; |
oss4<<"DSP h"<<n*100+ii; |
502 |
|
|
503 |
landau1[n]=new TH1F(oss1.str().c_str(),oss1.str().c_str(),1200,0.5,1200.5); |
landau1[n][ii]=new TH1F(oss1.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
504 |
landau1[n]->GetXaxis()->SetTitle("max signal"); |
landau1[n][ii]->GetXaxis()->SetTitle("max signal"); |
505 |
landau1[n]->GetXaxis()->CenterTitle(); |
landau1[n][ii]->GetXaxis()->CenterTitle(); |
506 |
landau2[n]=new TH1F(oss2.str().c_str(),oss1.str().c_str(),1200,0.5,1200.5); |
landau2[n][ii]=new TH1F(oss2.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
507 |
landau2[n]->GetXaxis()->SetTitle("max signal"); |
landau2[n][ii]->GetXaxis()->SetTitle("max signal"); |
508 |
landau2[n]->GetXaxis()->CenterTitle(); |
landau2[n][ii]->GetXaxis()->CenterTitle(); |
509 |
landau3[n]=new TH1F(oss3.str().c_str(),oss1.str().c_str(),1200,0.5,1200.5); |
landau3[n][ii]=new TH1F(oss3.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
510 |
landau3[n]->GetXaxis()->SetTitle("max signal"); |
landau3[n][ii]->GetXaxis()->SetTitle("max signal"); |
511 |
landau3[n]->GetXaxis()->CenterTitle(); |
landau3[n][ii]->GetXaxis()->CenterTitle(); |
512 |
|
|
513 |
illuminazione[n]=new TH1F(oss4.str().c_str(),oss1.str().c_str(),3072,0.5,3072.5); |
illuminazione[n][ii]=new TH1F(oss4.str().c_str(),oss1.str().c_str(),3073,-0.5,3072.5); |
514 |
illuminazione[n]->GetXaxis()->SetTitle("strip with max signal"); |
illuminazione[n][ii]->GetXaxis()->SetTitle("strip with max signal"); |
515 |
illuminazione[n]->GetXaxis()->CenterTitle(); |
illuminazione[n][ii]->GetXaxis()->CenterTitle(); |
516 |
|
|
517 |
oss1.str(""); |
oss1.str(""); |
518 |
oss2.str(""); |
oss2.str(""); |
519 |
oss3.str(""); |
oss3.str(""); |
520 |
oss4.str(""); |
oss4.str(""); |
521 |
}; |
}; |
522 |
|
|
523 |
|
|
524 |
//********************************************************************************** |
// printf("\nprova0\n"); |
|
// Fill Graphs and Histos |
|
|
//********************************************************************************** |
|
525 |
|
|
526 |
for (Int_t i=0; i<12 ; i++){ |
|
527 |
|
//********************************************************************************** |
528 |
for (Int_t ev=minevent; ev<maxevent; ev++){ |
// Fill Graphs and Histos |
529 |
yyc[(ev-minevent)]=yc[12*(ev-minevent)+i]; |
//********************************************************************************** |
530 |
landau1[i]->Fill(land[12*(ev-minevent)+i][1]); |
|
531 |
landau2[i]->Fill(land[12*(ev-minevent)+i][2]); |
// |
532 |
landau3[i]->Fill(land[12*(ev-minevent)+i][3]); |
// information about the tracker data |
533 |
for(Int_t j=0;j<3;j++){ |
Int_t warning_dspnumber=0; |
534 |
hi=(j*1024)+illum[12*(ev-minevent)+i][j]; |
Float_t x[30000]; |
535 |
illuminazione[i]->Fill(hi); |
Float_t yc[30000][12]; |
536 |
|
Float_t eventint[30000]; |
537 |
|
|
538 |
|
for (Int_t ev=minev; ev<maxevent; ev++){ |
539 |
|
tr->GetEntry(ev); |
540 |
|
ph = eh->GetPscuHeader(); |
541 |
|
|
542 |
|
if(ev==maxevent-1) maxev=maxevent-1; |
543 |
|
|
544 |
|
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==30000){ |
545 |
|
maxev=ev; |
546 |
|
printf("prova12 ev=%d\tev-minev=%d\n",ev,ev-minev); |
547 |
|
break; |
548 |
|
} |
549 |
|
else{ |
550 |
|
// if(ii==32)printf("\nprova1 %d\tev-minev=%d\n",ev,ev-minev); |
551 |
|
x[(ev-minev)]= ph->GetOrbitalTime(); |
552 |
|
ALARM=0; |
553 |
|
|
554 |
|
Int_t dsp=0; |
555 |
|
for(Int_t i=0; i<12; i++){ |
556 |
|
dsp=te->DSPnumber[i]-1; |
557 |
|
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
558 |
|
|
559 |
|
for(Int_t j=0;j<3;j++){ |
560 |
|
if(te->signcluster[i][j]!=0){ |
561 |
|
hi=(j*1024)+te->addrcluster[i][j]; |
562 |
|
if((hi>505 && hi<519) ||(hi>1017 && hi<1031) ||(hi>1529 && hi<1543) || (hi>2041 && hi<2055) ||(hi>2553 && hi<2567)) |
563 |
|
continue; |
564 |
|
else illuminazione[dsp][ii]->Fill(hi); |
565 |
|
|
566 |
|
if(!(dsp%2)){ |
567 |
|
landau1[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
568 |
|
landau2[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
569 |
|
landau3[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
570 |
|
} |
571 |
|
else{ |
572 |
|
landau1[dsp][ii]->Fill(te->signcluster[i][j]); |
573 |
|
landau2[dsp][ii]->Fill(te->signcluster[i][j]); |
574 |
|
landau3[dsp][ii]->Fill(te->signcluster[i][j]); |
575 |
|
} |
576 |
|
} |
577 |
|
} |
578 |
|
|
579 |
|
WARNING[i]=0; |
580 |
|
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){ |
581 |
|
ALARM = 1; //general alarm |
582 |
|
WARNING[i] = 1; // DSP warning |
583 |
|
}; |
584 |
|
|
585 |
|
if(te->alarm[i]!=0){ // hardware alarm |
586 |
|
ALARM = 1; |
587 |
|
}; |
588 |
|
|
589 |
|
//************************************************************************************** |
590 |
|
// warning for internal number |
591 |
|
//************************************************************************************** |
592 |
|
if(i<=10){ |
593 |
|
if(te->eventn[i]!=te->eventn[i+1]){ |
594 |
|
warning_dspnumber++; |
595 |
|
warning<< "==> WARNING!! Check entry "<< ev<<" (DSP "<<dsp<<")" <<endl<< |
596 |
|
"eventn["<<i<<"]= "<<te->eventn[i]<<"!= eventn["<<i+1<<"]= "<< te->eventn[i+1]<<endl; |
597 |
|
} |
598 |
|
else |
599 |
|
eventint[(ev-minev)]=te->eventn[0]; |
600 |
|
} |
601 |
|
} |
602 |
|
|
603 |
|
if(ev<=maxevent-1){ |
604 |
|
|
605 |
|
if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1){ |
606 |
|
warning_dspnumber++; |
607 |
|
warning<< "==> WARNING!! Check entry "<< ev<<endl<< |
608 |
|
" DSP event num.= "<< eventint[(ev-minev)]<< |
609 |
|
" is different from (previus+1) ="<<eventint[(ev-minev)-1]+1 <<"\n"<<endl; |
610 |
|
} |
611 |
|
} |
612 |
|
|
613 |
|
//******************************************************************************************** |
614 |
|
// file ALARM |
615 |
|
//******************************************************************************************** |
616 |
|
|
617 |
|
alarm <<endl<< "================================================="<< endl; |
618 |
|
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
619 |
|
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
620 |
|
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
621 |
|
alarm << "================================================="<< endl; |
622 |
|
|
623 |
|
if(ALARM==1) { |
624 |
|
alarm << " DSPn"; |
625 |
|
alarm << " Event"; |
626 |
|
alarm << " Words"; |
627 |
|
alarm << " crc"; |
628 |
|
alarm << " FC"; |
629 |
|
alarm << " FL1"; |
630 |
|
alarm << " FL2"; |
631 |
|
alarm << " FL3"; |
632 |
|
alarm << " FL4"; |
633 |
|
alarm << " FL5"; |
634 |
|
alarm << " FL6" << endl; |
635 |
|
|
636 |
|
for(Int_t i=0; i<12 ; i++){ |
637 |
|
alarm.width(5); alarm << te->DSPnumber[i]; |
638 |
|
alarm.width(6); alarm << te->eventn[i]; |
639 |
|
alarm.width(6); alarm << te->DATAlength[i]; |
640 |
|
alarm.width(4); alarm << te->crc[i]; |
641 |
|
alarm.width(4); alarm << te->fc[i]; |
642 |
|
alarm.width(4); alarm << te->fl1[i]; |
643 |
|
alarm.width(4); alarm << te->fl2[i]; |
644 |
|
alarm.width(4); alarm << te->fl3[i]; |
645 |
|
alarm.width(4); alarm << te->fl4[i]; |
646 |
|
alarm.width(4); alarm << te->fl5[i]; |
647 |
|
alarm.width(4); alarm << te->fl6[i]; |
648 |
|
if(te->alarm[i]!=0)alarm<<" >> ALARM "; |
649 |
|
if(WARNING[i]!=0)alarm<<" (DSP warning) "; |
650 |
|
alarm << endl; |
651 |
|
} |
652 |
|
} |
653 |
} |
} |
654 |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
655 |
|
|
656 |
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
657 |
} |
} |
658 |
|
|
659 |
|
// printf("prova2\n"); |
660 |
|
|
661 |
|
Float_t maxhist=0; |
662 |
|
TBox b; |
663 |
|
b.SetFillColor(5); |
664 |
|
|
665 |
|
for (Int_t i=0; i<12 ; i++){ |
666 |
|
Float_t yyc[maxev-minev]; |
667 |
|
for (Int_t v=0; v<maxev-minev; v++){ |
668 |
|
yyc[v]=yc[v][i]; |
669 |
|
} |
670 |
|
|
671 |
LandauCanv1->cd(); |
printf("prova3\n"); |
672 |
pad1[i]->SetFillColor(10); |
LandauCanv1[ii]->cd(); |
673 |
pad1[i]->SetFrameFillColor(10); |
pad1[i]->SetFillColor(10); |
674 |
pad1[i]->Draw(); |
pad1[i]->SetFrameFillColor(10); |
675 |
pad1[i]->cd(); |
pad1[i]->Draw(); |
676 |
landau1[i]->Draw(""); |
pad1[i]->cd(); |
677 |
LandauCanv2->cd(); |
landau1[i][ii]->Draw(""); |
678 |
pad4[i]->SetFillColor(10); |
LandauCanv2[ii]->cd(); |
679 |
pad4[i]->SetFrameFillColor(10); |
pad4[i]->SetFillColor(10); |
680 |
pad4[i]->Draw(); |
pad4[i]->SetFrameFillColor(10); |
681 |
pad4[i]->cd(); |
pad4[i]->Draw(); |
682 |
landau2[i]->Draw(""); |
pad4[i]->cd(); |
683 |
LandauCanv3->cd(); |
landau2[i][ii]->Draw(""); |
684 |
pad5[i]->SetFillColor(10); |
LandauCanv3[ii]->cd(); |
685 |
pad5[i]->SetFrameFillColor(10); |
pad5[i]->SetFillColor(10); |
686 |
pad5[i]->Draw(); |
pad5[i]->SetFrameFillColor(10); |
687 |
pad5[i]->cd(); |
pad5[i]->Draw(); |
688 |
landau3[i]->Draw(""); |
pad5[i]->cd(); |
689 |
|
landau3[i][ii]->Draw(""); |
690 |
IlluminaCanv->cd(); |
|
691 |
pad2[i]->SetFillColor(10); |
printf("prova4\n"); |
692 |
pad2[i]->SetFrameFillColor(10); |
IlluminaCanv[ii]->cd(); |
693 |
pad2[i]->Draw(); |
pad2[i]->SetFillColor(10); |
694 |
pad2[i]->cd(); |
pad2[i]->SetFrameFillColor(10); |
695 |
pad2[i]->SetLogy(); |
pad2[i]->Draw(); |
696 |
illuminazione [i]->SetStats(kFALSE); |
pad2[i]->cd(); |
697 |
illuminazione[i]->Draw(""); |
pad2[i]->SetLogy(); |
698 |
|
// illuminazione[i][ii]->SetStats(KFALSE); |
699 |
CompTimeCanv->cd(); |
if(i==1){ |
700 |
pad3[i]->SetFillColor(10); |
illuminazione[i][ii]->Draw("ah"); |
701 |
pad3[i]->SetFrameFillColor(10); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
702 |
pad3[i]->Draw(); |
b.DrawBox(2816.,0.,3060.,maxhist); |
703 |
pad3[i]->cd(); |
illuminazione[i][ii]->Draw("axis same"); |
704 |
comprtime= new TGraph(nevent,x,yyc); |
illuminazione[i][ii]->Draw("same ]["); |
705 |
oss1<<"DSP "<<i+1; |
} |
706 |
comprtime->SetTitle(oss1.str().c_str()); |
else if(i==6){ |
707 |
comprtime->GetXaxis()->SetTitle("OBT (ms)"); |
illuminazione[i][ii]->Draw("ah"); |
708 |
comprtime->GetXaxis()->CenterTitle(); |
maxhist= illuminazione[i][ii]->GetMaximum(); |
709 |
comprtime->GetYaxis()->SetTitle("compressiontime (ms)"); |
b.DrawBox(2560.,0.,2816.,maxhist); |
710 |
comprtime->GetYaxis()->CenterTitle(); |
b.DrawBox(512.,0.,768.,maxhist); |
711 |
comprtime->GetYaxis()->SetRangeUser(0,2); |
b.DrawBox(1024.,0.,1792.,maxhist); |
712 |
comprtime->Draw("ap"); |
illuminazione[i][ii]->Draw("axis same"); |
713 |
oss1.str(""); |
illuminazione[i][ii]->Draw("same]["); |
714 |
}; |
} |
715 |
|
else if(i==11){ |
716 |
|
illuminazione[i][ii]->Draw("ah"); |
717 |
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
718 |
|
b.DrawBox(768.,0.,1024.,maxhist); |
719 |
|
illuminazione[i][ii]->Draw("axis same"); |
720 |
|
illuminazione[i][ii]->Draw("same]["); |
721 |
|
} |
722 |
|
else illuminazione[i][ii]->Draw(""); |
723 |
|
|
724 |
|
printf("prova5\n"); |
725 |
|
|
726 |
|
|
727 |
|
CompTimeCanv[ii]->cd(); |
728 |
|
pad3[i]->SetFillColor(10); |
729 |
|
pad3[i]->SetFrameFillColor(10); |
730 |
|
pad3[i]->Draw(); |
731 |
|
pad3[i]->cd(); |
732 |
|
comprtime[i][ii]= new TGraph(maxev-minev,x,yyc); |
733 |
|
oss1<<"DSP "<<i+1; |
734 |
|
comprtime[i][ii]->SetTitle(oss1.str().c_str()); |
735 |
|
comprtime[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
736 |
|
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
737 |
|
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
738 |
|
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
739 |
|
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); |
740 |
|
comprtime[i][ii]->Draw("ap"); |
741 |
|
oss1.str(""); |
742 |
|
|
743 |
|
CompTimeCanv[ii]->Update(); |
744 |
|
LandauCanv1[ii]->Update(); |
745 |
|
LandauCanv2[ii]->Update(); |
746 |
|
LandauCanv3[ii]->Update(); |
747 |
|
IlluminaCanv[ii]->Update(); |
748 |
|
}; |
749 |
|
|
750 |
EventNumCanv->cd(); |
printf("prova6\n"); |
751 |
TPad *pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
EventNumCanv[ii]->cd(); |
752 |
pt1 = new TPaveText(0.004,0.004,0.986,0.996); |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
753 |
pt = new TPad("pt"," ",0.004,0.004,0.7,0.98,18,0,0); |
pt1 = new TPaveText(0.004,0.004,0.986,0.996); |
754 |
pt1->SetFillColor(10); |
pt = new TPad("pt"," ",0.004,0.004,0.7,0.98,18,0,0); |
755 |
pt1->ReadFile(out + "warning.txt"); |
pt1->SetFillColor(10); |
756 |
pt1->SetTextAlign(22); |
pt1->ReadFile(out + "warning.txt"); |
757 |
pt1->SetTextSize(0.035); |
pt1->SetTextAlign(22); |
758 |
pt0->SetFillColor(10); |
pt1->SetTextSize(0.035); |
759 |
pt0->SetFrameFillColor(10); |
pt0->SetFillColor(10); |
760 |
pt0->Draw(); |
pt0->SetFrameFillColor(10); |
761 |
pt0->cd(); |
pt0->Draw(); |
762 |
pt1->Draw(); |
pt0->cd(); |
763 |
EventNumCanv->cd(); |
pt1->Draw(); |
764 |
pt->SetFillColor(10); |
EventNumCanv[ii]->cd(); |
765 |
pt->SetFrameFillColor(10); |
pt->SetFillColor(10); |
766 |
pt->Draw(); |
pt->SetFrameFillColor(10); |
767 |
pt->cd(); |
pt->Draw(); |
768 |
eventnumb=new TGraph(nevent,x,eventint); |
pt->cd(); |
769 |
eventnumb->SetTitle(""); |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
770 |
eventnumb->GetXaxis()->SetLabelSize(0.04); |
eventnumb[ii]->SetTitle(""); |
771 |
eventnumb->GetXaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.04); |
772 |
eventnumb->GetXaxis()->SetTitle("OBT (ms)"); |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.04); |
773 |
eventnumb->GetXaxis()->CenterTitle(); |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
774 |
eventnumb->GetXaxis()->SetTickLength(0.01); |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
775 |
eventnumb->GetXaxis()->SetTitleOffset(1.2); |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
776 |
eventnumb->GetYaxis()->SetLabelSize(0.04); |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.2); |
777 |
eventnumb->GetYaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.04); |
778 |
eventnumb->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.04); |
779 |
eventnumb->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
780 |
eventnumb->GetYaxis()->SetTitleOffset(1.5); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
781 |
eventnumb->SetMarkerStyle(21); |
eventnumb[ii]->GetYaxis()->SetTitleOffset(1.5); |
782 |
eventnumb->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerStyle(21); |
783 |
eventnumb->SetMarkerSize(0.3); |
eventnumb[ii]->SetMarkerColor(kBlue); |
784 |
eventnumb->Draw("ap"); |
eventnumb[ii]->SetMarkerSize(0.3); |
785 |
|
eventnumb[ii]->Draw("ap"); |
786 |
for(Int_t i=0; i<5; i++){ |
EventNumCanv[ii]->Update(); |
787 |
for (Int_t ev=0; ev<tsize; ev++){ |
|
788 |
tempt_tmp[ev]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
printf("prova7\n"); |
789 |
|
|
790 |
|
obt=0; |
791 |
|
for(Int_t i=0; i<5; i++){ |
792 |
|
Int_t v=0; |
793 |
|
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
794 |
|
tree->GetEntry(ev); |
795 |
|
ph=eT->GetPscuHeader(); |
796 |
|
|
797 |
|
if(ph->GetOrbitalTime()<obt && ev>countTEMP){ |
798 |
|
countTEMP=ev; |
799 |
|
break; |
800 |
|
} |
801 |
|
else{ |
802 |
|
obt=ph->GetOrbitalTime(); |
803 |
|
tempt_tmp[v++]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
804 |
|
} |
805 |
|
} |
806 |
|
TempCanv[ii]->cd(); |
807 |
|
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
808 |
|
pad6[i]->SetFillColor(10); |
809 |
|
pad6[i]->Draw(); |
810 |
|
pad6[i]->cd(); |
811 |
|
temp[i][ii]= new TGraph(v,xt,tempt_tmp); |
812 |
|
temp[i][ii]->SetTitle(tit.str().c_str()); |
813 |
|
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
814 |
|
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
815 |
|
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
816 |
|
temp[i][ii]->GetXaxis()->CenterTitle(); |
817 |
|
temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
818 |
|
temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
819 |
|
temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
820 |
|
temp[i][ii]->GetYaxis()->SetLabelSize(0.04); |
821 |
|
temp[i][ii]->GetYaxis()->SetTitleSize(0.04); |
822 |
|
temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
823 |
|
temp[i][ii]->GetYaxis()->CenterTitle(); |
824 |
|
temp[i][ii]->SetMarkerStyle(21); |
825 |
|
temp[i][ii]->SetMarkerSize(0.2); |
826 |
|
temp[i][ii]->Draw("ap"); |
827 |
|
tit.str(""); |
828 |
|
TempCanv[ii]->Update(); |
829 |
} |
} |
830 |
TempCanv->cd(); |
|
831 |
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
printf("prova8\n"); |
832 |
pad6[i]->SetFillColor(10); |
minev=maxev; |
833 |
pad6[i]->Draw(); |
printf("\ncountrun=%d\n",ii); |
834 |
pad6[i]->cd(); |
if(maxev==maxevent-1) { |
835 |
temp[i]= new TGraph(tsize,xt,tempt_tmp); |
countrun=ii+1; |
836 |
temp[i]->SetTitle(tit.str().c_str()); |
break; |
837 |
temp[i]->GetXaxis()->SetLabelSize(0.04); |
} |
838 |
temp[i]->GetXaxis()->SetTitleSize(0.04); |
|
839 |
temp[i]->GetXaxis()->SetTitle("OBT (ms)"); |
warning.close(); |
840 |
temp[i]->GetXaxis()->CenterTitle(); |
|
841 |
temp[i]->GetXaxis()->SetTitleOffset(0.85); |
} |
842 |
temp[i]->GetYaxis()->SetTitleOffset(1.2); |
|
843 |
temp[i]->GetYaxis()->SetLabelOffset(0.001); |
//***************************************** |
844 |
temp[i]->GetYaxis()->SetLabelSize(0.04); |
//close all files |
845 |
temp[i]->GetYaxis()->SetTitleSize(0.04); |
//***************************************** |
846 |
temp[i]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
alarm.close(); |
847 |
temp[i]->GetYaxis()->CenterTitle(); |
datafile->Close(); |
848 |
temp[i]->SetMarkerStyle(21); |
|
|
temp[i]->SetMarkerSize(0.2); |
|
|
temp[i]->Draw("ap"); |
|
|
tit.str(""); |
|
|
} |
|
|
CompTimeCanv->Update(); |
|
|
LandauCanv1->Update(); |
|
|
LandauCanv2->Update(); |
|
|
LandauCanv3->Update(); |
|
|
IlluminaCanv->Update(); |
|
|
TempCanv->Update(); |
|
|
|
|
849 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
850 |
//************************************************************************* |
//************************************************************************* |
851 |
// Save output Files |
// Save output Files |
852 |
//************************************************************************* |
//************************************************************************* |
853 |
stringstream out1,out2,out3,command; |
stringstream out1,out2,out3,command; |
854 |
|
|
855 |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
for(Int_t fl=0;fl<countrun;fl++){ |
856 |
out1.str(""); |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
857 |
out2.str(""); |
out1.str(""); |
858 |
out3.str(""); |
out2.str(""); |
859 |
|
out3.str(""); |
860 |
out1<<ffile<<"_FTrkQLook_EXPERT.ps("; |
|
861 |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
out1<<ffile<<"_FTrkQLook_EXPERT.ps("; |
862 |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
863 |
|
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
|
CompTimeCanv->Print(out+out1.str().c_str(),"Portrait"); |
|
|
EventNumCanv->Print(out+out2.str().c_str(),"Portrait"); |
|
|
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
|
|
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
|
|
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
|
|
IlluminaCanv->Print(out+out2.str().c_str(),"Portrait"); |
|
|
TempCanv->Print(out+out3.str().c_str(),"Portrait"); |
|
864 |
|
|
865 |
if(!strcmp(outfile.Data(),"pdf")){ |
if(countrun==1){ |
866 |
stringstream com; |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
867 |
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
868 |
system(com.str().c_str()); |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
869 |
printf("\n---> ps file converted in pdf format!\n"); |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
870 |
com.str(""); |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
871 |
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
872 |
system(com.str().c_str()); |
TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
873 |
printf("---> ps file removed!\n\n"); |
} |
874 |
com.str(""); |
else if(countrun>=1){ |
875 |
|
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
876 |
|
else CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
877 |
|
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
878 |
|
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
879 |
|
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
880 |
|
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
881 |
|
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
882 |
|
if(fl!=countrun-1) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
883 |
|
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
884 |
|
} |
885 |
|
|
886 |
|
if(!strcmp(outfile.Data(),"pdf")){ |
887 |
|
stringstream com; |
888 |
|
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
889 |
|
system(com.str().c_str()); |
890 |
|
printf("\n---> ps file converted in pdf format!\n"); |
891 |
|
com.str(""); |
892 |
|
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
893 |
|
system(com.str().c_str()); |
894 |
|
printf("---> ps file removed!\n\n"); |
895 |
|
com.str(""); |
896 |
|
} |
897 |
|
} |
898 |
|
else{ |
899 |
|
out1.str(""); |
900 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
901 |
|
CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
902 |
|
out1.str(""); |
903 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
904 |
|
TempCanv[fl]->Print(out+out1.str().c_str()); |
905 |
|
out1.str(""); |
906 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
907 |
|
EventNumCanv[fl]->Print(out+out1.str().c_str()); |
908 |
|
out1.str(""); |
909 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1-pag"<<fl+1<<"."<<outfile.Data(); |
910 |
|
LandauCanv1[fl]->Print(out+out1.str().c_str()); |
911 |
|
out1.str(""); |
912 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2-pag"<<fl+1<<"."<<outfile.Data(); |
913 |
|
LandauCanv2[fl]->Print(out+out1.str().c_str()); |
914 |
|
out1.str(""); |
915 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3-pag"<<fl+1<<"."<<outfile.Data(); |
916 |
|
LandauCanv3[fl]->Print(out+out1.str().c_str()); |
917 |
|
out1.str(""); |
918 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
919 |
|
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
920 |
} |
} |
921 |
} |
} |
|
else{ |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime."<<outfile.Data(); |
|
|
CompTimeCanv->Print(out+out1.str().c_str()); |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-Temp."<<outfile.Data(); |
|
|
TempCanv->Print(out+out1.str().c_str()); |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum."<<outfile.Data(); |
|
|
EventNumCanv->Print(out+out1.str().c_str()); |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1."<<outfile.Data(); |
|
|
LandauCanv1->Print(out+out1.str().c_str()); |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2."<<outfile.Data(); |
|
|
LandauCanv2->Print(out+out1.str().c_str()); |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3."<<outfile.Data(); |
|
|
LandauCanv3->Print(out+out1.str().c_str()); |
|
|
out1.str(""); |
|
|
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting."<<outfile.Data(); |
|
|
IlluminaCanv->Print(out+out1.str().c_str()); |
|
|
} |
|
|
|
|
922 |
command.str(""); |
command.str(""); |
923 |
command<<"rm -f "<<out<<"warning.txt"; |
command<<"rm -f "<<out<<"warning.txt"; |
924 |
system(command.str().c_str()); |
system(command.str().c_str()); |
925 |
|
|
926 |
gROOT->Reset(); |
gROOT->Reset(); |
927 |
return; |
return; |
928 |
} |
} |