1 |
/** |
/** |
2 |
* FTrkQLook_EXPERT |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version 2.0 |
* version v1r14 |
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 |
// |
// |
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 <tsbb/TsbBRecord.h> |
34 |
|
#include <tsbb/TsbBEvent.h> |
35 |
|
#include <EventCounter.h> |
36 |
|
#include <PacketType.h> |
37 |
// |
// |
38 |
|
#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); |
|
|
}; |
|
|
}; |
|
|
|
|
39 |
|
|
40 |
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) |
41 |
{ |
{ |
42 |
// |
// |
43 |
// obtain information about the data file and select the output dir |
// obtain information about the data file and select the output dir |
44 |
const string filepath=file.Data(); |
Int_t dwpos = file.Last('/'); |
45 |
Int_t dwpos = filepath.rfind("/"); |
Int_t dwpos1 = file.Last('.'); |
|
Int_t dwpos1 = filepath.find(".root"); |
|
|
TString fpath=(filepath.c_str()); |
|
46 |
TString base,ffile ; |
TString base,ffile ; |
47 |
stringcopy(ffile,fpath,dwpos+1,dwpos1); |
ffile=file(dwpos+1,dwpos1-(dwpos+1)); |
48 |
stringcopy(base,fpath,0,dwpos); |
if(dwpos>0) base=file(0,dwpos); |
|
if(dwpos>0) base+="/"; |
|
49 |
|
|
50 |
TString out; |
TString out; |
51 |
if(outdir.Length()==0){ |
if(outdir.Length()==0){ |
53 |
}else{ |
}else{ |
54 |
out = outdir; |
out = outdir; |
55 |
} |
} |
56 |
|
if(out.Last('/')+1<out.Length()) out+="/"; |
57 |
|
|
58 |
// |
// |
59 |
// inizialise the variables and open the file |
// inizialise the variables and open the file |
60 |
pamela::TsbTEvent *event = 0; |
pamela::TsbTEvent *event = 0; |
61 |
pamela::TsbTRecord *record = 0; |
pamela::TsbTRecord *record = 0; |
62 |
|
pamela::TsbBEvent *Bevent = 0; |
63 |
|
pamela::TsbBRecord *Brecord = 0; |
64 |
pamela::tracker::TrackerEvent *te=0; |
pamela::tracker::TrackerEvent *te=0; |
65 |
pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0; |
pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0,*eB=0; |
66 |
pamela::PscuHeader *ph=0,*pH=0; |
pamela::PscuHeader *ph=0,*pH=0; |
67 |
pamela::TrkAlarmEvent *al=0; |
pamela::TrkAlarmEvent *al=0; |
68 |
pamela::RunHeaderEvent *reh=0; |
pamela::RunHeaderEvent *reh=0; |
69 |
|
pamela::EventCounter *cod=0; |
70 |
|
|
71 |
|
pamela::PacketType *pctp=0; |
72 |
|
|
73 |
TFile *datafile = new TFile(file); |
TFile *datafile = new TFile(file); |
74 |
|
if ( !datafile ){ |
75 |
|
printf("No data file, exiting...\n"); |
76 |
|
return; |
77 |
|
} |
78 |
|
|
79 |
TTree *tree = (TTree*)datafile->Get("TsbT"); |
TTree *tree = (TTree*)datafile->Get("TsbT"); |
80 |
tree->SetBranchAddress("TsbT",&event); |
tree->SetBranchAddress("TsbT",&event); |
81 |
tree->SetBranchAddress("Header",&eT); |
tree->SetBranchAddress("Header",&eT); |
82 |
|
|
83 |
|
TTree *Btree = (TTree*)datafile->Get("TsbB"); |
84 |
|
Btree->SetBranchAddress("TsbB",&Bevent); |
85 |
|
Btree->SetBranchAddress("Header",&eB); |
86 |
|
|
87 |
TTree *altr = (TTree*)datafile->Get("TrkAlarm"); |
TTree *altr = (TTree*)datafile->Get("TrkAlarm"); |
88 |
altr->SetBranchAddress("TrkAlarm",&al); |
altr->SetBranchAddress("TrkAlarm",&al); |
89 |
altr->SetBranchAddress("Header",&aleh); |
altr->SetBranchAddress("Header",&aleh); |
99 |
Long64_t nevent = tr->GetEntries(); |
Long64_t nevent = tr->GetEntries(); |
100 |
Long64_t neventH = otr->GetEntries(); |
Long64_t neventH = otr->GetEntries(); |
101 |
Long64_t tnevent = tree->GetEntries(); |
Long64_t tnevent = tree->GetEntries(); |
102 |
|
Long64_t bnevent = Btree->GetEntries(); |
103 |
Long64_t alnevent = altr->GetEntries(); |
Long64_t alnevent = altr->GetEntries(); |
104 |
Int_t minevent=0; |
Int_t minevent=0; |
105 |
Int_t maxevent=0; |
Int_t maxevent=0; |
107 |
printf("Number of total events: %lld\n",nevent); |
printf("Number of total events: %lld\n",nevent); |
108 |
printf("Number of header events: %lld\n",neventH); |
printf("Number of header events: %lld\n",neventH); |
109 |
printf("Number of TsbT events: %lld\n",tnevent); |
printf("Number of TsbT events: %lld\n",tnevent); |
110 |
|
printf("Number of TsbB events: %lld\n",bnevent); |
111 |
printf("Number of TrkAlarm packet events: %lld\n",alnevent); |
printf("Number of TrkAlarm packet events: %lld\n",alnevent); |
112 |
|
|
113 |
if (nevent<=0){ |
if (nevent<=0){ |
136 |
} else if (toevent > nevent) { |
} else if (toevent > nevent) { |
137 |
maxevent = nevent; |
maxevent = nevent; |
138 |
} else { |
} else { |
139 |
maxevent = toevent+1; |
maxevent = nevent; |
140 |
} |
} |
141 |
nevent=maxevent-minevent ; |
nevent=maxevent-minevent ; |
142 |
} |
} |
143 |
|
|
144 |
Long64_t obt=0; |
// |
145 |
const Int_t sizeH=neventH; |
// information about the RunHeader |
146 |
ULong64_t HOBT[sizeH]; |
ULong64_t HOBT[neventH]; |
147 |
Int_t trk_cal_us[sizeH],countrun=1; |
Int_t trk_cal_us[neventH]; |
148 |
for (Int_t vi=0; vi<sizeH;vi++){ |
ULong_t acq_info[neventH]; |
149 |
|
Int_t countnboot=1; |
150 |
|
for (Int_t vi=0; vi<neventH;vi++){ |
151 |
HOBT[vi]=0; |
HOBT[vi]=0; |
152 |
trk_cal_us[vi]=0; |
trk_cal_us[vi]=0; |
153 |
|
acq_info[vi]=0; |
154 |
} |
} |
155 |
for (Int_t ev=0; ev<neventH; ev++){ |
for (Int_t ev=0; ev<neventH; ev++){ |
156 |
otr->GetEntry(ev); |
otr->GetEntry(ev); |
157 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
158 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
159 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
160 |
|
acq_info[ev]=reh->ACQ_BUILD_INFO; |
161 |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
162 |
countrun+=1; |
countnboot+=1; |
|
// printf("\n%lld\t\tcountrun=%d\n",HOBT[ev],countrun); |
|
163 |
} |
} |
164 |
countrun+=(Int_t)nevent/30000; |
countnboot+=(Int_t)(2*nevent/MAXSTORAGE); |
165 |
printf("\ncountrun=%d\n",countrun); |
// printf("\ncountnboot=%d\n",countnboot); |
166 |
|
|
167 |
// |
// |
168 |
// other variables definitions |
// other variables definitions |
169 |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
170 |
Int_t ALARM=0; |
Int_t ALARM=0; |
171 |
Int_t WARNING[12]; |
Int_t WARNING[12]; |
|
Float_t hi=0; |
|
172 |
|
|
173 |
// |
// |
174 |
// information about the entries for the temperatures |
// information about the entries for the temperatures |
179 |
maxsize+=tmpSize; |
maxsize+=tmpSize; |
180 |
} |
} |
181 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
182 |
Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; |
Int_t tempt[tsize][5]; |
183 |
|
ULong64_t xt[tsize]; |
184 |
|
|
185 |
|
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
186 |
// |
// |
187 |
// information about the temperatures |
// information about the temperatures |
188 |
for (Int_t ev=0; ev<tnevent; ev++){ |
for (Int_t ev=0; ev<tnevent; ev++){ |
190 |
tmpSize = event->Records->GetEntries(); |
tmpSize = event->Records->GetEntries(); |
191 |
for (Int_t j = 0; j < tmpSize; j++){ |
for (Int_t j = 0; j < tmpSize; j++){ |
192 |
record = (pamela::TsbTRecord*)event->Records->At(j); |
record = (pamela::TsbTRecord*)event->Records->At(j); |
193 |
xt[siztmp]=record->RECORD_OBT; //0.051*record->RECORD_OBT; |
xt[siztmp]=record->RECORD_OBT; |
194 |
|
if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) |
195 |
|
cntpgtemp+=1; |
196 |
|
|
197 |
for (Int_t z = 0; z < 5; z++){ |
for (Int_t z = 0; z < 5; z++){ |
198 |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
199 |
} |
} |
202 |
} |
} |
203 |
|
|
204 |
// |
// |
205 |
|
// information about the entries for the magnetic field |
206 |
|
if(bnevent>0) cntpgmag=1; |
207 |
|
maxsize=0; |
208 |
|
for (Int_t ev=0; ev<bnevent; ev++){ |
209 |
|
Btree->GetEntry(ev); |
210 |
|
tmpSize = Bevent->Records->GetEntries(); |
211 |
|
maxsize+=tmpSize; |
212 |
|
} |
213 |
|
const Int_t bsize=maxsize; |
214 |
|
Int_t magt[bsize][5]; |
215 |
|
ULong64_t xb[bsize]; |
216 |
|
siztmp=0; |
217 |
|
// |
218 |
|
// information about the magnetic field |
219 |
|
for (Int_t ev=0; ev<bnevent; ev++){ |
220 |
|
Btree->GetEntry(ev); |
221 |
|
tmpSize = Bevent->Records->GetEntries(); |
222 |
|
for (Int_t j = 0; j < tmpSize; j++){ |
223 |
|
Brecord = (pamela::TsbBRecord*)Bevent->Records->At(j); |
224 |
|
xb[siztmp]=Brecord->RECORD_OBT; |
225 |
|
if((xb[siztmp]<xb[siztmp-1]) && siztmp>0) |
226 |
|
cntpgmag+=1; |
227 |
|
for (Int_t z = 0; z < 5; z++){ |
228 |
|
magt[siztmp][z] = Brecord->B_FIELD[z+1]; |
229 |
|
} |
230 |
|
siztmp++; |
231 |
|
} |
232 |
|
} |
233 |
|
|
234 |
|
// |
235 |
// open the output text files for the alarms |
// open the output text files for the alarms |
236 |
TString fname1 = out+ffile; |
TString fname1 = out+ffile; |
237 |
TString fname = out+ffile; |
TString fname = out+ffile; |
249 |
// write the file for the TrkAlarm packet |
// write the file for the TrkAlarm packet |
250 |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
251 |
else{ |
else{ |
252 |
|
Long64_t obt=0; |
253 |
for (Int_t ev=0; ev<alnevent; ev++){ |
for (Int_t ev=0; ev<alnevent; ev++){ |
254 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
255 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
265 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
266 |
|
|
267 |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
268 |
alarm1 << " ALARM[1]= "<< hex<< (Int_t)al->ALARM[1]<<dec<<endl; |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[0]<<endl; |
269 |
alarm1 << " ALARM[2]= "<< hex<< (Int_t)al->ALARM[2]<<dec<<endl; |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[1]<<endl; |
270 |
alarm1 << " CmdDuringTrig= "<< hex<<(Int_t)al->CmdDuringTrig<<endl; |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
271 |
alarm1 << " FinalCheck= "<< hex<<(Int_t)al->FinalCheck<<endl; |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
272 |
alarm1 << " FlashData= "<< hex<<(Int_t)al->FlashData<<endl; |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
273 |
alarm1 << " FlashShutdown= "<< hex<<(Int_t)al->FlashShutdown<<endl; |
alarm1 << " FlashShutdown= 0x"<< (Int_t)al->FlashShutdown<<endl; |
274 |
alarm1 << " FlashUpset= "<< hex<<(Int_t)al->FlashUpset<<endl; |
alarm1 << " FlashUpset= 0x"<< (Int_t)al->FlashUpset<<endl; |
275 |
alarm1 << " InterCheck= "<< hex<<(Int_t)al->InterCheck<<endl; |
alarm1 << " InterCheck= 0x"<< (Int_t)al->InterCheck<<endl; |
276 |
alarm1 << " UnknownCmd= "<< hex<<(Int_t)al->UnknownCmd<<endl<<endl; |
alarm1 << " UnknownCmd= 0x"<<(Int_t)al->UnknownCmd<<endl<<endl; |
277 |
|
|
278 |
alarm1 << "Alarm variables (range 0-3F)"<<endl; |
alarm1 << "Alarm variables (range 0-3F)"<<endl; |
279 |
alarm1 << " CmdIDMA= "<< hex<<(Int_t)al->CmdIDMA<<endl; |
alarm1 << " CmdIDMA= 0x"<< (Int_t)al->CmdIDMA<<endl; |
280 |
alarm1 << " DSPSoft= "<< hex<<(Int_t)al->DSPSoft<<endl; |
alarm1 << " DSPSoft= 0x"<< (Int_t)al->DSPSoft<<endl; |
281 |
alarm1 << " TrigIDMA= "<< hex<<(Int_t)al->TrigIDMA<<endl<<endl; |
alarm1 << " TrigIDMA= 0x"<< (Int_t)al->TrigIDMA<<endl<<endl; |
282 |
|
|
283 |
alarm1 << "Alarm bits (range 0-1)"<<endl; |
alarm1 << "Control variables (range 0-3F)"<<endl; |
284 |
alarm1 << " Aswr= "<< hex<<(Int_t)al->Aswr<<endl; |
alarm1 << " DSPBusy= 0x"<< (Int_t)al->DSPBusy<<endl; |
285 |
alarm1 << " BID[1]= "<< hex<<(Int_t)al->BID[0]<<endl; |
alarm1 << " DSPMask= 0x"<< (Int_t)al->DSPMask<<endl<<endl; |
286 |
alarm1 << " BID[2]= "<< hex<<(Int_t)al->BID[1]<<endl; |
|
287 |
alarm1 << " BID[3]= "<< hex<<(Int_t)al->BID[2]<<endl; |
alarm1 << "Control variables (range 0-1)"<<endl; |
288 |
alarm1 << " BID[4]= "<< hex<<(Int_t)al->BID[3]<<endl; |
alarm1 << " FlashOn= 0x"<< (Int_t)al->FlashOn<<endl<<endl; |
289 |
alarm1 << " BID[5]= "<< hex<<(Int_t)al->BID[4]<<endl; |
|
290 |
alarm1 << " BID[6]= "<< hex<<(Int_t)al->BID[5]<<endl; |
alarm1 << "Control variables (range 0-3)"<<endl; |
291 |
alarm1 << " BID[7]= "<< hex<<(Int_t)al->BID[6]<<endl; |
alarm1 << " TrigMask= 0x"<< (Int_t)al->TrigMask<<endl<<endl; |
292 |
alarm1 << " CmdNum= "<< hex<<(Int_t)al->CmdNum<<endl; |
|
293 |
alarm1 << " DSPBusy= "<< hex<<(Int_t)al->DSPBusy<<endl; |
alarm1 << "Control bits fixed"<<endl; |
294 |
alarm1 << " DSPMask= "<< hex<<(Int_t)al->DSPMask<<endl; |
alarm1 << " Aswr= 0x"<< (Int_t)al->Aswr<<endl; |
295 |
alarm1 << " FlashOn= "<< hex<<(Int_t)al->FlashOn<<endl; |
alarm1 << " BID[1]= 0x"<< (Int_t)al->BID[0]<<endl; |
296 |
alarm1 << " PNum= "<< hex<<(Int_t)al->PNum<<endl; |
alarm1 << " BID[2]= 0x"<< (Int_t)al->BID[1]<<endl; |
297 |
alarm1 << " TrigMask= "<< hex<<(Int_t)al->TrigMask<<endl; |
alarm1 << " BID[3]= 0x"<< (Int_t)al->BID[2]<<endl; |
298 |
|
alarm1 << " BID[4]= 0x"<< (Int_t)al->BID[3]<<endl; |
299 |
|
alarm1 << " BID[5]= 0x"<< (Int_t)al->BID[4]<<endl; |
300 |
|
alarm1 << " BID[6]= 0x"<< (Int_t)al->BID[5]<<endl; |
301 |
|
alarm1 << " BID[7]= 0x"<< (Int_t)al->BID[6]<<endl; |
302 |
|
alarm1 << " CmdNum= 0x"<< (Int_t)al->CmdNum<<endl; |
303 |
|
alarm1 << " PNum= 0x"<< (Int_t)al->PNum<< dec <<endl; |
304 |
|
|
305 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
306 |
|
|
307 |
} |
} |
308 |
} |
} |
309 |
|
|
310 |
|
// |
311 |
|
// Set Style options |
312 |
gStyle->SetLabelSize(0.05,"x"); |
gStyle->SetLabelSize(0.05,"x"); |
313 |
gStyle->SetLabelSize(0.06,"y"); |
gStyle->SetLabelSize(0.06,"y"); |
314 |
gStyle->SetStatFontSize(0.075); |
gStyle->SetStatFontSize(0.075); |
315 |
gStyle->SetOptStat(1110); |
gStyle->SetOptStat(1110); |
316 |
gStyle->SetFillColor(10); |
gStyle->SetFillColor(10); |
317 |
|
gStyle->SetStatColor(10); |
318 |
gStyle->SetTitleFillColor(10); |
gStyle->SetTitleFillColor(10); |
319 |
gStyle->SetTitleFontSize(0.1); |
gStyle->SetTitleFontSize(0.1); |
320 |
gStyle->SetTitleOffset(0.8,"y"); |
gStyle->SetTitleOffset(0.8,"y"); |
322 |
gStyle->SetTitleSize(0.06,"y"); |
gStyle->SetTitleSize(0.06,"y"); |
323 |
gStyle->SetTitleSize(0.055,"x"); |
gStyle->SetTitleSize(0.055,"x"); |
324 |
|
|
325 |
|
// |
326 |
|
// Define output canvas, histos and graphs |
327 |
|
TCanvas *CompTimeCanv[countnboot],*EventNumCanv[countnboot],*TempCanv[cntpgtemp],*BfieldCanv[cntpgmag]; |
328 |
|
TCanvas *IlluminaCanv,*LandauCanv1,*LandauCanv2,*LandauCanv3; |
329 |
|
|
330 |
|
TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; |
331 |
|
TGraph *comprtime[12][countnboot],*temp[5][cntpgtemp],*tempw[5][cntpgtemp],*eventnumb[countnboot],*mag[5][cntpgmag]; |
332 |
|
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5],*pad7[5]; |
333 |
|
|
334 |
|
for(Int_t n = 0; n<12; n++) { |
335 |
|
|
336 |
|
/* -----------> HISTOGRAMS */ |
337 |
|
|
338 |
|
tit<<"DSP "<<n+1; |
339 |
|
oss1<<"DSP "<<n+1; |
340 |
|
oss2<<"DSPh "<<n+1; |
341 |
|
oss3<<"DSP h "<<n+1; |
342 |
|
oss4<<"DSP h"<<n+1; |
343 |
|
|
344 |
|
landau1[n]= new TH1F(oss1.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
345 |
|
landau2[n]= new TH1F(oss2.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
346 |
|
landau3[n]= new TH1F(oss3.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
347 |
|
|
348 |
|
illuminazione[n]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); |
349 |
|
|
350 |
|
tit.str(""); |
351 |
|
oss1.str(""); |
352 |
|
oss2.str(""); |
353 |
|
oss3.str(""); |
354 |
|
oss4.str(""); |
355 |
|
}; |
356 |
|
|
357 |
|
|
358 |
//*************************************************************************************** |
//*************************************************************************************** |
359 |
// LOOP on each event |
// LOOP on each event |
363 |
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); |
364 |
else |
else |
365 |
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); |
|
|
|
|
|
|
|
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
|
|
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
|
|
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
|
|
TGraph *comprtime[12][countrun],*temp[5][countrun]; |
|
|
TGraph *eventnumb[countrun]; |
|
|
TH1F *landau1[12][countrun],*landau2[12][countrun],*landau3[12][countrun],*illuminazione[12][countrun]; |
|
|
|
|
|
for(Int_t ii=0; ii<countrun;ii++){ |
|
|
TPaveText *pt1; |
|
|
TPad *pt,*pt0; |
|
|
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
|
|
|
|
366 |
|
|
367 |
ofstream warning(out + "warning.txt",ios::out); |
TLatex *t=new TLatex(); |
368 |
|
TLatex *t1=new TLatex(); |
369 |
|
|
|
//**************************************************************************************** |
|
|
//Output figures --- First sheet: |
|
|
//**************************************************************************************** |
|
370 |
|
|
371 |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
372 |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
ULong_t countALARMx=0,countALARMy=0; |
|
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
CompTimeCanv[ii]->SetFillColor(10); |
|
|
CompTimeCanv[ii]->Range(0,0,100,100); |
|
|
TLatex *t=new TLatex(); |
|
|
t->SetTextFont(32); |
|
|
t->SetTextColor(1); |
|
|
t->SetTextAlign(12); |
|
|
t->SetTextSize(0.02); |
|
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
|
|
TLatex *t1=new TLatex(); |
|
|
t1->SetTextFont(32); |
|
|
t1->SetTextColor(1); |
|
|
t1->SetTextAlign(12); |
|
|
t1->SetTextSize(0.02); |
|
|
t1->DrawLatex(59.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
373 |
|
|
374 |
|
// |
375 |
|
// Fill temperature graphs |
376 |
|
for(Int_t ii=0; ii<cntpgtemp;ii++){ |
377 |
//**************************************************************************************** |
//**************************************************************************************** |
378 |
//Output figures --- Second sheet: |
//Temperature Output Pages |
379 |
//**************************************************************************************** |
//**************************************************************************************** |
380 |
|
fromfile.str(""); |
381 |
|
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
382 |
|
isfile<<"Temperatures vs OBT pag"<<ii+1; |
383 |
|
TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
384 |
|
TempCanv[ii]->SetFillColor(10); |
385 |
|
TempCanv[ii]->Range(0,0,100,100); |
386 |
|
|
|
isfile<<"WARNINGS on DSP EVENT NUMBER pag"<<ii+1; |
|
|
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
EventNumCanv[ii]->SetFillColor(10); |
|
|
EventNumCanv[ii]->Range(0,0,100,100); |
|
387 |
t->SetTextFont(32); |
t->SetTextFont(32); |
388 |
t->SetTextColor(1); |
t->SetTextColor(1); |
389 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
393 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
394 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
395 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
396 |
t1->DrawLatex(63.4,98.7,isfile.str().c_str()); |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
397 |
|
isfile.str(""); |
398 |
|
t1->SetTextSize(0.025); |
399 |
|
t1->SetTextColor(196); |
400 |
|
isfile<<"--> Values at 28.5^{o}C (if presents) correspond"; |
401 |
|
t1->DrawLatex(50.,22.,isfile.str().c_str()); |
402 |
isfile.str(""); |
isfile.str(""); |
403 |
|
isfile<<" to wrong readings ( > 100^{o}C) of the Tsb"; |
404 |
|
t1->DrawLatex(50.,19.,isfile.str().c_str()); |
405 |
|
isfile.str(""); |
406 |
|
isfile<<"--> Values at 25.5^{o}C (if presents) correspond"; |
407 |
|
t1->DrawLatex(50.,12.,isfile.str().c_str()); |
408 |
|
isfile.str(""); |
409 |
|
isfile<<" to wrong readings ( < 0^{o}C) of the Tsb"; |
410 |
|
t1->DrawLatex(50.,9.,isfile.str().c_str()); |
411 |
|
isfile.str(""); |
412 |
|
|
413 |
|
Float_t tposy = 0.95; // up y-coord - top pads |
414 |
|
Float_t thpad = 0; // pad height |
415 |
|
Float_t tposx1=0; // left x-coord - pad column |
416 |
|
Float_t tposx0=0; // x-coord - column division |
417 |
|
Float_t twrel = 0; // relative x size of first sub-column |
418 |
|
Float_t tmarg = 0.004; // margin among pads |
419 |
|
|
420 |
|
thpad = (tposy-tmarg*5)/3; |
421 |
|
twrel = (1-tmarg*4)/2; |
422 |
|
|
423 |
|
for(Int_t i=0; i<5; i++){ |
424 |
|
if ( (i+1)%2==1 ) { |
425 |
|
if(i>1) tposy = tposy-(tmarg*2+thpad); |
426 |
|
tposx1 = tmarg; |
427 |
|
tposx0 = tposx1 + twrel; |
428 |
|
} |
429 |
|
else { |
430 |
|
tposx1 = tposx0 + 2*tmarg; |
431 |
|
tposx0 = tposx1 + twrel; |
432 |
|
} |
433 |
|
|
434 |
|
/* -----------> pad for histograms */ |
435 |
|
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
436 |
|
|
437 |
|
Int_t v=0,vv=0; |
438 |
|
Double_t xt_tmp[tsize], tempt_tmp[tsize]; |
439 |
|
Double_t xt_tmpw[tsize], tempt_tmpw[tsize]; |
440 |
|
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
441 |
|
|
442 |
|
if(ev==tsize-1 && i==4 && ii==cntpgtemp-1) countTEMP=tsize-1; |
443 |
|
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
444 |
|
if(i==4) countTEMP=ev; |
445 |
|
break; |
446 |
|
} |
447 |
|
else{ |
448 |
|
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
449 |
|
if(tempt_tmp[v]>100) { |
450 |
|
tempt_tmp[v]=28.5; |
451 |
|
tempt_tmpw[vv]=28.5; |
452 |
|
xt_tmpw[vv++]=(Double_t)xt[ev]; |
453 |
|
} |
454 |
|
else if(tempt_tmp[v]<0){ |
455 |
|
tempt_tmp[v]=25.5; |
456 |
|
tempt_tmpw[vv]=25.5; |
457 |
|
xt_tmpw[vv++]=(Double_t)xt[ev]; |
458 |
|
} |
459 |
|
xt_tmp[v++]=(Double_t)xt[ev]; |
460 |
|
} |
461 |
|
} |
462 |
|
TempCanv[ii]->cd(); |
463 |
|
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
464 |
|
pad6[i]->SetFillColor(10); |
465 |
|
pad6[i]->Draw(); |
466 |
|
pad6[i]->cd(); |
467 |
|
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
468 |
|
temp[i][ii]->SetTitle(tit.str().c_str()); |
469 |
|
if(v==1) temp[i][ii]->GetXaxis()->SetNdivisions(502,kTRUE); |
470 |
|
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
471 |
|
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
472 |
|
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
473 |
|
temp[i][ii]->GetXaxis()->CenterTitle(); |
474 |
|
temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
475 |
|
temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
476 |
|
temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
477 |
|
temp[i][ii]->GetYaxis()->SetLabelSize(0.04); |
478 |
|
temp[i][ii]->GetYaxis()->SetTitleSize(0.04); |
479 |
|
temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
480 |
|
temp[i][ii]->GetYaxis()->CenterTitle(); |
481 |
|
temp[i][ii]->SetMarkerStyle(21); |
482 |
|
temp[i][ii]->SetMarkerSize(0.2); |
483 |
|
temp[i][ii]->Draw("ap"); |
484 |
|
tit.str(""); |
485 |
|
if(vv>0){ |
486 |
|
tempw[i][ii]= new TGraph(vv,xt_tmpw,tempt_tmpw); |
487 |
|
tempw[i][ii]->SetMarkerStyle(21); |
488 |
|
tempw[i][ii]->SetMarkerSize(0.2); |
489 |
|
tempw[i][ii]->SetMarkerColor(196); |
490 |
|
tempw[i][ii]->Draw("samep"); |
491 |
|
} |
492 |
|
TempCanv[ii]->Update(); |
493 |
|
|
494 |
|
|
495 |
|
} |
496 |
|
if(countTEMP==tsize-1 && ii==cntpgtemp-1){ |
497 |
|
break; |
498 |
|
} |
499 |
|
} |
500 |
|
|
501 |
|
// |
502 |
|
// Fill magnetic field graphs |
503 |
|
for(Int_t ii=0; ii<cntpgmag;ii++){ |
504 |
//**************************************************************************************** |
//**************************************************************************************** |
505 |
//Output figures --- Third sheet: |
//Magnetic Field Output Pages |
506 |
//**************************************************************************************** |
//**************************************************************************************** |
507 |
|
fromfile.str(""); |
508 |
isfile<<"Cluster Signal ladder1 pag"<<ii+1; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
509 |
LandauCanv1[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
isfile<<"Magnetic Axial Field vs OBT pag"<<ii+1; |
510 |
LandauCanv1[ii]->SetFillColor(10); |
BfieldCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
511 |
LandauCanv1[ii]->Range(0,0,100,100); |
BfieldCanv[ii]->SetFillColor(10); |
512 |
|
BfieldCanv[ii]->Range(0,0,100,100); |
513 |
|
|
514 |
t->SetTextFont(32); |
t->SetTextFont(32); |
515 |
t->SetTextColor(1); |
t->SetTextColor(1); |
516 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
520 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
521 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
522 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
523 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
524 |
isfile.str(""); |
isfile.str(""); |
525 |
|
|
526 |
//**************************************************************************************** |
TLine li; |
527 |
//Output figures --- Third sheet: |
li.SetLineStyle(1); |
528 |
//**************************************************************************************** |
li.SetLineWidth(1); |
529 |
|
li.SetLineColor(190); |
530 |
isfile<<"Cluster Signal ladder2 pag"<<ii+1; |
t1->SetTextColor(190); |
531 |
LandauCanv2[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
t1->SetTextSize(0.04); |
532 |
LandauCanv2[ii]->SetFillColor(10); |
|
533 |
LandauCanv2[ii]->Range(0,0,100,100); |
Float_t tposy = 0.95; // up y-coord - top pads |
534 |
|
Float_t thpad = 0; // pad height |
535 |
|
Float_t tposx1=0; // left x-coord - pad column |
536 |
|
Float_t tposx0=0; // x-coord - column division |
537 |
|
Float_t twrel = 0; // relative x size of first sub-column |
538 |
|
Float_t tmarg = 0.004; // margin among pads |
539 |
|
|
540 |
|
thpad = (tposy-tmarg*5)/3; |
541 |
|
twrel = (1-tmarg*4)/2; |
542 |
|
|
543 |
|
for(Int_t i=0; i<5; i++){ |
544 |
|
if ( (i+1)%2==1 ) { |
545 |
|
if(i>1) tposy = tposy-(tmarg*2+thpad); |
546 |
|
tposx1 = tmarg; |
547 |
|
tposx0 = tposx1 + twrel; |
548 |
|
} |
549 |
|
else { |
550 |
|
tposx1 = tposx0 + 2*tmarg; |
551 |
|
tposx0 = tposx1 + twrel; |
552 |
|
} |
553 |
|
|
554 |
|
/* -----------> pad for histograms */ |
555 |
|
pad7[i] = new TPad("pad7"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
556 |
|
|
557 |
|
Int_t v=0; |
558 |
|
Double_t xb_tmp[bsize], magt_tmp[bsize]; |
559 |
|
for (Int_t ev=countMAG; ev<bsize; ev++){ |
560 |
|
|
561 |
|
if(ev==bsize-1 && i==4 && ii==cntpgmag-1) countMAG=bsize-1; |
562 |
|
if(xb[ev]<xb[ev-1] && ev>countMAG){ |
563 |
|
if(i==4) countMAG=ev; |
564 |
|
break; |
565 |
|
} |
566 |
|
else{ |
567 |
|
magt_tmp[v]=(Double_t)magt[ev][i]; |
568 |
|
xb_tmp[v++]=(Double_t)xb[ev]; |
569 |
|
} |
570 |
|
} |
571 |
|
BfieldCanv[ii]->cd(); |
572 |
|
tit<<"B"<<i+5<<" (magnetic module "<<i+1<<")"; |
573 |
|
pad7[i]->SetFillColor(10); |
574 |
|
pad7[i]->Draw(); |
575 |
|
pad7[i]->cd(); |
576 |
|
mag[i][ii]= new TGraph(v,xb_tmp,magt_tmp); |
577 |
|
mag[i][ii]->SetTitle(tit.str().c_str()); |
578 |
|
mag[i][ii]->GetXaxis()->SetNdivisions(502,kTRUE); |
579 |
|
mag[i][ii]->GetXaxis()->SetLabelSize(0.04); |
580 |
|
mag[i][ii]->GetXaxis()->SetTitleSize(0.04); |
581 |
|
mag[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
582 |
|
mag[i][ii]->GetXaxis()->CenterTitle(); |
583 |
|
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
584 |
|
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
585 |
|
else mag[i][ii]->GetYaxis()->SetRangeUser(2060,2067); |
586 |
|
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
587 |
|
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
588 |
|
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
589 |
|
mag[i][ii]->GetYaxis()->SetTitleSize(0.04); |
590 |
|
mag[i][ii]->GetYaxis()->SetTitle("Magnetic Field (au)"); |
591 |
|
mag[i][ii]->GetYaxis()->CenterTitle(); |
592 |
|
mag[i][ii]->SetMarkerStyle(21); |
593 |
|
mag[i][ii]->SetMarkerSize(0.4); |
594 |
|
mag[i][ii]->Draw("ap"); |
595 |
|
Double_t min=0.,max=0,xlat=0.; |
596 |
|
min=mag[i][ii]->GetXaxis()->GetXmin(); |
597 |
|
max=mag[i][ii]->GetXaxis()->GetXmax(); |
598 |
|
xlat=min+(max-min)/2; |
599 |
|
stringstream mi,ma; |
600 |
|
mi<<"minimum recorded value"; |
601 |
|
ma<<"maximum recorded value"; |
602 |
|
t->SetTextSize(0.1); |
603 |
|
switch(i){ |
604 |
|
case 0: |
605 |
|
li.DrawLine(min,2054.,max,2054.); |
606 |
|
li.DrawLine(min,2048.,max,2048.); |
607 |
|
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
608 |
|
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
609 |
|
break; |
610 |
|
|
611 |
|
case 1: |
612 |
|
li.DrawLine(min,2055.,max,2055.); |
613 |
|
li.DrawLine(min,2050.,max,2050.); |
614 |
|
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
615 |
|
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
616 |
|
break; |
617 |
|
|
618 |
t->SetTextFont(32); |
case 2: |
619 |
t->SetTextColor(1); |
li.DrawLine(min,2056.,max,2056.); |
620 |
t->SetTextAlign(12); |
li.DrawLine(min,2051.,max,2051.); |
621 |
t->SetTextSize(0.02); |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
622 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
623 |
t1->SetTextFont(32); |
break; |
624 |
t1->SetTextColor(1); |
|
625 |
t1->SetTextAlign(12); |
case 3: |
626 |
t1->SetTextSize(0.02); |
li.DrawLine(min,2057.,max,2057.); |
627 |
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
li.DrawLine(min,2052.,max,2052.); |
628 |
isfile.str(""); |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
629 |
|
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
630 |
|
break; |
631 |
|
|
632 |
//**************************************************************************************** |
case 4: |
633 |
//Output figures --- Third sheet: |
li.DrawLine(min,2066.,max,2066.); |
634 |
//**************************************************************************************** |
li.DrawLine(min,2060.,max,2060.); |
635 |
|
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
636 |
|
t1->DrawLatex(xlat,2059.85,mi.str().c_str()); |
637 |
|
break; |
638 |
|
|
639 |
isfile<<"Cluster Signal ladder3 pag"<<ii+1; |
} |
640 |
LandauCanv3[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
BfieldCanv[ii]->Update(); |
641 |
LandauCanv3[ii]->SetFillColor(10); |
tit.str(""); |
642 |
LandauCanv3[ii]->Range(0,0,100,100); |
} |
643 |
|
if(countMAG==bsize-1 && ii==cntpgmag-1){ |
644 |
|
break; |
645 |
|
} |
646 |
|
} |
647 |
|
|
648 |
|
|
649 |
t->SetTextFont(32); |
// |
650 |
t->SetTextColor(1); |
// Fill compressiontime and eventnumber graphs and DSP warnings |
651 |
t->SetTextAlign(12); |
for(Int_t ii=0; ii<countnboot;ii++){ |
652 |
t->SetTextSize(0.02); |
TPad *pt; //pad for histos |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
|
|
t1->SetTextFont(32); |
|
|
t1->SetTextColor(1); |
|
|
t1->SetTextAlign(12); |
|
|
t1->SetTextSize(0.02); |
|
|
t1->DrawLatex(60.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
653 |
|
|
654 |
//**************************************************************************************** |
//**************************************************************************************** |
655 |
//Output figures --- Fourth sheet: |
//COMPRESSIONTIME vs. OBT Output Pages |
656 |
//**************************************************************************************** |
//**************************************************************************************** |
657 |
|
fromfile.str(""); |
658 |
isfile<<"lighting of the views pag"<<ii+1; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
659 |
IlluminaCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
660 |
IlluminaCanv[ii]->SetFillColor(10); |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
661 |
IlluminaCanv[ii]->Range(0,0,100,100); |
CompTimeCanv[ii]->SetFillColor(10); |
662 |
|
CompTimeCanv[ii]->Range(0,0,100,100); |
663 |
t->SetTextFont(32); |
t->SetTextFont(32); |
664 |
t->SetTextColor(1); |
t->SetTextColor(1); |
665 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
669 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
670 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
671 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
672 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
673 |
isfile.str(""); |
isfile.str(""); |
674 |
|
|
675 |
//**************************************************************************************** |
//**************************************************************************************** |
676 |
//Output figures --- Fifth sheet: |
//DSP EVENT NUMBER Output Pages |
677 |
//**************************************************************************************** |
//**************************************************************************************** |
|
|
|
|
isfile<<"Temperatures vs OBT pag"<<ii+1; |
|
|
TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
|
TempCanv[ii]->SetFillColor(10); |
|
|
TempCanv[ii]->Range(0,0,100,100); |
|
678 |
|
|
679 |
|
isfile<<"DSP EVENT NUMBER vs. OBT pag"<<ii+1; |
680 |
|
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
681 |
|
EventNumCanv[ii]->SetFillColor(10); |
682 |
|
EventNumCanv[ii]->Range(0,0,100,100); |
683 |
t->SetTextFont(32); |
t->SetTextFont(32); |
684 |
t->SetTextColor(1); |
t->SetTextColor(1); |
685 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
689 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
690 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
691 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
692 |
t1->DrawLatex(75.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
693 |
isfile.str(""); |
isfile.str(""); |
694 |
|
|
|
//************************************************************************************* |
|
|
//book pads and histos |
|
|
//*************************************************************************************** |
|
695 |
Float_t posy = 0.95; // up y-coord - top pads |
Float_t posy = 0.95; // up y-coord - top pads |
696 |
Float_t hpad = 0; // pad height |
Float_t hpad = 0; // pad height |
697 |
Float_t posx1=0; // left x-coord - pad column |
Float_t posx1=0; // left x-coord - pad column |
698 |
Float_t posx0=0; // x-coord - column division |
Float_t posx0=0; // x-coord - column division |
699 |
Float_t wrel = 0; // relative x size of first sub-column |
Float_t wrel = 0; // relative x size of first sub-column |
700 |
Float_t marg = 0.004; // margin among pads |
Float_t marg = 0.004; // margin among pads |
701 |
Float_t tposy = 0.95; // up y-coord - top pads |
|
|
Float_t thpad = 0; // pad height |
|
|
Float_t tposx1=0; // left x-coord - pad column |
|
|
Float_t tposx0=0; // x-coord - column division |
|
|
Float_t twrel = 0; // relative x size of first sub-column |
|
|
Float_t tmarg = 0.004; // margin among pads |
|
|
|
|
702 |
hpad = (posy-marg*11)/6; |
hpad = (posy-marg*11)/6; |
703 |
wrel = (1-marg*4)/2; |
wrel = (1-marg*4)/2; |
704 |
thpad = (tposy-tmarg*5)/3; |
|
|
twrel = (1-tmarg*4)/2; |
|
|
|
|
705 |
for(Int_t n = 0; n<12; n++) { |
for(Int_t n = 0; n<12; n++) { |
706 |
|
|
707 |
if ( (n+1)%2==1 ) { |
if ( (n+1)%2==1 ) { |
708 |
if(n>1) posy = posy-(marg*2+hpad); |
if(n>1) posy = posy-(marg*2+hpad); |
709 |
posx1 = marg; |
posx1 = marg; |
712 |
else { |
else { |
713 |
posx1 = posx0 + 2*marg; |
posx1 = posx0 + 2*marg; |
714 |
posx0 = posx1 + wrel; |
posx0 = posx1 + wrel; |
715 |
} |
} |
716 |
|
|
|
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; |
|
|
} |
|
|
|
|
|
|
|
717 |
/* -----------> pad for histograms */ |
/* -----------> pad for histograms */ |
718 |
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); |
719 |
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); |
720 |
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); |
721 |
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); |
722 |
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); |
723 |
if(n<5) pad6[n] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
} |
|
|
|
|
|
|
|
/* -----------> HISTOGRAMS */ |
|
|
|
|
|
oss1<<"DSP "<<n*100+ii; |
|
|
oss2<<"DSPh "<<n*100+ii; |
|
|
oss3<<"DSP h "<<n*100+ii; |
|
|
oss4<<"DSP h"<<n*100+ii; |
|
|
|
|
|
landau1[n][ii]=new TH1F(oss1.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
|
|
landau1[n][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau1[n][ii]->GetXaxis()->CenterTitle(); |
|
|
landau2[n][ii]=new TH1F(oss2.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
|
|
landau2[n][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau2[n][ii]->GetXaxis()->CenterTitle(); |
|
|
landau3[n][ii]=new TH1F(oss3.str().c_str(),oss1.str().c_str(),401,-0.5,1200.5); |
|
|
landau3[n][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau3[n][ii]->GetXaxis()->CenterTitle(); |
|
|
|
|
|
illuminazione[n][ii]=new TH1F(oss4.str().c_str(),oss1.str().c_str(),3073,-0.5,3072.5); |
|
|
illuminazione[n][ii]->GetXaxis()->SetTitle("strip with max signal"); |
|
|
illuminazione[n][ii]->GetXaxis()->CenterTitle(); |
|
|
|
|
|
oss1.str(""); |
|
|
oss2.str(""); |
|
|
oss3.str(""); |
|
|
oss4.str(""); |
|
|
}; |
|
|
|
|
|
|
|
|
// printf("\nprova0\n"); |
|
|
|
|
|
|
|
|
//********************************************************************************** |
|
|
// Fill Graphs and Histos |
|
|
//********************************************************************************** |
|
724 |
|
|
725 |
// |
// |
726 |
// information about the tracker data |
// Obtain information about the tracker data |
727 |
Int_t warning_dspnumber=0; |
// and fill graphs and histos |
|
Float_t x[30000]; |
|
|
Float_t yc[30000][12]; |
|
|
Float_t eventint[30000]; |
|
728 |
|
|
729 |
|
Int_t al=0; |
730 |
|
Double_t x[MAXSTORAGE]; |
731 |
|
Float_t yc[MAXSTORAGE][12]; |
732 |
|
Double_t eventint[MAXSTORAGE]; |
733 |
|
Int_t eventn[12]; |
734 |
|
|
735 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
736 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
737 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
738 |
|
cod = eh->GetCounter(); |
739 |
|
|
740 |
|
|
741 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
742 |
|
|
743 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==30000){ |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
744 |
maxev=ev; |
maxev=ev; |
|
printf("prova12 ev=%d\tev-minev=%d\n",ev,ev-minev); |
|
745 |
break; |
break; |
746 |
} |
} |
747 |
else{ |
else{ |
|
// if(ii==32)printf("\nprova1 %d\tev-minev=%d\n",ev,ev-minev); |
|
748 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
x[(ev-minev)]= ph->GetOrbitalTime(); |
749 |
ALARM=0; |
ALARM=0; |
|
|
|
750 |
Int_t dsp=0; |
Int_t dsp=0; |
751 |
|
Int_t noacq=0; |
752 |
|
Int_t acq_dsp[12]; |
753 |
|
ULong_t acq_info_tmp=0; |
754 |
|
if(cod->Get(pctp->RunHeader)>0) acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)-1]; |
755 |
|
else acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)]; |
756 |
|
for(Int_t io=0;io<12;io++){ |
757 |
|
acq_dsp[dsp]=(acq_info_tmp>>(12+io))&(~(~0<<1)); |
758 |
|
if(((acq_info_tmp>>(12+io))&(~(~0<<1)))==0) |
759 |
|
noacq+=1; |
760 |
|
WARNING[io]=0; |
761 |
|
} |
762 |
|
|
763 |
for(Int_t i=0; i<12; i++){ |
for(Int_t i=0; i<12; i++){ |
764 |
dsp=te->DSPnumber[i]-1; |
|
765 |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
if(i<12-noacq){ |
766 |
|
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
767 |
for(Int_t j=0;j<3;j++){ |
ALARM=1; |
768 |
if(te->signcluster[i][j]!=0){ |
break; |
769 |
hi=(j*1024)+te->addrcluster[i][j]; |
} |
770 |
if((hi>505 && hi<519) ||(hi>1017 && hi<1031) ||(hi>1529 && hi<1543) || (hi>2041 && hi<2055) ||(hi>2553 && hi<2567)) |
|
771 |
continue; |
dsp=te->DSPnumber[i]-1; |
772 |
else illuminazione[dsp][ii]->Fill(hi); |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
773 |
|
|
774 |
|
// |
775 |
|
// Fill Cluster Signal and Lighting of the view histos |
776 |
|
for(Int_t j=0;j<3;j++){ |
777 |
|
if(te->signcluster[i][j]!=0){ |
778 |
|
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
779 |
|
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
780 |
|
} |
781 |
|
} |
782 |
|
} |
783 |
|
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
784 |
if(!(dsp%2)){ |
if(!(dsp%2)){ |
785 |
landau1[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
786 |
landau2[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
787 |
landau3[dsp][ii]->Fill(1024-(te->signcluster[i][j])); |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
788 |
} |
} |
789 |
else{ |
else{ |
790 |
landau1[dsp][ii]->Fill(te->signcluster[i][j]); |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
791 |
landau2[dsp][ii]->Fill(te->signcluster[i][j]); |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
792 |
landau3[dsp][ii]->Fill(te->signcluster[i][j]); |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
793 |
} |
} |
794 |
} |
} |
795 |
} |
|
796 |
|
WARNING[i]=0; |
797 |
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){ |
798 |
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 |
799 |
ALARM = 1; //general alarm |
WARNING[i] = 1; // DSP warning |
800 |
WARNING[i] = 1; // DSP warning |
}; |
801 |
}; |
|
802 |
|
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
803 |
if(te->alarm[i]!=0){ // hardware alarm |
if(countALARMy==0) |
804 |
ALARM = 1; |
ALARM = 1; |
805 |
}; |
countALARMy+=1; |
806 |
|
}; |
807 |
|
|
808 |
|
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
809 |
|
if(countALARMx==0) |
810 |
|
ALARM = 1; |
811 |
|
countALARMx+=1; |
812 |
|
}; |
813 |
|
|
814 |
//************************************************************************************** |
//************************************************************************************** |
815 |
// warning for internal number |
// warning for internal number |
816 |
//************************************************************************************** |
//************************************************************************************** |
817 |
if(i<=10){ |
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
818 |
if(te->eventn[i]!=te->eventn[i+1]){ |
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
819 |
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-minev)]=te->eventn[0]; |
|
|
} |
|
820 |
} |
} |
821 |
|
eventint[(ev-minev)]=te->eventn[0]; |
822 |
|
|
|
if(ev<=maxevent-1){ |
|
|
|
|
|
if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1){ |
|
|
warning_dspnumber++; |
|
|
warning<< "==> WARNING!! Check entry "<< ev<<endl<< |
|
|
" DSP event num.= "<< eventint[(ev-minev)]<< |
|
|
" is different from (previus+1) ="<<eventint[(ev-minev)-1]+1 <<"\n"<<endl; |
|
|
} |
|
|
} |
|
|
|
|
823 |
//******************************************************************************************** |
//******************************************************************************************** |
824 |
// file ALARM |
// file DSP warning |
825 |
//******************************************************************************************** |
//******************************************************************************************** |
826 |
|
|
827 |
alarm <<endl<< "================================================="<< endl; |
if(ALARM==1) { |
828 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
al=1; |
829 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm <<endl<< "================================================="<< endl; |
830 |
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
831 |
alarm << "================================================="<< endl; |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
832 |
|
alarm << "Total events "<<nevent<<endl; |
833 |
if(ALARM==1) { |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
834 |
|
alarm << "================================================="<< endl; |
835 |
|
|
836 |
alarm << " DSPn"; |
alarm << " DSPn"; |
837 |
alarm << " Event"; |
alarm << " Counter"; |
838 |
|
alarm << " previous"; |
839 |
alarm << " Words"; |
alarm << " Words"; |
840 |
alarm << " crc"; |
alarm << " crc"; |
841 |
alarm << " FC"; |
alarm << " FC"; |
848 |
|
|
849 |
for(Int_t i=0; i<12 ; i++){ |
for(Int_t i=0; i<12 ; i++){ |
850 |
alarm.width(5); alarm << te->DSPnumber[i]; |
alarm.width(5); alarm << te->DSPnumber[i]; |
851 |
alarm.width(6); alarm << te->eventn[i]; |
alarm.width(8); alarm << te->eventn[i]; |
852 |
|
alarm.width(8); alarm << eventn[i]; |
853 |
alarm.width(6); alarm << te->DATAlength[i]; |
alarm.width(6); alarm << te->DATAlength[i]; |
854 |
alarm.width(4); alarm << te->crc[i]; |
alarm.width(4); alarm << te->crc[i]; |
855 |
alarm.width(4); alarm << te->fc[i]; |
alarm.width(4); alarm << te->fc[i]; |
864 |
alarm << endl; |
alarm << endl; |
865 |
} |
} |
866 |
} |
} |
867 |
|
for(Int_t i=0; i<12 ; i++) |
868 |
|
eventn[i]=te->eventn[i]; |
869 |
|
} |
870 |
|
} |
871 |
|
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
872 |
|
if(maxev==maxevent-1) { |
873 |
|
if(countALARMy!=0){ |
874 |
|
if(countALARMy%6!=0) alarm << endl<<endl<< "***** "<<countALARMy/6+1 <<" events with hardware alarm in Y-view *****"<<endl; |
875 |
|
else alarm << endl<<endl<< "***** "<<countALARMy/6 <<" events with hardware alarm in Y-view *****"<<endl; |
876 |
|
} |
877 |
|
if(countALARMx!=0){ |
878 |
|
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
879 |
|
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
880 |
} |
} |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
|
|
|
|
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
|
881 |
} |
} |
882 |
|
|
883 |
// printf("prova2\n"); |
// |
884 |
|
// Draw the graphs |
|
Float_t maxhist=0; |
|
|
TBox b; |
|
|
b.SetFillColor(5); |
|
|
|
|
885 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
886 |
Float_t yyc[maxev-minev]; |
Double_t yyc[maxev-minev]; |
887 |
for (Int_t v=0; v<maxev-minev; v++){ |
for (Int_t v=0; v<maxev-minev; v++){ |
888 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
889 |
} |
} |
|
|
|
|
printf("prova3\n"); |
|
|
LandauCanv1[ii]->cd(); |
|
|
pad1[i]->SetFillColor(10); |
|
|
pad1[i]->SetFrameFillColor(10); |
|
|
pad1[i]->Draw(); |
|
|
pad1[i]->cd(); |
|
|
landau1[i][ii]->Draw(""); |
|
|
LandauCanv2[ii]->cd(); |
|
|
pad4[i]->SetFillColor(10); |
|
|
pad4[i]->SetFrameFillColor(10); |
|
|
pad4[i]->Draw(); |
|
|
pad4[i]->cd(); |
|
|
landau2[i][ii]->Draw(""); |
|
|
LandauCanv3[ii]->cd(); |
|
|
pad5[i]->SetFillColor(10); |
|
|
pad5[i]->SetFrameFillColor(10); |
|
|
pad5[i]->Draw(); |
|
|
pad5[i]->cd(); |
|
|
landau3[i][ii]->Draw(""); |
|
|
|
|
|
printf("prova4\n"); |
|
|
IlluminaCanv[ii]->cd(); |
|
|
pad2[i]->SetFillColor(10); |
|
|
pad2[i]->SetFrameFillColor(10); |
|
|
pad2[i]->Draw(); |
|
|
pad2[i]->cd(); |
|
|
pad2[i]->SetLogy(); |
|
|
// illuminazione[i][ii]->SetStats(KFALSE); |
|
|
if(i==1){ |
|
|
illuminazione[i][ii]->Draw("ah"); |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(2816.,0.,3060.,maxhist); |
|
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same ]["); |
|
|
} |
|
|
else if(i==6){ |
|
|
illuminazione[i][ii]->Draw("ah"); |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(2560.,0.,2816.,maxhist); |
|
|
b.DrawBox(512.,0.,768.,maxhist); |
|
|
b.DrawBox(1024.,0.,1792.,maxhist); |
|
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same]["); |
|
|
} |
|
|
else if(i==11){ |
|
|
illuminazione[i][ii]->Draw("ah"); |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(768.,0.,1024.,maxhist); |
|
|
illuminazione[i][ii]->Draw("axis same"); |
|
|
illuminazione[i][ii]->Draw("same]["); |
|
|
} |
|
|
else illuminazione[i][ii]->Draw(""); |
|
|
|
|
|
printf("prova5\n"); |
|
|
|
|
890 |
|
|
891 |
CompTimeCanv[ii]->cd(); |
CompTimeCanv[ii]->cd(); |
892 |
pad3[i]->SetFillColor(10); |
pad3[i]->SetFillColor(10); |
900 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
901 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
902 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
903 |
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); |
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
904 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
905 |
oss1.str(""); |
oss1.str(""); |
|
|
|
906 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |
907 |
LandauCanv1[ii]->Update(); |
} |
|
LandauCanv2[ii]->Update(); |
|
|
LandauCanv3[ii]->Update(); |
|
|
IlluminaCanv[ii]->Update(); |
|
|
}; |
|
908 |
|
|
909 |
printf("prova6\n"); |
|
|
EventNumCanv[ii]->cd(); |
|
|
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(); |
|
910 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
911 |
|
pt = new TPad("pt"," ",0.02,0.01,1.,0.98,18,0,0); |
912 |
pt->SetFillColor(10); |
pt->SetFillColor(10); |
913 |
pt->SetFrameFillColor(10); |
pt->SetFrameFillColor(10); |
914 |
pt->Draw(); |
pt->Draw(); |
915 |
pt->cd(); |
pt->cd(); |
916 |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
917 |
eventnumb[ii]->SetTitle(""); |
eventnumb[ii]->SetTitle(""); |
918 |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.04); |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.02); |
919 |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.03); |
920 |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
921 |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
922 |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
923 |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.2); |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.1); |
924 |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.04); |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.02); |
925 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
926 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
927 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
928 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(1.5); |
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
929 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
930 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
931 |
eventnumb[ii]->SetMarkerSize(0.3); |
eventnumb[ii]->SetMarkerSize(0.2); |
932 |
|
oss1.str(""); |
933 |
|
oss1<<"number of events in this graph: "<<maxev-minev; |
934 |
|
t->SetTextColor(kBlue); |
935 |
|
t->SetTextSize(0.02); |
936 |
|
double xtex=0,ytex=0; |
937 |
|
xtex=x[maxev-minev-1]-(x[maxev-minev-1]-x[0])/3; |
938 |
|
ytex=1000.+eventnumb[ii]->GetYaxis()->GetXmax(); |
939 |
|
t->DrawLatex(xtex,ytex,oss1.str().c_str()); |
940 |
|
oss1.str(""); |
941 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
942 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
|
|
|
|
printf("prova7\n"); |
|
|
|
|
|
obt=0; |
|
|
for(Int_t i=0; i<5; i++){ |
|
|
Int_t v=0; |
|
|
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
|
|
tree->GetEntry(ev); |
|
|
ph=eT->GetPscuHeader(); |
|
|
|
|
|
if(ph->GetOrbitalTime()<obt && ev>countTEMP){ |
|
|
countTEMP=ev; |
|
|
break; |
|
|
} |
|
|
else{ |
|
|
obt=ph->GetOrbitalTime(); |
|
|
tempt_tmp[v++]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
|
|
} |
|
|
} |
|
|
TempCanv[ii]->cd(); |
|
|
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
|
|
pad6[i]->SetFillColor(10); |
|
|
pad6[i]->Draw(); |
|
|
pad6[i]->cd(); |
|
|
temp[i][ii]= new TGraph(v,xt,tempt_tmp); |
|
|
temp[i][ii]->SetTitle(tit.str().c_str()); |
|
|
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
|
|
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
|
|
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
|
|
temp[i][ii]->GetXaxis()->CenterTitle(); |
|
|
temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
|
|
temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
|
|
temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
|
|
temp[i][ii]->GetYaxis()->SetLabelSize(0.04); |
|
|
temp[i][ii]->GetYaxis()->SetTitleSize(0.04); |
|
|
temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
|
|
temp[i][ii]->GetYaxis()->CenterTitle(); |
|
|
temp[i][ii]->SetMarkerStyle(21); |
|
|
temp[i][ii]->SetMarkerSize(0.2); |
|
|
temp[i][ii]->Draw("ap"); |
|
|
tit.str(""); |
|
|
TempCanv[ii]->Update(); |
|
|
} |
|
943 |
|
|
|
printf("prova8\n"); |
|
944 |
minev=maxev; |
minev=maxev; |
|
printf("\ncountrun=%d\n",ii); |
|
945 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
946 |
countrun=ii+1; |
cntpgdat=ii+1; |
947 |
break; |
break; |
948 |
} |
} |
949 |
|
|
|
warning.close(); |
|
|
|
|
950 |
} |
} |
951 |
|
|
|
//***************************************** |
|
|
//close all files |
|
|
//***************************************** |
|
952 |
alarm.close(); |
alarm.close(); |
953 |
datafile->Close(); |
|
954 |
|
//**************************************************************************************** |
955 |
|
//Cluster Signal ladder1 Output Pages |
956 |
|
//**************************************************************************************** |
957 |
|
|
958 |
|
fromfile.str(""); |
959 |
|
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
960 |
|
isfile<<"Cluster Signal ladder1"; |
961 |
|
LandauCanv1=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
962 |
|
LandauCanv1->SetFillColor(10); |
963 |
|
LandauCanv1->Range(0,0,100,100); |
964 |
|
|
965 |
|
t->SetTextFont(32); |
966 |
|
t->SetTextColor(1); |
967 |
|
t->SetTextAlign(12); |
968 |
|
t->SetTextSize(0.02); |
969 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
970 |
|
t1->SetTextFont(32); |
971 |
|
t1->SetTextColor(1); |
972 |
|
t1->SetTextAlign(12); |
973 |
|
t1->SetTextSize(0.02); |
974 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
975 |
|
isfile.str(""); |
976 |
|
|
977 |
|
//**************************************************************************************** |
978 |
|
//Cluster Signal ladder2 Output Pages |
979 |
|
//**************************************************************************************** |
980 |
|
|
981 |
|
isfile<<"Cluster Signal ladder2"; |
982 |
|
LandauCanv2=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
983 |
|
LandauCanv2->SetFillColor(10); |
984 |
|
LandauCanv2->Range(0,0,100,100); |
985 |
|
|
986 |
|
t->SetTextFont(32); |
987 |
|
t->SetTextColor(1); |
988 |
|
t->SetTextAlign(12); |
989 |
|
t->SetTextSize(0.02); |
990 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
991 |
|
t1->SetTextFont(32); |
992 |
|
t1->SetTextColor(1); |
993 |
|
t1->SetTextAlign(12); |
994 |
|
t1->SetTextSize(0.02); |
995 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
996 |
|
isfile.str(""); |
997 |
|
|
998 |
|
//**************************************************************************************** |
999 |
|
//Cluster Signal ladder3 Output Pages |
1000 |
|
//**************************************************************************************** |
1001 |
|
|
1002 |
|
isfile<<"Cluster Signal ladder3"; |
1003 |
|
LandauCanv3=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
1004 |
|
LandauCanv3->SetFillColor(10); |
1005 |
|
LandauCanv3->Range(0,0,100,100); |
1006 |
|
|
1007 |
|
t->SetTextFont(32); |
1008 |
|
t->SetTextColor(1); |
1009 |
|
t->SetTextAlign(12); |
1010 |
|
t->SetTextSize(0.02); |
1011 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
1012 |
|
t1->SetTextFont(32); |
1013 |
|
t1->SetTextColor(1); |
1014 |
|
t1->SetTextAlign(12); |
1015 |
|
t1->SetTextSize(0.02); |
1016 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1017 |
|
isfile.str(""); |
1018 |
|
|
1019 |
|
//**************************************************************************************** |
1020 |
|
//Lighting of the views Output Pages |
1021 |
|
//**************************************************************************************** |
1022 |
|
|
1023 |
|
isfile<<"lighting of the views"; |
1024 |
|
IlluminaCanv=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
1025 |
|
IlluminaCanv->SetFillColor(10); |
1026 |
|
IlluminaCanv->Range(0,0,100,100); |
1027 |
|
t->SetTextFont(32); |
1028 |
|
t->SetTextColor(1); |
1029 |
|
t->SetTextAlign(12); |
1030 |
|
t->SetTextSize(0.02); |
1031 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
1032 |
|
t1->SetTextFont(32); |
1033 |
|
t1->SetTextColor(1); |
1034 |
|
t1->SetTextAlign(12); |
1035 |
|
t1->SetTextSize(0.02); |
1036 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1037 |
|
isfile.str(""); |
1038 |
|
|
1039 |
|
// |
1040 |
|
// Draw the histos |
1041 |
|
for (Int_t i=0; i<12 ; i++){ |
1042 |
|
|
1043 |
|
TBox b; |
1044 |
|
|
1045 |
|
Float_t maxhist=0; |
1046 |
|
LandauCanv1->cd(); |
1047 |
|
pad1[i]->SetFillColor(10); |
1048 |
|
pad1[i]->SetFrameFillColor(10); |
1049 |
|
pad1[i]->Draw(); |
1050 |
|
pad1[i]->cd(); |
1051 |
|
landau1[i]->GetXaxis()->SetTitle("max signal"); |
1052 |
|
landau1[i]->GetXaxis()->CenterTitle(); |
1053 |
|
landau1[i]->Draw(""); |
1054 |
|
LandauCanv1->Update(); |
1055 |
|
|
1056 |
|
LandauCanv2->cd(); |
1057 |
|
pad4[i]->SetFillColor(10); |
1058 |
|
pad4[i]->SetFrameFillColor(10); |
1059 |
|
pad4[i]->Draw(); |
1060 |
|
pad4[i]->cd(); |
1061 |
|
landau2[i]->GetXaxis()->SetTitle("max signal"); |
1062 |
|
landau2[i]->GetXaxis()->CenterTitle(); |
1063 |
|
landau2[i]->Draw(""); |
1064 |
|
LandauCanv2->Update(); |
1065 |
|
|
1066 |
|
LandauCanv3->cd(); |
1067 |
|
pad5[i]->SetFillColor(10); |
1068 |
|
pad5[i]->SetFrameFillColor(10); |
1069 |
|
pad5[i]->Draw(); |
1070 |
|
pad5[i]->cd(); |
1071 |
|
landau3[i]->GetXaxis()->SetTitle("max signal"); |
1072 |
|
landau3[i]->GetXaxis()->CenterTitle(); |
1073 |
|
landau3[i]->Draw(""); |
1074 |
|
LandauCanv3->Update(); |
1075 |
|
|
1076 |
|
IlluminaCanv->cd(); |
1077 |
|
pad2[i]->SetFillColor(10); |
1078 |
|
pad2[i]->SetFrameFillColor(10); |
1079 |
|
pad2[i]->SetLogy(); |
1080 |
|
pad2[i]->Draw(); |
1081 |
|
pad2[i]->cd(); |
1082 |
|
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
1083 |
|
illuminazione[i]->GetXaxis()->CenterTitle(); |
1084 |
|
illuminazione[i]->Draw(""); |
1085 |
|
if(i==1){ |
1086 |
|
maxhist= illuminazione[i]->GetMaximum(); |
1087 |
|
b.SetFillColor(6); |
1088 |
|
b.SetFillStyle(3945); |
1089 |
|
b.DrawBox(2944.,0.,3060.,maxhist); |
1090 |
|
|
1091 |
|
b.SetFillColor(107); |
1092 |
|
b.SetFillStyle(3954); |
1093 |
|
b.DrawBox(2816.,0.,2944.,maxhist); |
1094 |
|
b.DrawBox(2048.,0.,2176.,maxhist); |
1095 |
|
} |
1096 |
|
else if(i==4){ |
1097 |
|
maxhist=illuminazione[i]->GetMaximum(); |
1098 |
|
b.SetFillColor(107); |
1099 |
|
b.SetFillStyle(3954); |
1100 |
|
b.DrawBox(384.,0.,512.,maxhist); |
1101 |
|
} |
1102 |
|
else if(i==6){ |
1103 |
|
maxhist= illuminazione[i]->GetMaximum(); |
1104 |
|
b.SetFillColor(6); |
1105 |
|
b.SetFillStyle(3945); |
1106 |
|
b.DrawBox(2560.,0.,2816.,maxhist); |
1107 |
|
b.DrawBox(1024.,0.,1535.,maxhist); |
1108 |
|
|
1109 |
|
b.SetFillColor(107); |
1110 |
|
b.SetFillStyle(3954); |
1111 |
|
b.DrawBox(512.,0.,768.,maxhist); |
1112 |
|
b.DrawBox(1536.,0.,1792.,maxhist); |
1113 |
|
} |
1114 |
|
else if(i==7){ |
1115 |
|
maxhist= illuminazione[i]->GetMaximum(); |
1116 |
|
b.SetFillColor(107); |
1117 |
|
b.SetFillStyle(3954); |
1118 |
|
b.DrawBox(512.,0.,768.,maxhist); |
1119 |
|
} |
1120 |
|
else if(i==9){ |
1121 |
|
maxhist=illuminazione[i]->GetMaximum(); |
1122 |
|
b.SetFillColor(107); |
1123 |
|
b.SetFillStyle(3954); |
1124 |
|
b.DrawBox(256.,0.,384.,maxhist); |
1125 |
|
} |
1126 |
|
else if(i==11){ |
1127 |
|
maxhist= illuminazione[i]->GetMaximum(); |
1128 |
|
b.SetFillColor(6); |
1129 |
|
b.SetFillStyle(3945); |
1130 |
|
b.DrawBox(768.,0.,1024.,maxhist); |
1131 |
|
|
1132 |
|
b.SetFillColor(107); |
1133 |
|
b.SetFillStyle(3954); |
1134 |
|
b.DrawBox(0.,0.,512.,maxhist); |
1135 |
|
b.DrawBox(1920.,0.,2560.,maxhist); |
1136 |
|
} |
1137 |
|
IlluminaCanv->Update(); |
1138 |
|
} |
1139 |
|
|
1140 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
1141 |
|
|
1142 |
//************************************************************************* |
//************************************************************************* |
1143 |
// Save output Files |
// Save output Files |
1144 |
//************************************************************************* |
//************************************************************************* |
1145 |
stringstream out1,out2,out3,command; |
stringstream out1,out2,out3,command; |
1146 |
|
Int_t totpg=0; |
1147 |
for(Int_t fl=0;fl<countrun;fl++){ |
if(cntpgtemp>cntpgdat) totpg=cntpgtemp; |
1148 |
|
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
1149 |
|
|
1150 |
|
for(Int_t fl=0;fl<totpg;fl++){ |
1151 |
|
|
1152 |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
1153 |
out1.str(""); |
out1.str(""); |
1154 |
out2.str(""); |
out2.str(""); |
1158 |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
1159 |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
1160 |
|
|
1161 |
if(countrun==1){ |
if(totpg==1){ |
1162 |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
1163 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1164 |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1165 |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
BfieldCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1166 |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
1167 |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
1168 |
TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
1169 |
|
IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); |
1170 |
} |
} |
1171 |
else if(countrun>=1){ |
else if(totpg>1){ |
1172 |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
1173 |
else CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl>0 && fl<cntpgdat) CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1174 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1175 |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgmag) BfieldCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1176 |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1177 |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl==totpg-1){ |
1178 |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
1179 |
if(fl!=countrun-1) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
1180 |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
1181 |
} |
IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); |
1182 |
|
} |
|
if(!strcmp(outfile.Data(),"pdf")){ |
|
|
stringstream com; |
|
|
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
|
|
system(com.str().c_str()); |
|
|
printf("\n---> ps file converted in pdf format!\n"); |
|
|
com.str(""); |
|
|
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
|
|
system(com.str().c_str()); |
|
|
printf("---> ps file removed!\n\n"); |
|
|
com.str(""); |
|
1183 |
} |
} |
1184 |
} |
} |
1185 |
else{ |
else{ |
1186 |
out1.str(""); |
out1.str(""); |
1187 |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
1188 |
CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
1189 |
|
out1.str(""); |
1190 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-BField-pag"<<fl+1<<"."<<outfile.Data(); |
1191 |
|
if(fl<cntpgmag) BfieldCanv[fl]->Print(out+out1.str().c_str()); |
1192 |
out1.str(""); |
out1.str(""); |
1193 |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
1194 |
TempCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out1.str().c_str()); |
1195 |
out1.str(""); |
out1.str(""); |
1196 |
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
1197 |
EventNumCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out1.str().c_str()); |
1198 |
out1.str(""); |
if(fl==totpg-1){ |
1199 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1200 |
LandauCanv1[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1."<<outfile.Data(); |
1201 |
out1.str(""); |
LandauCanv1->Print(out+out1.str().c_str()); |
1202 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1203 |
LandauCanv2[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2."<<outfile.Data(); |
1204 |
out1.str(""); |
LandauCanv2->Print(out+out1.str().c_str()); |
1205 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1206 |
LandauCanv3[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3."<<outfile.Data(); |
1207 |
out1.str(""); |
LandauCanv3->Print(out+out1.str().c_str()); |
1208 |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1209 |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting."<<outfile.Data(); |
1210 |
|
IlluminaCanv->Print(out+out1.str().c_str()); |
1211 |
|
} |
1212 |
} |
} |
1213 |
|
} |
1214 |
|
|
1215 |
|
// |
1216 |
|
// Convert ps to pdf if required |
1217 |
|
if(!strcmp(outfile.Data(),"pdf")){ |
1218 |
|
stringstream com; |
1219 |
|
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
1220 |
|
system(com.str().c_str()); |
1221 |
|
printf("\n---> ps file converted in pdf format!\n"); |
1222 |
|
com.str(""); |
1223 |
|
com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; |
1224 |
|
system(com.str().c_str()); |
1225 |
|
printf("---> ps file removed!\n\n"); |
1226 |
|
com.str(""); |
1227 |
} |
} |
|
command.str(""); |
|
|
command<<"rm -f "<<out<<"warning.txt"; |
|
|
system(command.str().c_str()); |
|
1228 |
|
|
1229 |
gROOT->Reset(); |
gROOT->Reset(); |
1230 |
return; |
return; |
1231 |
} |
} |