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