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