1 |
/** |
/** |
2 |
* FTrkQLook_EXPERT |
* FTrkQLook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version 2.0 |
* version v1r23 |
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 |
#define MAXSTORAGE 50000 |
39 |
|
|
|
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); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
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; |
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]= 0x"<< hex << (Int_t)al->ALARM[1]<<endl; |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[0]<<endl; |
269 |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[2]<<endl; |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[1]<<endl; |
270 |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
271 |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
272 |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
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); |
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); |
366 |
|
|
367 |
|
TLatex *t=new TLatex(); |
368 |
|
TLatex *t1=new TLatex(); |
369 |
|
|
370 |
|
TLine li,liva1; |
371 |
|
|
372 |
|
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
373 |
|
ULong_t countALARMx=0,countALARMy=0,countFC[12],countFL1[12],countFL2[12],countFL3[12],countFL4[12],countFL5[12],countFL6[12]; |
374 |
|
|
375 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countHOBT=0; |
for(int i=0; i<12; i++){ |
376 |
TCanvas *CompTimeCanv[countrun],*EventNumCanv[countrun],*LandauCanv1[countrun],*LandauCanv2[countrun],*LandauCanv3[countrun]; |
countFC[i]=0; |
377 |
TCanvas *IlluminaCanv[countrun],*TempCanv[countrun]; |
countFL1[i]=0; |
378 |
TGraph *comprtime[12][countrun],*temp[5][countrun],*eventnumb[countrun]; |
countFL2[i]=0; |
379 |
TH1F *landau1[12][countrun],*landau2[12][countrun],*landau3[12][countrun],*illuminazione[12][countrun]; |
countFL3[i]=0; |
380 |
|
countFL4[i]=0; |
381 |
|
countFL5[i]=0; |
382 |
for(Int_t ii=0; ii<countrun;ii++){ |
countFL6[i]=0; |
383 |
TPaveText *pt1; |
} |
|
TPad *pt,*pt0; |
|
|
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; //pad for histos |
|
|
|
|
|
ofstream warning(out + "warning.txt",ios::out); |
|
384 |
|
|
385 |
|
// |
386 |
|
// Fill temperature graphs |
387 |
|
for(Int_t ii=0; ii<cntpgtemp;ii++){ |
388 |
//**************************************************************************************** |
//**************************************************************************************** |
389 |
//Output figures --- First sheet: |
//Temperature Output Pages |
390 |
//**************************************************************************************** |
//**************************************************************************************** |
391 |
fromfile.str(""); |
fromfile.str(""); |
392 |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
393 |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
isfile<<"Temperatures vs OBT pag"<<ii+1; |
394 |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
395 |
CompTimeCanv[ii]->SetFillColor(10); |
TempCanv[ii]->SetFillColor(10); |
396 |
CompTimeCanv[ii]->Range(0,0,100,100); |
TempCanv[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(62.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
|
|
|
|
//**************************************************************************************** |
|
|
//Output figures --- Second sheet: |
|
|
//**************************************************************************************** |
|
397 |
|
|
|
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); |
|
398 |
t->SetTextFont(32); |
t->SetTextFont(32); |
399 |
t->SetTextColor(1); |
t->SetTextColor(1); |
400 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
404 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
405 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
406 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
407 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
408 |
|
isfile.str(""); |
409 |
|
t1->SetTextSize(0.025); |
410 |
|
t1->SetTextColor(196); |
411 |
|
isfile<<"--> Values at 28.5^{o}C (if presents) correspond"; |
412 |
|
t1->DrawLatex(50.,22.,isfile.str().c_str()); |
413 |
|
isfile.str(""); |
414 |
|
isfile<<" to wrong readings ( > 100^{o}C) of the Tsb"; |
415 |
|
t1->DrawLatex(50.,19.,isfile.str().c_str()); |
416 |
|
isfile.str(""); |
417 |
|
isfile<<"--> Values at 25.5^{o}C (if presents) correspond"; |
418 |
|
t1->DrawLatex(50.,12.,isfile.str().c_str()); |
419 |
isfile.str(""); |
isfile.str(""); |
420 |
|
isfile<<" to wrong readings ( < 0^{o}C) of the Tsb"; |
421 |
|
t1->DrawLatex(50.,9.,isfile.str().c_str()); |
422 |
|
isfile.str(""); |
423 |
|
|
424 |
|
Float_t tposy = 0.95; // up y-coord - top pads |
425 |
|
Float_t thpad = 0; // pad height |
426 |
|
Float_t tposx1=0; // left x-coord - pad column |
427 |
|
Float_t tposx0=0; // x-coord - column division |
428 |
|
Float_t twrel = 0; // relative x size of first sub-column |
429 |
|
Float_t tmarg = 0.004; // margin among pads |
430 |
|
|
431 |
|
thpad = (tposy-tmarg*5)/3; |
432 |
|
twrel = (1-tmarg*4)/2; |
433 |
|
|
434 |
|
for(Int_t i=0; i<5; i++){ |
435 |
|
if ( (i+1)%2==1 ) { |
436 |
|
if(i>1) tposy = tposy-(tmarg*2+thpad); |
437 |
|
tposx1 = tmarg; |
438 |
|
tposx0 = tposx1 + twrel; |
439 |
|
} |
440 |
|
else { |
441 |
|
tposx1 = tposx0 + 2*tmarg; |
442 |
|
tposx0 = tposx1 + twrel; |
443 |
|
} |
444 |
|
|
445 |
|
/* -----------> pad for histograms */ |
446 |
|
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
447 |
|
|
448 |
|
Int_t v=0,vv=0; |
449 |
|
Double_t xt_tmp[tsize], tempt_tmp[tsize]; |
450 |
|
Double_t xt_tmpw[tsize], tempt_tmpw[tsize]; |
451 |
|
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
452 |
|
|
453 |
|
if(ev==tsize-1 && i==4 && ii==cntpgtemp-1) countTEMP=tsize-1; |
454 |
|
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
455 |
|
if(i==4) countTEMP=ev; |
456 |
|
break; |
457 |
|
} |
458 |
|
else{ |
459 |
|
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
460 |
|
if(tempt_tmp[v]>100) { |
461 |
|
tempt_tmp[v]=28.5; |
462 |
|
tempt_tmpw[vv]=28.5; |
463 |
|
xt_tmpw[vv++]=(Double_t)xt[ev]; |
464 |
|
} |
465 |
|
else if(tempt_tmp[v]<0){ |
466 |
|
tempt_tmp[v]=25.5; |
467 |
|
tempt_tmpw[vv]=25.5; |
468 |
|
xt_tmpw[vv++]=(Double_t)xt[ev]; |
469 |
|
} |
470 |
|
xt_tmp[v++]=(Double_t)xt[ev]; |
471 |
|
} |
472 |
|
} |
473 |
|
TempCanv[ii]->cd(); |
474 |
|
tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; |
475 |
|
pad6[i]->SetFillColor(10); |
476 |
|
pad6[i]->Draw(); |
477 |
|
pad6[i]->cd(); |
478 |
|
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
479 |
|
temp[i][ii]->SetTitle(tit.str().c_str()); |
480 |
|
if(v==1) temp[i][ii]->GetXaxis()->SetNdivisions(-501); |
481 |
|
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
482 |
|
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
483 |
|
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
484 |
|
temp[i][ii]->GetXaxis()->CenterTitle(); |
485 |
|
temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
486 |
|
temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
487 |
|
temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
488 |
|
temp[i][ii]->GetYaxis()->SetLabelSize(0.04); |
489 |
|
temp[i][ii]->GetYaxis()->SetTitleSize(0.04); |
490 |
|
temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); |
491 |
|
temp[i][ii]->GetYaxis()->CenterTitle(); |
492 |
|
temp[i][ii]->SetMarkerStyle(21); |
493 |
|
temp[i][ii]->SetMarkerSize(0.2); |
494 |
|
temp[i][ii]->Draw("ap"); |
495 |
|
tit.str(""); |
496 |
|
if(vv>0){ |
497 |
|
tempw[i][ii]= new TGraph(vv,xt_tmpw,tempt_tmpw); |
498 |
|
tempw[i][ii]->SetMarkerStyle(21); |
499 |
|
tempw[i][ii]->SetMarkerSize(0.2); |
500 |
|
tempw[i][ii]->SetMarkerColor(196); |
501 |
|
tempw[i][ii]->Draw("samep"); |
502 |
|
} |
503 |
|
TempCanv[ii]->Update(); |
504 |
|
|
505 |
|
|
506 |
|
} |
507 |
|
if(countTEMP==tsize-1 && ii==cntpgtemp-1){ |
508 |
|
break; |
509 |
|
} |
510 |
|
} |
511 |
|
|
512 |
|
// |
513 |
|
// Fill magnetic field graphs |
514 |
|
for(Int_t ii=0; ii<cntpgmag;ii++){ |
515 |
//**************************************************************************************** |
//**************************************************************************************** |
516 |
//Output figures --- Third sheet: |
//Magnetic Field Output Pages |
517 |
//**************************************************************************************** |
//**************************************************************************************** |
518 |
|
fromfile.str(""); |
519 |
isfile<<"Cluster Signal ladder1 pag"<<ii+1; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
520 |
LandauCanv1[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
isfile<<"Magnetic Axial Field vs OBT pag"<<ii+1; |
521 |
LandauCanv1[ii]->SetFillColor(10); |
BfieldCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
522 |
LandauCanv1[ii]->Range(0,0,100,100); |
BfieldCanv[ii]->SetFillColor(10); |
523 |
|
BfieldCanv[ii]->Range(0,0,100,100); |
524 |
|
|
525 |
t->SetTextFont(32); |
t->SetTextFont(32); |
526 |
t->SetTextColor(1); |
t->SetTextColor(1); |
527 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
531 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
532 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
533 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
534 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
535 |
isfile.str(""); |
isfile.str(""); |
536 |
|
|
537 |
//**************************************************************************************** |
li.SetLineStyle(1); |
538 |
//Output figures --- Third sheet: |
li.SetLineWidth(1); |
539 |
//**************************************************************************************** |
li.SetLineColor(190); |
540 |
|
t1->SetTextColor(190); |
541 |
isfile<<"Cluster Signal ladder2 pag"<<ii+1; |
t1->SetTextSize(0.04); |
542 |
LandauCanv2[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
|
543 |
LandauCanv2[ii]->SetFillColor(10); |
Float_t tposy = 0.95; // up y-coord - top pads |
544 |
LandauCanv2[ii]->Range(0,0,100,100); |
Float_t thpad = 0; // pad height |
545 |
|
Float_t tposx1=0; // left x-coord - pad column |
546 |
|
Float_t tposx0=0; // x-coord - column division |
547 |
|
Float_t twrel = 0; // relative x size of first sub-column |
548 |
|
Float_t tmarg = 0.004; // margin among pads |
549 |
|
|
550 |
|
thpad = (tposy-tmarg*5)/3; |
551 |
|
twrel = (1-tmarg*4)/2; |
552 |
|
|
553 |
|
for(Int_t i=0; i<5; i++){ |
554 |
|
if ( (i+1)%2==1 ) { |
555 |
|
if(i>1) tposy = tposy-(tmarg*2+thpad); |
556 |
|
tposx1 = tmarg; |
557 |
|
tposx0 = tposx1 + twrel; |
558 |
|
} |
559 |
|
else { |
560 |
|
tposx1 = tposx0 + 2*tmarg; |
561 |
|
tposx0 = tposx1 + twrel; |
562 |
|
} |
563 |
|
|
564 |
|
/* -----------> pad for histograms */ |
565 |
|
pad7[i] = new TPad("pad7"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
566 |
|
|
567 |
|
Int_t v=0; |
568 |
|
Double_t xb_tmp[bsize], magt_tmp[bsize]; |
569 |
|
for (Int_t ev=countMAG; ev<bsize; ev++){ |
570 |
|
|
571 |
|
if(ev==bsize-1 && i==4 && ii==cntpgmag-1) countMAG=bsize-1; |
572 |
|
if(xb[ev]<xb[ev-1] && ev>countMAG){ |
573 |
|
if(i==4) countMAG=ev; |
574 |
|
break; |
575 |
|
} |
576 |
|
else{ |
577 |
|
magt_tmp[v]=(Double_t)magt[ev][i]; |
578 |
|
xb_tmp[v++]=(Double_t)xb[ev]; |
579 |
|
} |
580 |
|
} |
581 |
|
BfieldCanv[ii]->cd(); |
582 |
|
tit<<"B"<<i+5<<" (magnetic module "<<i+1<<")"; |
583 |
|
pad7[i]->SetFillColor(10); |
584 |
|
pad7[i]->Draw(); |
585 |
|
pad7[i]->cd(); |
586 |
|
mag[i][ii]= new TGraph(v,xb_tmp,magt_tmp); |
587 |
|
mag[i][ii]->SetTitle(tit.str().c_str()); |
588 |
|
if(v==1) mag[i][ii]->GetXaxis()->SetNdivisions(-501); |
589 |
|
mag[i][ii]->GetXaxis()->SetLabelSize(0.04); |
590 |
|
mag[i][ii]->GetXaxis()->SetTitleSize(0.04); |
591 |
|
mag[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
592 |
|
mag[i][ii]->GetXaxis()->CenterTitle(); |
593 |
|
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
594 |
|
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
595 |
|
else mag[i][ii]->GetYaxis()->SetRangeUser(2059,2067); |
596 |
|
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
597 |
|
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
598 |
|
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
599 |
|
mag[i][ii]->GetYaxis()->SetTitleSize(0.04); |
600 |
|
mag[i][ii]->GetYaxis()->SetTitle("Magnetic Field (au)"); |
601 |
|
mag[i][ii]->GetYaxis()->CenterTitle(); |
602 |
|
mag[i][ii]->SetMarkerStyle(21); |
603 |
|
mag[i][ii]->SetMarkerSize(0.4); |
604 |
|
mag[i][ii]->Draw("ap"); |
605 |
|
Double_t min=0.,max=0,xlat=0.; |
606 |
|
min=mag[i][ii]->GetXaxis()->GetXmin(); |
607 |
|
max=mag[i][ii]->GetXaxis()->GetXmax(); |
608 |
|
xlat=min+(max-min)/2; |
609 |
|
stringstream mi,ma; |
610 |
|
mi<<"minimum recorded value"; |
611 |
|
ma<<"maximum recorded value"; |
612 |
|
t->SetTextSize(0.1); |
613 |
|
switch(i){ |
614 |
|
case 0: |
615 |
|
li.DrawLine(min,2054.,max,2054.); |
616 |
|
li.DrawLine(min,2048.,max,2048.); |
617 |
|
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
618 |
|
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
619 |
|
break; |
620 |
|
|
621 |
|
case 1: |
622 |
|
li.DrawLine(min,2055.,max,2055.); |
623 |
|
li.DrawLine(min,2050.,max,2050.); |
624 |
|
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
625 |
|
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
626 |
|
break; |
627 |
|
|
628 |
t->SetTextFont(32); |
case 2: |
629 |
t->SetTextColor(1); |
li.DrawLine(min,2056.,max,2056.); |
630 |
t->SetTextAlign(12); |
li.DrawLine(min,2051.,max,2051.); |
631 |
t->SetTextSize(0.02); |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
632 |
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
633 |
t1->SetTextFont(32); |
break; |
634 |
t1->SetTextColor(1); |
|
635 |
t1->SetTextAlign(12); |
case 3: |
636 |
t1->SetTextSize(0.02); |
li.DrawLine(min,2057.,max,2057.); |
637 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
li.DrawLine(min,2052.,max,2052.); |
638 |
isfile.str(""); |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
639 |
|
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
640 |
|
break; |
641 |
|
|
642 |
//**************************************************************************************** |
case 4: |
643 |
//Output figures --- Third sheet: |
li.DrawLine(min,2066.,max,2066.); |
644 |
//**************************************************************************************** |
li.DrawLine(min,2060.,max,2060.); |
645 |
|
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
646 |
|
t1->DrawLatex(xlat,2059.85,mi.str().c_str()); |
647 |
|
break; |
648 |
|
|
649 |
isfile<<"Cluster Signal ladder3 pag"<<ii+1; |
} |
650 |
LandauCanv3[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
BfieldCanv[ii]->Update(); |
651 |
LandauCanv3[ii]->SetFillColor(10); |
tit.str(""); |
652 |
LandauCanv3[ii]->Range(0,0,100,100); |
} |
653 |
|
if(countMAG==bsize-1 && ii==cntpgmag-1){ |
654 |
|
break; |
655 |
|
} |
656 |
|
} |
657 |
|
|
658 |
|
|
659 |
t->SetTextFont(32); |
// |
660 |
t->SetTextColor(1); |
// Fill compressiontime and eventnumber graphs and DSP warnings |
661 |
t->SetTextAlign(12); |
for(Int_t ii=0; ii<countnboot;ii++){ |
662 |
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(65.,98.7,isfile.str().c_str()); |
|
|
isfile.str(""); |
|
663 |
|
|
664 |
//**************************************************************************************** |
//**************************************************************************************** |
665 |
//Output figures --- Fourth sheet: |
//COMPRESSIONTIME vs. OBT Output Pages |
666 |
//**************************************************************************************** |
//**************************************************************************************** |
667 |
|
fromfile.str(""); |
668 |
isfile<<"lighting of the views pag"<<ii+1; |
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
669 |
IlluminaCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
isfile<<"COMPRESSIONTIME vs. OBT pag"<<ii+1; |
670 |
IlluminaCanv[ii]->SetFillColor(10); |
CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
671 |
IlluminaCanv[ii]->Range(0,0,100,100); |
CompTimeCanv[ii]->SetFillColor(10); |
672 |
|
CompTimeCanv[ii]->Range(0,0,100,100); |
673 |
t->SetTextFont(32); |
t->SetTextFont(32); |
674 |
t->SetTextColor(1); |
t->SetTextColor(1); |
675 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
679 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
680 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
681 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
682 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
683 |
isfile.str(""); |
isfile.str(""); |
684 |
|
|
685 |
//**************************************************************************************** |
//**************************************************************************************** |
686 |
//Output figures --- Fifth sheet: |
//DSP EVENT NUMBER Output Pages |
687 |
//**************************************************************************************** |
//**************************************************************************************** |
|
|
|
|
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); |
|
688 |
|
|
689 |
|
isfile<<"DSP EVENT NUMBER vs. OBT pag"<<ii+1; |
690 |
|
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
691 |
|
EventNumCanv[ii]->SetFillColor(10); |
692 |
|
EventNumCanv[ii]->Range(0,0,100,100); |
693 |
t->SetTextFont(32); |
t->SetTextFont(32); |
694 |
t->SetTextColor(1); |
t->SetTextColor(1); |
695 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
699 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
700 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
701 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
702 |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
703 |
isfile.str(""); |
isfile.str(""); |
704 |
|
|
|
//************************************************************************************* |
|
|
//book pads and histos |
|
|
//*************************************************************************************** |
|
705 |
Float_t posy = 0.95; // up y-coord - top pads |
Float_t posy = 0.95; // up y-coord - top pads |
706 |
Float_t hpad = 0; // pad height |
Float_t hpad = 0; // pad height |
707 |
Float_t posx1=0; // left x-coord - pad column |
Float_t posx1=0; // left x-coord - pad column |
708 |
Float_t posx0=0; // x-coord - column division |
Float_t posx0=0; // x-coord - column division |
709 |
Float_t wrel = 0; // relative x size of first sub-column |
Float_t wrel = 0; // relative x size of first sub-column |
710 |
Float_t marg = 0.004; // margin among pads |
Float_t marg = 0.004; // margin among pads |
711 |
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 |
|
|
|
|
712 |
hpad = (posy-marg*11)/6; |
hpad = (posy-marg*11)/6; |
713 |
wrel = (1-marg*4)/2; |
wrel = (1-marg*4)/2; |
714 |
thpad = (tposy-tmarg*5)/3; |
|
|
twrel = (1-tmarg*4)/2; |
|
|
|
|
715 |
for(Int_t n = 0; n<12; n++) { |
for(Int_t n = 0; n<12; n++) { |
716 |
|
|
717 |
if ( (n+1)%2==1 ) { |
if ( (n+1)%2==1 ) { |
718 |
if(n>1) posy = posy-(marg*2+hpad); |
if(n>1) posy = posy-(marg*2+hpad); |
719 |
posx1 = marg; |
posx1 = marg; |
722 |
else { |
else { |
723 |
posx1 = posx0 + 2*marg; |
posx1 = posx0 + 2*marg; |
724 |
posx0 = posx1 + wrel; |
posx0 = posx1 + wrel; |
725 |
} |
} |
726 |
|
|
|
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; |
|
|
} |
|
|
|
|
|
|
|
727 |
/* -----------> pad for histograms */ |
/* -----------> pad for histograms */ |
728 |
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); |
729 |
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); |
730 |
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); |
731 |
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); |
732 |
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); |
733 |
if(n<5) pad6[n] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
} |
|
|
|
|
|
|
|
/* -----------> HISTOGRAMS */ |
|
|
|
|
|
tit<<"DSP "<<n+1; |
|
|
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(),tit.str().c_str(),401,-0.5,1200.5); |
|
|
landau2[n][ii]= new TH1F(oss2.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
|
|
landau3[n][ii]= new TH1F(oss3.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); |
|
|
|
|
|
illuminazione[n][ii]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); |
|
|
|
|
|
tit.str(""); |
|
|
oss1.str(""); |
|
|
oss2.str(""); |
|
|
oss3.str(""); |
|
|
oss4.str(""); |
|
|
}; |
|
|
|
|
|
|
|
|
// printf("\nprova0\n"); |
|
|
|
|
|
|
|
|
//********************************************************************************** |
|
|
// Fill Graphs and Histos |
|
|
//********************************************************************************** |
|
734 |
|
|
735 |
// |
// |
736 |
// information about the tracker data |
// Obtain information about the tracker data |
737 |
Int_t warning_dspnumber=0; |
// and fill graphs and histos |
738 |
Float_t x[MAXSTORAGE]; |
|
739 |
|
Int_t al=0; |
740 |
|
Double_t x[MAXSTORAGE]; |
741 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
742 |
Float_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
743 |
|
Int_t eventn[12]; |
744 |
|
|
745 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
746 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
747 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
748 |
|
cod = eh->GetCounter(); |
749 |
|
|
750 |
|
|
751 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
752 |
|
|
757 |
else{ |
else{ |
758 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
x[(ev-minev)]= ph->GetOrbitalTime(); |
759 |
ALARM=0; |
ALARM=0; |
|
|
|
760 |
Int_t dsp=0; |
Int_t dsp=0; |
761 |
|
Int_t noacq=0; |
762 |
|
Int_t acq_dsp[12]; |
763 |
|
ULong_t acq_info_tmp=0; |
764 |
|
if(cod->Get(pctp->RunHeader)>0) acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)-1]; |
765 |
|
else acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)]; |
766 |
|
for(Int_t io=0;io<12;io++){ |
767 |
|
acq_dsp[dsp]=(acq_info_tmp>>(12+io))&(~(~0<<1)); |
768 |
|
if(((acq_info_tmp>>(12+io))&(~(~0<<1)))==0) |
769 |
|
noacq+=1; |
770 |
|
WARNING[io]=0; |
771 |
|
} |
772 |
|
|
773 |
for(Int_t i=0; i<12; i++){ |
for(Int_t i=0; i<12; i++){ |
774 |
dsp=te->DSPnumber[i]-1; |
|
775 |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
if(i<12-noacq){ |
776 |
|
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
777 |
for(Int_t j=0;j<3;j++){ |
ALARM=1; |
778 |
if(te->signcluster[i][j]!=0){ |
break; |
779 |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
} |
780 |
// if((dsp==1 && te->addrcluster[i][2]>767 && te->addrcluster[i][2]<1024) || (dsp==6 && te->addrcluster[i][0]>511 && te->addrcluster[i][0]<769) ||(dsp==6 && te->addrcluster[i][1]>0 && te->addrcluster[i][1]<769) ||(dsp==6 && te->addrcluster[i][2]>511 && te->addrcluster[i][2]<769) ||(dsp==11 && te->addrcluster[i][0]>767 && te->addrcluster[i][0]<1024)); |
|
781 |
// else |
dsp=te->DSPnumber[i]-1; |
782 |
illuminazione[dsp][ii]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
783 |
|
|
784 |
|
// |
785 |
|
// Fill Cluster Signal and Lighting of the view histos |
786 |
|
for(Int_t j=0;j<3;j++){ |
787 |
|
if(te->signcluster[i][j]!=0){ |
788 |
|
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
789 |
|
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
790 |
|
} |
791 |
} |
} |
792 |
} |
} |
793 |
} |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
794 |
if(x[ev-minev]>HOBT[countHOBT+1]) |
if(!(dsp%2)){ |
795 |
countHOBT+=1; |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
796 |
if(trk_cal_us[countHOBT]!=104){ |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
797 |
if(!(dsp%2)){ |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
798 |
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
} |
799 |
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
else{ |
800 |
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
801 |
} |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
802 |
else{ |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
803 |
if(te->signcluster[i][0]!=0) landau1[dsp][ii]->Fill((Float_t)te->signcluster[i][0]); |
} |
|
if(te->signcluster[i][1]!=0) landau2[dsp][ii]->Fill((Float_t)te->signcluster[i][1]); |
|
|
if(te->signcluster[i][2]!=0) landau3[dsp][ii]->Fill((Float_t)te->signcluster[i][2]); |
|
|
} |
|
|
} |
|
|
|
|
|
WARNING[i]=0; |
|
|
if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ |
|
|
ALARM = 1; //general alarm |
|
|
WARNING[i] = 1; // DSP warning |
|
|
}; |
|
|
|
|
|
if(te->alarm[i]!=0){ // hardware alarm |
|
|
ALARM = 1; |
|
|
}; |
|
|
|
|
|
//************************************************************************************** |
|
|
// warning for internal number |
|
|
//************************************************************************************** |
|
|
if(i<=10){ |
|
|
if(te->eventn[i]!=te->eventn[i+1]){ |
|
|
warning_dspnumber++; |
|
|
warning<< "==> WARNING!! Check entry "<< ev<<" (DSP "<<dsp<<")" <<endl<< |
|
|
"eventn["<<i<<"]= "<<te->eventn[i]<<"!= eventn["<<i+1<<"]= "<< te->eventn[i+1]<<endl; |
|
804 |
} |
} |
|
else |
|
|
eventint[(ev-minev)]=te->eventn[0]; |
|
|
} |
|
|
} |
|
805 |
|
|
806 |
if(ev<=maxevent-1){ |
WARNING[i]=0; |
807 |
|
if(te->fc[i]!=0){ |
808 |
|
if(countFC[dsp]==0){ |
809 |
|
ALARM = 1; //general alarm |
810 |
|
WARNING[i] = 1; // DSP warning |
811 |
|
} |
812 |
|
countFC[dsp]+=1; |
813 |
|
}; |
814 |
|
|
815 |
if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1){ |
if(te->fl1[i]!=0){ |
816 |
warning_dspnumber++; |
if(countFL1[dsp]==0){ |
817 |
warning<< "==> WARNING!! Check entry "<< ev<<endl<< |
ALARM = 1; //general alarm |
818 |
" DSP event num.= "<< eventint[(ev-minev)]<< |
WARNING[i] = 1; // DSP warning |
819 |
" is different from (previus+1) ="<<eventint[(ev-minev)-1]+1 <<"\n"<<endl; |
} |
820 |
} |
countFL1[dsp]+=1; |
821 |
} |
}; |
822 |
|
|
823 |
|
if(te->fl2[i]!=0){ |
824 |
|
if(countFL2[dsp]==0){ |
825 |
|
ALARM = 1; //general alarm |
826 |
|
WARNING[i] = 1; // DSP warning |
827 |
|
} |
828 |
|
countFL2[dsp]+=1; |
829 |
|
}; |
830 |
|
|
831 |
|
if(te->fl3[i]!=0){ |
832 |
|
if(countFL3[dsp]==0){ |
833 |
|
ALARM = 1; //general alarm |
834 |
|
WARNING[i] = 1; // DSP warning |
835 |
|
} |
836 |
|
countFL3[dsp]+=1; |
837 |
|
}; |
838 |
|
|
839 |
|
if(te->fl4[i]!=0){ |
840 |
|
if(countFL4[dsp]==0){ |
841 |
|
ALARM = 1; //general alarm |
842 |
|
WARNING[i] = 1; // DSP warning |
843 |
|
} |
844 |
|
countFL4[dsp]+=1; |
845 |
|
}; |
846 |
|
|
847 |
|
if(te->fl5[i]!=0){ |
848 |
|
if(countFL5[dsp]==0){ |
849 |
|
ALARM = 1; //general alarm |
850 |
|
WARNING[i] = 1; // DSP warning |
851 |
|
} |
852 |
|
countFL5[dsp]+=1; |
853 |
|
}; |
854 |
|
|
855 |
|
if(te->fl6[i]!=0){ |
856 |
|
if(countFL6[dsp]==0){ |
857 |
|
ALARM = 1; //general alarm |
858 |
|
WARNING[i] = 1; // DSP warning |
859 |
|
} |
860 |
|
countFL6[dsp]+=1; |
861 |
|
}; |
862 |
|
|
863 |
|
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
864 |
|
if(countALARMy==0) |
865 |
|
ALARM = 1; |
866 |
|
countALARMy+=1; |
867 |
|
}; |
868 |
|
|
869 |
|
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
870 |
|
if(countALARMx==0) |
871 |
|
ALARM = 1; |
872 |
|
countALARMx+=1; |
873 |
|
}; |
874 |
|
|
875 |
|
//************************************************************************************** |
876 |
|
// warning for internal number |
877 |
|
//************************************************************************************** |
878 |
|
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
879 |
|
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
880 |
|
} |
881 |
|
} |
882 |
|
eventint[(ev-minev)]=te->eventn[0]; |
883 |
|
|
884 |
//******************************************************************************************** |
//******************************************************************************************** |
885 |
// file ALARM |
// file DSP warning |
886 |
//******************************************************************************************** |
//******************************************************************************************** |
887 |
|
|
888 |
if(ALARM==1) { |
if(ALARM==1) { |
889 |
|
al=1; |
890 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
891 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
892 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
893 |
alarm << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm << "Total events "<<nevent<<endl; |
894 |
|
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
895 |
alarm << "================================================="<< endl; |
alarm << "================================================="<< endl; |
896 |
|
|
897 |
alarm << " DSPn"; |
alarm << " DSPn"; |
898 |
alarm << " Event"; |
alarm << " Counter"; |
899 |
|
alarm << " previous"; |
900 |
alarm << " Words"; |
alarm << " Words"; |
901 |
alarm << " crc"; |
alarm << " crc"; |
902 |
alarm << " FC"; |
alarm << " FC"; |
909 |
|
|
910 |
for(Int_t i=0; i<12 ; i++){ |
for(Int_t i=0; i<12 ; i++){ |
911 |
alarm.width(5); alarm << te->DSPnumber[i]; |
alarm.width(5); alarm << te->DSPnumber[i]; |
912 |
alarm.width(6); alarm << te->eventn[i]; |
alarm.width(8); alarm << te->eventn[i]; |
913 |
|
alarm.width(8); alarm << eventn[i]; |
914 |
alarm.width(6); alarm << te->DATAlength[i]; |
alarm.width(6); alarm << te->DATAlength[i]; |
915 |
alarm.width(4); alarm << te->crc[i]; |
alarm.width(4); alarm << te->crc[i]; |
916 |
alarm.width(4); alarm << te->fc[i]; |
alarm.width(4); alarm << te->fc[i]; |
925 |
alarm << endl; |
alarm << endl; |
926 |
} |
} |
927 |
} |
} |
928 |
|
for(Int_t i=0; i<12 ; i++) |
929 |
|
eventn[i]=te->eventn[i]; |
930 |
|
} |
931 |
|
} |
932 |
|
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
933 |
|
if(maxev==maxevent-1) { |
934 |
|
if(countALARMy!=0){ |
935 |
|
if(countALARMy%6!=0) alarm << endl<<endl<< "***** "<<countALARMy/6+1 <<" events with hardware alarm in Y-view *****"<<endl; |
936 |
|
else alarm << endl<<endl<< "***** "<<countALARMy/6 <<" events with hardware alarm in Y-view *****"<<endl; |
937 |
|
} |
938 |
|
if(countALARMx!=0){ |
939 |
|
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
940 |
|
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
941 |
|
} |
942 |
|
for(int p=0; p<12; p++){ |
943 |
|
if(countFC[p]!=0) alarm << endl<<endl<< "***** "<<countFC[p] <<" events with fc!=0 in DSP "<<p+1<<" *****"<<endl; |
944 |
|
if(countFL1[p]!=0) alarm << endl<<endl<< "***** "<<countFL1[p] <<" events with fl1!=0 in DSP "<<p+1<<" *****"<<endl; |
945 |
|
if(countFL2[p]!=0) alarm << endl<<endl<< "***** "<<countFL2[p] <<" events with fl2!=0 in DSP "<<p+1<<" *****"<<endl; |
946 |
|
if(countFL3[p]!=0) alarm << endl<<endl<< "***** "<<countFL3[p] <<" events with fl3!=0 in DSP "<<p+1<<" *****"<<endl; |
947 |
|
if(countFL4[p]!=0) alarm << endl<<endl<< "***** "<<countFL4[p] <<" events with fl4!=0 in DSP "<<p+1<<" *****"<<endl; |
948 |
|
if(countFL5[p]!=0) alarm << endl<<endl<< "***** "<<countFL5[p] <<" events with fl5!=0 in DSP "<<p+1<<" *****"<<endl; |
949 |
|
if(countFL6[p]!=0) alarm << endl<<endl<< "***** "<<countFL6[p] <<" events with fl6!=0 in DSP "<<p+1<<" *****"<<endl; |
950 |
} |
} |
951 |
} |
} |
|
if(ALARM==0) alarm << endl<< "------> NO ALARM!!! <-------"<<endl; |
|
|
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
|
|
|
|
|
|
|
|
Float_t maxhist=0; |
|
|
TBox b; |
|
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
952 |
|
|
953 |
|
// |
954 |
|
// Draw the graphs |
955 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
956 |
Float_t yyc[maxev-minev]; |
Double_t yyc[maxev-minev]; |
957 |
for (Int_t v=0; v<maxev-minev; v++){ |
for (Int_t v=0; v<maxev-minev; v++){ |
958 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
959 |
} |
} |
|
|
|
|
LandauCanv1[ii]->cd(); |
|
|
pad1[i]->SetFillColor(10); |
|
|
pad1[i]->SetFrameFillColor(10); |
|
|
pad1[i]->Draw(); |
|
|
pad1[i]->cd(); |
|
|
landau1[i][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau1[i][ii]->GetXaxis()->CenterTitle(); |
|
|
landau1[i][ii]->Draw(""); |
|
|
LandauCanv1[ii]->Update(); |
|
|
|
|
|
LandauCanv2[ii]->cd(); |
|
|
pad4[i]->SetFillColor(10); |
|
|
pad4[i]->SetFrameFillColor(10); |
|
|
pad4[i]->Draw(); |
|
|
pad4[i]->cd(); |
|
|
landau2[i][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau2[i][ii]->GetXaxis()->CenterTitle(); |
|
|
landau2[i][ii]->Draw(""); |
|
|
LandauCanv2[ii]->Update(); |
|
|
|
|
|
LandauCanv3[ii]->cd(); |
|
|
pad5[i]->SetFillColor(10); |
|
|
pad5[i]->SetFrameFillColor(10); |
|
|
pad5[i]->Draw(); |
|
|
pad5[i]->cd(); |
|
|
landau3[i][ii]->GetXaxis()->SetTitle("max signal"); |
|
|
landau3[i][ii]->GetXaxis()->CenterTitle(); |
|
|
landau3[i][ii]->Draw(""); |
|
|
LandauCanv3[ii]->Update(); |
|
|
|
|
|
IlluminaCanv[ii]->cd(); |
|
|
pad2[i]->SetFillColor(10); |
|
|
pad2[i]->SetFrameFillColor(10); |
|
|
pad2[i]->SetLogy(); |
|
|
pad2[i]->Draw(); |
|
|
pad2[i]->cd(); |
|
|
illuminazione[i][ii]->GetXaxis()->SetTitle("strip with max signal"); |
|
|
illuminazione[i][ii]->GetXaxis()->CenterTitle(); |
|
|
illuminazione[i][ii]->Draw(""); |
|
|
if(i==1){ |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(2816.,0.,3060.,maxhist); |
|
|
} |
|
|
else if(i==6){ |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(2560.,0.,2816.,maxhist); |
|
|
b.DrawBox(512.,0.,768.,maxhist); |
|
|
b.DrawBox(1024.,0.,1792.,maxhist); |
|
|
} |
|
|
else if(i==11){ |
|
|
maxhist= illuminazione[i][ii]->GetMaximum(); |
|
|
b.DrawBox(768.,0.,1024.,maxhist); |
|
|
} |
|
|
IlluminaCanv[ii]->Update(); |
|
|
|
|
960 |
|
|
961 |
CompTimeCanv[ii]->cd(); |
CompTimeCanv[ii]->cd(); |
962 |
pad3[i]->SetFillColor(10); |
pad3[i]->SetFillColor(10); |
970 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
971 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
972 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
973 |
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); |
if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501); |
974 |
|
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
975 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
976 |
oss1.str(""); |
oss1.str(""); |
977 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |
978 |
}; |
} |
979 |
|
|
980 |
|
|
981 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
982 |
pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); |
pt = new TPad("pt"," ",0.02,0.01,1.,0.98,18,0,0); |
|
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[ii]->cd(); |
|
983 |
pt->SetFillColor(10); |
pt->SetFillColor(10); |
984 |
pt->SetFrameFillColor(10); |
pt->SetFrameFillColor(10); |
985 |
pt->Draw(); |
pt->Draw(); |
986 |
pt->cd(); |
pt->cd(); |
987 |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
988 |
eventnumb[ii]->SetTitle(""); |
eventnumb[ii]->SetTitle(""); |
989 |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.04); |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.02); |
990 |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.03); |
991 |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
992 |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
993 |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
994 |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.2); |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.1); |
995 |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.04); |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.02); |
996 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
997 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
998 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
999 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(1.5); |
if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501); |
1000 |
|
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
1001 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
1002 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
1003 |
eventnumb[ii]->SetMarkerSize(0.3); |
eventnumb[ii]->SetMarkerSize(0.2); |
1004 |
|
oss1.str(""); |
1005 |
|
oss1<<"number of events in this graph: "<<maxev-minev; |
1006 |
|
t->SetTextColor(kBlue); |
1007 |
|
t->SetTextSize(0.02); |
1008 |
|
double xtex=0,ytex=0; |
1009 |
|
xtex=x[maxev-minev-1]-(x[maxev-minev-1]-x[0])/3; |
1010 |
|
ytex=1000.+eventnumb[ii]->GetYaxis()->GetXmax(); |
1011 |
|
t->DrawLatex(xtex,ytex,oss1.str().c_str()); |
1012 |
|
oss1.str(""); |
1013 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
1014 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
|
|
|
|
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(); |
|
|
} |
|
1015 |
|
|
1016 |
minev=maxev; |
minev=maxev; |
1017 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
1018 |
countrun=ii+1; |
cntpgdat=ii+1; |
1019 |
break; |
break; |
1020 |
} |
} |
1021 |
|
|
|
warning.close(); |
|
1022 |
} |
} |
1023 |
|
|
|
//***************************************** |
|
|
//close all files |
|
|
//***************************************** |
|
1024 |
alarm.close(); |
alarm.close(); |
1025 |
|
|
1026 |
|
//**************************************************************************************** |
1027 |
|
//Cluster Signal ladder1 Output Pages |
1028 |
|
//**************************************************************************************** |
1029 |
|
|
1030 |
|
fromfile.str(""); |
1031 |
|
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
1032 |
|
isfile<<"Cluster Signal ladder1"; |
1033 |
|
LandauCanv1=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
1034 |
|
LandauCanv1->SetFillColor(10); |
1035 |
|
LandauCanv1->Range(0,0,100,100); |
1036 |
|
|
1037 |
|
t->SetTextFont(32); |
1038 |
|
t->SetTextColor(1); |
1039 |
|
t->SetTextAlign(12); |
1040 |
|
t->SetTextSize(0.02); |
1041 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
1042 |
|
t1->SetTextFont(32); |
1043 |
|
t1->SetTextColor(1); |
1044 |
|
t1->SetTextAlign(12); |
1045 |
|
t1->SetTextSize(0.02); |
1046 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1047 |
|
isfile.str(""); |
1048 |
|
|
1049 |
|
//**************************************************************************************** |
1050 |
|
//Cluster Signal ladder2 Output Pages |
1051 |
|
//**************************************************************************************** |
1052 |
|
|
1053 |
|
isfile<<"Cluster Signal ladder2"; |
1054 |
|
LandauCanv2=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
1055 |
|
LandauCanv2->SetFillColor(10); |
1056 |
|
LandauCanv2->Range(0,0,100,100); |
1057 |
|
|
1058 |
|
t->SetTextFont(32); |
1059 |
|
t->SetTextColor(1); |
1060 |
|
t->SetTextAlign(12); |
1061 |
|
t->SetTextSize(0.02); |
1062 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
1063 |
|
t1->SetTextFont(32); |
1064 |
|
t1->SetTextColor(1); |
1065 |
|
t1->SetTextAlign(12); |
1066 |
|
t1->SetTextSize(0.02); |
1067 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1068 |
|
isfile.str(""); |
1069 |
|
|
1070 |
|
//**************************************************************************************** |
1071 |
|
//Cluster Signal ladder3 Output Pages |
1072 |
|
//**************************************************************************************** |
1073 |
|
|
1074 |
|
isfile<<"Cluster Signal ladder3"; |
1075 |
|
LandauCanv3=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
1076 |
|
LandauCanv3->SetFillColor(10); |
1077 |
|
LandauCanv3->Range(0,0,100,100); |
1078 |
|
|
1079 |
|
t->SetTextFont(32); |
1080 |
|
t->SetTextColor(1); |
1081 |
|
t->SetTextAlign(12); |
1082 |
|
t->SetTextSize(0.02); |
1083 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
1084 |
|
t1->SetTextFont(32); |
1085 |
|
t1->SetTextColor(1); |
1086 |
|
t1->SetTextAlign(12); |
1087 |
|
t1->SetTextSize(0.02); |
1088 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1089 |
|
isfile.str(""); |
1090 |
|
|
1091 |
|
//**************************************************************************************** |
1092 |
|
//Lighting of the views Output Pages |
1093 |
|
//**************************************************************************************** |
1094 |
|
|
1095 |
|
isfile<<"lighting of the views"; |
1096 |
|
IlluminaCanv=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
1097 |
|
IlluminaCanv->SetFillColor(10); |
1098 |
|
IlluminaCanv->Range(0,0,100,100); |
1099 |
|
t->SetTextFont(32); |
1100 |
|
t->SetTextColor(1); |
1101 |
|
t->SetTextAlign(12); |
1102 |
|
t->SetTextSize(0.02); |
1103 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
1104 |
|
t1->SetTextFont(32); |
1105 |
|
t1->SetTextColor(1); |
1106 |
|
t1->SetTextAlign(12); |
1107 |
|
t1->SetTextSize(0.02); |
1108 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
1109 |
|
isfile.str(""); |
1110 |
|
|
1111 |
|
// |
1112 |
|
// Draw the histos |
1113 |
|
for (Int_t i=0; i<12 ; i++){ |
1114 |
|
|
1115 |
|
TBox b; |
1116 |
|
|
1117 |
|
Float_t maxhist=0,va1x=0; |
1118 |
|
LandauCanv1->cd(); |
1119 |
|
pad1[i]->SetFillColor(10); |
1120 |
|
pad1[i]->SetFrameFillColor(10); |
1121 |
|
pad1[i]->Draw(); |
1122 |
|
pad1[i]->cd(); |
1123 |
|
landau1[i]->GetXaxis()->SetTitle("max signal"); |
1124 |
|
landau1[i]->GetXaxis()->CenterTitle(); |
1125 |
|
landau1[i]->Draw(""); |
1126 |
|
LandauCanv1->Update(); |
1127 |
|
|
1128 |
|
LandauCanv2->cd(); |
1129 |
|
pad4[i]->SetFillColor(10); |
1130 |
|
pad4[i]->SetFrameFillColor(10); |
1131 |
|
pad4[i]->Draw(); |
1132 |
|
pad4[i]->cd(); |
1133 |
|
landau2[i]->GetXaxis()->SetTitle("max signal"); |
1134 |
|
landau2[i]->GetXaxis()->CenterTitle(); |
1135 |
|
landau2[i]->Draw(""); |
1136 |
|
LandauCanv2->Update(); |
1137 |
|
|
1138 |
|
LandauCanv3->cd(); |
1139 |
|
pad5[i]->SetFillColor(10); |
1140 |
|
pad5[i]->SetFrameFillColor(10); |
1141 |
|
pad5[i]->Draw(); |
1142 |
|
pad5[i]->cd(); |
1143 |
|
landau3[i]->GetXaxis()->SetTitle("max signal"); |
1144 |
|
landau3[i]->GetXaxis()->CenterTitle(); |
1145 |
|
landau3[i]->Draw(""); |
1146 |
|
LandauCanv3->Update(); |
1147 |
|
|
1148 |
|
|
1149 |
|
li.SetLineColor(38); |
1150 |
|
li.SetLineStyle(4); |
1151 |
|
li.SetLineWidth(2); |
1152 |
|
liva1.SetLineColor(42); |
1153 |
|
liva1.SetLineStyle(3); |
1154 |
|
liva1.SetLineWidth(1); |
1155 |
|
|
1156 |
|
IlluminaCanv->cd(); |
1157 |
|
pad2[i]->SetFillColor(10); |
1158 |
|
pad2[i]->SetFrameFillColor(10); |
1159 |
|
pad2[i]->SetLogy(); |
1160 |
|
pad2[i]->Draw(); |
1161 |
|
pad2[i]->cd(); |
1162 |
|
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
1163 |
|
illuminazione[i]->GetXaxis()->CenterTitle(); |
1164 |
|
illuminazione[i]->Draw(""); |
1165 |
|
maxhist= illuminazione[i]->GetMaximum(); |
1166 |
|
if(i==0){ |
1167 |
|
b.SetFillColor(107); |
1168 |
|
b.SetFillStyle(3954); |
1169 |
|
b.DrawBox(256.,0.,384.,maxhist); |
1170 |
|
b.DrawBox(768.,0.,2047.,maxhist); |
1171 |
|
} |
1172 |
|
else if(i==1){ |
1173 |
|
b.SetFillColor(6); |
1174 |
|
b.SetFillStyle(3945); |
1175 |
|
b.DrawBox(2944.,0.,3070.,maxhist); |
1176 |
|
|
1177 |
|
b.SetFillColor(107); |
1178 |
|
b.SetFillStyle(3954); |
1179 |
|
b.DrawBox(384.,0.,512.,maxhist); |
1180 |
|
b.DrawBox(2048.,0.,2432.,maxhist); |
1181 |
|
b.DrawBox(2816.,0.,2944.,maxhist); |
1182 |
|
} |
1183 |
|
else if(i==3){ |
1184 |
|
b.SetFillColor(107); |
1185 |
|
b.SetFillStyle(3954); |
1186 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
1187 |
|
} |
1188 |
|
else if(i==4){ |
1189 |
|
b.SetFillColor(107); |
1190 |
|
b.SetFillStyle(3954); |
1191 |
|
b.DrawBox(256.,0.,512.,maxhist); |
1192 |
|
b.DrawBox(2816.,0.,3070.,maxhist); |
1193 |
|
} |
1194 |
|
else if(i==6){ |
1195 |
|
b.SetFillColor(6); |
1196 |
|
b.SetFillStyle(3945); |
1197 |
|
b.DrawBox(1024.,0.,1280.,maxhist); |
1198 |
|
|
1199 |
|
b.SetFillColor(107); |
1200 |
|
b.SetFillStyle(3954); |
1201 |
|
b.DrawBox(512.,0.,768.,maxhist); |
1202 |
|
b.DrawBox(1280.,0.,1792.,maxhist); |
1203 |
|
b.DrawBox(2560.,0.,2816.,maxhist); |
1204 |
|
} |
1205 |
|
else if(i==7){ |
1206 |
|
b.SetFillColor(107); |
1207 |
|
b.SetFillStyle(3954); |
1208 |
|
b.DrawBox(512.,0.,768.,maxhist); |
1209 |
|
b.DrawBox(896.,0.,1535.,maxhist); |
1210 |
|
} |
1211 |
|
else if(i==8){ |
1212 |
|
b.SetFillColor(107); |
1213 |
|
b.SetFillStyle(3954); |
1214 |
|
b.DrawBox(512.,0.,768.,maxhist); |
1215 |
|
} |
1216 |
|
else if(i==9){ |
1217 |
|
b.SetFillColor(107); |
1218 |
|
b.SetFillStyle(3954); |
1219 |
|
b.DrawBox(256.,0.,384.,maxhist); |
1220 |
|
b.DrawBox(1280.,0.,1535.,maxhist); |
1221 |
|
b.DrawBox(1792.,0.,1920.,maxhist); |
1222 |
|
} |
1223 |
|
else if(i==10){ |
1224 |
|
b.SetFillColor(107); |
1225 |
|
b.SetFillStyle(3954); |
1226 |
|
b.DrawBox(1024.,0.,1152.,maxhist); |
1227 |
|
b.DrawBox(2048.,0.,3070.,maxhist); |
1228 |
|
} |
1229 |
|
else if(i==11){ |
1230 |
|
b.SetFillColor(6); |
1231 |
|
b.SetFillStyle(3945); |
1232 |
|
b.DrawBox(768.,0.,1024.,maxhist); |
1233 |
|
|
1234 |
|
b.SetFillColor(107); |
1235 |
|
b.SetFillStyle(3954); |
1236 |
|
b.DrawBox(0.,0.,512.,maxhist); |
1237 |
|
b.DrawBox(1920.,0.,2560.,maxhist); |
1238 |
|
} |
1239 |
|
for(int va=1; va<24; va++){ |
1240 |
|
va1x=128*va; |
1241 |
|
liva1.DrawLine(va1x,0.,va1x,maxhist); |
1242 |
|
} |
1243 |
|
li.DrawLine(1024.5,0,1024.5,maxhist); |
1244 |
|
li.DrawLine(2048.5,0,2048.5,maxhist); |
1245 |
|
IlluminaCanv->Update(); |
1246 |
|
} |
1247 |
|
|
1248 |
printf("... end of packets. \n"); |
printf("... end of packets. \n"); |
1249 |
|
|
1250 |
//************************************************************************* |
//************************************************************************* |
1251 |
// Save output Files |
// Save output Files |
1252 |
//************************************************************************* |
//************************************************************************* |
1253 |
stringstream out1,out2,out3,command; |
stringstream out1,out2,out3,command; |
1254 |
|
Int_t totpg=0; |
1255 |
for(Int_t fl=0;fl<countrun;fl++){ |
if(cntpgtemp>cntpgdat) totpg=cntpgtemp; |
1256 |
|
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
1257 |
|
|
1258 |
|
for(Int_t fl=0;fl<totpg;fl++){ |
1259 |
|
|
1260 |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
1261 |
out1.str(""); |
out1.str(""); |
1262 |
out2.str(""); |
out2.str(""); |
1266 |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
out2<<ffile<<"_FTrkQLook_EXPERT.ps"; |
1267 |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; |
1268 |
|
|
1269 |
if(countrun==1){ |
if(totpg==1){ |
1270 |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
1271 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1272 |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1273 |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
BfieldCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1274 |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
1275 |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
1276 |
TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
1277 |
|
IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); |
1278 |
} |
} |
1279 |
else if(countrun>=1){ |
else if(totpg>1){ |
1280 |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
1281 |
else CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl>0 && fl<cntpgdat) CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1282 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1283 |
LandauCanv1[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgmag) BfieldCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1284 |
LandauCanv2[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
1285 |
LandauCanv3[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl==totpg-1){ |
1286 |
IlluminaCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
1287 |
if(fl!=countrun-1) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
1288 |
else TempCanv[fl]->Print(out+out3.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
1289 |
|
IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); |
1290 |
|
} |
1291 |
} |
} |
1292 |
} |
} |
1293 |
else{ |
else{ |
1294 |
out1.str(""); |
out1.str(""); |
1295 |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
1296 |
CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
1297 |
|
out1.str(""); |
1298 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-BField-pag"<<fl+1<<"."<<outfile.Data(); |
1299 |
|
if(fl<cntpgmag) BfieldCanv[fl]->Print(out+out1.str().c_str()); |
1300 |
out1.str(""); |
out1.str(""); |
1301 |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
1302 |
TempCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out1.str().c_str()); |
1303 |
out1.str(""); |
out1.str(""); |
1304 |
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); |
1305 |
EventNumCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out1.str().c_str()); |
1306 |
out1.str(""); |
if(fl==totpg-1){ |
1307 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1308 |
LandauCanv1[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1."<<outfile.Data(); |
1309 |
out1.str(""); |
LandauCanv1->Print(out+out1.str().c_str()); |
1310 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1311 |
LandauCanv2[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2."<<outfile.Data(); |
1312 |
out1.str(""); |
LandauCanv2->Print(out+out1.str().c_str()); |
1313 |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1314 |
LandauCanv3[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3."<<outfile.Data(); |
1315 |
out1.str(""); |
LandauCanv3->Print(out+out1.str().c_str()); |
1316 |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting-pag"<<fl+1<<"."<<outfile.Data(); |
out1.str(""); |
1317 |
IlluminaCanv[fl]->Print(out+out1.str().c_str()); |
out1<<ffile<<"_FTrkQLook_EXPERT-Lighting."<<outfile.Data(); |
1318 |
|
IlluminaCanv->Print(out+out1.str().c_str()); |
1319 |
|
} |
1320 |
} |
} |
1321 |
} |
} |
1322 |
|
|
1323 |
|
// |
1324 |
|
// Convert ps to pdf if required |
1325 |
if(!strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"pdf")){ |
1326 |
stringstream com; |
stringstream com; |
1327 |
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; |
1334 |
com.str(""); |
com.str(""); |
1335 |
} |
} |
1336 |
|
|
|
command.str(""); |
|
|
command<<"rm -f "<<out<<"warning.txt"; |
|
|
system(command.str().c_str()); |
|
|
|
|
1337 |
gROOT->Reset(); |
gROOT->Reset(); |
1338 |
return; |
return; |
1339 |
} |
} |