2 |
* FTrkScanQlook_EXPERT.cxx |
* FTrkScanQlook_EXPERT.cxx |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version v1r04 |
* version v1r06 |
6 |
* Parameters: |
* Parameters: |
7 |
* file - the path to the root file to analyze |
* file - the path to the root file to analyze |
8 |
* outdir - total path of output file |
* outdir - total path of output file |
123 |
|
|
124 |
// |
// |
125 |
// obtain information about the data file and select the output file |
// obtain information about the data file and select the output file |
|
const string filepath=file.Data(); |
|
126 |
Int_t dwpos = file.Last('/'); |
Int_t dwpos = file.Last('/'); |
127 |
Int_t dwpos1 = file.Last('.'); |
Int_t dwpos1 = file.Last('.'); |
128 |
TString base,ffile ; |
TString base,ffile ; |
173 |
printf(" Number of Header Entries: %d\n",neventH); |
printf(" Number of Header Entries: %d\n",neventH); |
174 |
|
|
175 |
Long64_t obt=0; |
Long64_t obt=0; |
176 |
|
Int_t ev[2]; |
177 |
|
TString cal=""; |
178 |
|
|
179 |
|
ev[0]=0; |
180 |
|
ev[1]=0; |
181 |
for(Int_t i=0;i<neventH;i++){ |
for(Int_t i=0;i<neventH;i++){ |
182 |
otr->GetEntry(i); |
otr->GetEntry(i); |
183 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
184 |
if(reh->TRK_CALIB_USED!=104){ |
if(reh->TRK_CALIB_USED!=104){ |
185 |
obt = pH->GetOrbitalTime(); |
obt = pH->GetOrbitalTime(); |
186 |
|
cal="Event with online calibration"; |
187 |
break; |
break; |
188 |
} |
} |
189 |
if(i==neventH-1){ |
if(i==neventH-1){ |
190 |
printf("\n\n ****** ONLINE CALIBRATION NOT FOUND IN THIS FILE ******\n\n"); |
cal="***** ONLINE CALIBRATION NOT FOUND IN THIS FILE *****"; |
191 |
return; |
ev[0]=2; |
192 |
|
ev[1]=3; |
193 |
} |
} |
194 |
} |
} |
195 |
Int_t ev[2]; |
if(ev[0]==0){ |
196 |
for(Int_t i=0;i<nevents;i++){ |
for(Int_t i=0;i<nevents;i++){ |
197 |
tr->GetEntry(i); |
tr->GetEntry(i); |
198 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
199 |
if(ph->GetOrbitalTime()>obt){ |
if(ph->GetOrbitalTime()>obt){ |
200 |
ev[0]=i+2; |
ev[0]=i+2; |
201 |
ev[1]=i+3; |
ev[1]=i+3; |
202 |
break; |
break; |
203 |
|
} |
204 |
} |
} |
205 |
} |
} |
206 |
|
|
212 |
|
|
213 |
for(Int_t e=0;e<2;e++){ |
for(Int_t e=0;e<2;e++){ |
214 |
event=ev[e]; |
event=ev[e]; |
215 |
printf("Scan of Entry %d\n",event-1); |
printf("Scan of Entry %d\n",event); |
216 |
|
|
217 |
tr->GetEntry(event-1); |
tr->GetEntry(event); |
218 |
//============================================================================ |
//============================================================================ |
219 |
|
|
220 |
gStyle->SetLabelSize(0.06,"x"); |
gStyle->SetLabelSize(0.06,"x"); |
236 |
c1[e]->SetFillColor(10); |
c1[e]->SetFillColor(10); |
237 |
c1[e]->Range(0,0,1,1); |
c1[e]->Range(0,0,1,1); |
238 |
stringstream fromfile; |
stringstream fromfile; |
239 |
fromfile<<"FTrkScanQLook_EXPERT File: "<<ffile<<" ----> Entry "<<event-1; |
fromfile<<"FTrkScanQLook_EXPERT File: "<<ffile<<" ----> Entry "<<event; |
240 |
TLatex *t=new TLatex(); |
TLatex *t=new TLatex(); |
241 |
t->SetTextFont(32); |
t->SetTextFont(32); |
242 |
t->SetTextColor(1); |
t->SetTextColor(1); |
243 |
t->SetTextAlign(12); |
t->SetTextAlign(12); |
244 |
t->SetTextSize(0.02); |
t->SetTextSize(0.02); |
245 |
t->DrawLatex(0.02,0.98,fromfile.str().c_str()); |
t->DrawLatex(0.02,0.98,fromfile.str().c_str()); |
246 |
|
t->DrawLatex(0.60,0.98,cal.Data()); |
247 |
|
|
248 |
// draw pads |
// draw pads |
249 |
TPad *trkpad[12]; //pad for histos |
TPad *trkpad[12]; //pad for histos |