| 1 |
|
|
| 2 |
/** |
/** |
| 3 |
* FTrkQLook_EXPERT |
* FTrkQLook_EXPERT.cxx |
| 4 |
* |
* |
| 5 |
* autor: D.Fedele |
* autor: D.Fedele |
| 6 |
* version 3.0 |
* version v1r27 |
| 7 |
* Parameters: |
* Parameters: |
| 8 |
* file - the data file to analyze |
* file - the data file to analyze |
| 9 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
| 20 |
#include <TLatex.h> |
#include <TLatex.h> |
| 21 |
#include <TCanvas.h> |
#include <TCanvas.h> |
| 22 |
#include <TGraph.h> |
#include <TGraph.h> |
| 23 |
|
#include <TFile.h> |
| 24 |
#include <TTree.h> |
#include <TTree.h> |
| 25 |
#include <TStyle.h> |
#include <TStyle.h> |
| 26 |
// |
// |
| 31 |
#include <TrkAlarmEvent.h> |
#include <TrkAlarmEvent.h> |
| 32 |
#include <tsbt/TsbTRecord.h> |
#include <tsbt/TsbTRecord.h> |
| 33 |
#include <tsbt/TsbTEvent.h> |
#include <tsbt/TsbTEvent.h> |
| 34 |
|
#include <tsbb/TsbBRecord.h> |
| 35 |
|
#include <tsbb/TsbBEvent.h> |
| 36 |
#include <EventCounter.h> |
#include <EventCounter.h> |
| 37 |
#include <PacketType.h> |
#include <PacketType.h> |
| 38 |
// |
// |
| 39 |
#define MAXSTORAGE 50000 |
#define MAXSTORAGE 50000 |
| 40 |
|
|
|
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); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
| 41 |
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) |
| 42 |
{ |
{ |
| 43 |
// |
// |
| 44 |
// obtain information about the data file and select the output dir |
// obtain information about the data file and select the output dir |
| 45 |
const string filepath=file.Data(); |
Int_t dwpos = file.Last('/'); |
| 46 |
Int_t dwpos = filepath.rfind("/"); |
Int_t dwpos1 = file.Last('.'); |
|
Int_t dwpos1 = filepath.find(".root"); |
|
|
TString fpath=(filepath.c_str()); |
|
| 47 |
TString base,ffile ; |
TString base,ffile ; |
| 48 |
stringcopy(ffile,fpath,dwpos+1,dwpos1); |
ffile=file(dwpos+1,dwpos1-(dwpos+1)); |
| 49 |
stringcopy(base,fpath,0,dwpos); |
if(dwpos>0) base=file(0,dwpos); |
|
if(dwpos>0) base+="/"; |
|
| 50 |
|
|
| 51 |
TString out; |
TString out; |
| 52 |
if(outdir.Length()==0){ |
if(outdir.Length()==0){ |
| 54 |
}else{ |
}else{ |
| 55 |
out = outdir; |
out = outdir; |
| 56 |
} |
} |
| 57 |
|
if(out.Last('/')+1<out.Length()) out+="/"; |
| 58 |
|
|
| 59 |
// |
// |
| 60 |
// inizialise the variables and open the file |
// inizialise the variables and open the file |
| 61 |
pamela::TsbTEvent *event = 0; |
pamela::TsbTEvent *event = 0; |
| 62 |
pamela::TsbTRecord *record = 0; |
pamela::TsbTRecord *record = 0; |
| 63 |
|
pamela::TsbBEvent *Bevent = 0; |
| 64 |
|
pamela::TsbBRecord *Brecord = 0; |
| 65 |
pamela::tracker::TrackerEvent *te=0; |
pamela::tracker::TrackerEvent *te=0; |
| 66 |
pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0; |
pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0,*eB=0; |
| 67 |
pamela::PscuHeader *ph=0,*pH=0; |
pamela::PscuHeader *ph=0,*pH=0; |
| 68 |
pamela::TrkAlarmEvent *al=0; |
pamela::TrkAlarmEvent *al=0; |
| 69 |
pamela::RunHeaderEvent *reh=0; |
pamela::RunHeaderEvent *reh=0; |
| 81 |
tree->SetBranchAddress("TsbT",&event); |
tree->SetBranchAddress("TsbT",&event); |
| 82 |
tree->SetBranchAddress("Header",&eT); |
tree->SetBranchAddress("Header",&eT); |
| 83 |
|
|
| 84 |
|
TTree *Btree = (TTree*)datafile->Get("TsbB"); |
| 85 |
|
Btree->SetBranchAddress("TsbB",&Bevent); |
| 86 |
|
Btree->SetBranchAddress("Header",&eB); |
| 87 |
|
|
| 88 |
TTree *altr = (TTree*)datafile->Get("TrkAlarm"); |
TTree *altr = (TTree*)datafile->Get("TrkAlarm"); |
| 89 |
altr->SetBranchAddress("TrkAlarm",&al); |
altr->SetBranchAddress("TrkAlarm",&al); |
| 90 |
altr->SetBranchAddress("Header",&aleh); |
altr->SetBranchAddress("Header",&aleh); |
| 100 |
Long64_t nevent = tr->GetEntries(); |
Long64_t nevent = tr->GetEntries(); |
| 101 |
Long64_t neventH = otr->GetEntries(); |
Long64_t neventH = otr->GetEntries(); |
| 102 |
Long64_t tnevent = tree->GetEntries(); |
Long64_t tnevent = tree->GetEntries(); |
| 103 |
|
Long64_t bnevent = Btree->GetEntries(); |
| 104 |
Long64_t alnevent = altr->GetEntries(); |
Long64_t alnevent = altr->GetEntries(); |
| 105 |
Int_t minevent=0; |
Int_t minevent=0; |
| 106 |
Int_t maxevent=0; |
Int_t maxevent=0; |
| 108 |
printf("Number of total events: %lld\n",nevent); |
printf("Number of total events: %lld\n",nevent); |
| 109 |
printf("Number of header events: %lld\n",neventH); |
printf("Number of header events: %lld\n",neventH); |
| 110 |
printf("Number of TsbT events: %lld\n",tnevent); |
printf("Number of TsbT events: %lld\n",tnevent); |
| 111 |
|
printf("Number of TsbB events: %lld\n",bnevent); |
| 112 |
printf("Number of TrkAlarm packet events: %lld\n",alnevent); |
printf("Number of TrkAlarm packet events: %lld\n",alnevent); |
| 113 |
|
|
| 114 |
if (nevent<=0){ |
if (nevent<=0){ |
| 137 |
} else if (toevent > nevent) { |
} else if (toevent > nevent) { |
| 138 |
maxevent = nevent; |
maxevent = nevent; |
| 139 |
} else { |
} else { |
| 140 |
maxevent = toevent+1; |
maxevent = nevent; |
| 141 |
} |
} |
| 142 |
nevent=maxevent-minevent ; |
nevent=maxevent-minevent ; |
| 143 |
} |
} |
| 144 |
|
|
| 145 |
// |
// |
| 146 |
// information about the RunHeader |
// information about the RunHeader |
| 147 |
ULong64_t HOBT[neventH]; |
ULong_t HOBT[neventH]; |
| 148 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
| 149 |
|
ULong_t acq_info[neventH]; |
| 150 |
|
Int_t countnboot=1; |
| 151 |
for (Int_t vi=0; vi<neventH;vi++){ |
for (Int_t vi=0; vi<neventH;vi++){ |
| 152 |
HOBT[vi]=0; |
HOBT[vi]=0; |
| 153 |
trk_cal_us[vi]=0; |
trk_cal_us[vi]=0; |
| 154 |
|
acq_info[vi]=0; |
| 155 |
} |
} |
| 156 |
for (Int_t ev=0; ev<neventH; ev++){ |
for (Int_t ev=0; ev<neventH; ev++){ |
| 157 |
otr->GetEntry(ev); |
otr->GetEntry(ev); |
| 158 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
| 159 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
| 160 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
| 161 |
|
acq_info[ev]=reh->ACQ_BUILD_INFO; |
| 162 |
|
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
| 163 |
|
countnboot+=1; |
| 164 |
} |
} |
| 165 |
|
countnboot+=(Int_t)(2*nevent/MAXSTORAGE); |
| 166 |
|
// printf("\ncountnboot=%d\n",countnboot); |
| 167 |
|
|
| 168 |
// |
// |
| 169 |
// other variables definitions |
// other variables definitions |
| 170 |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; |
| 180 |
maxsize+=tmpSize; |
maxsize+=tmpSize; |
| 181 |
} |
} |
| 182 |
const Int_t tsize=maxsize; |
const Int_t tsize=maxsize; |
| 183 |
Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; |
Int_t tempt[tsize][5]; |
| 184 |
Int_t countnboot=1; |
ULong_t xt[tsize]; |
| 185 |
|
|
| 186 |
|
Int_t cntpgtemp=1,cntpgdat=0,cntpgmag=0; |
| 187 |
// |
// |
| 188 |
// information about the temperatures |
// information about the temperatures |
| 189 |
for (Int_t ev=0; ev<tnevent; ev++){ |
for (Int_t ev=0; ev<tnevent; ev++){ |
| 193 |
record = (pamela::TsbTRecord*)event->Records->At(j); |
record = (pamela::TsbTRecord*)event->Records->At(j); |
| 194 |
xt[siztmp]=record->RECORD_OBT; |
xt[siztmp]=record->RECORD_OBT; |
| 195 |
if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) |
if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) |
| 196 |
countnboot+=1; |
cntpgtemp+=1; |
| 197 |
|
|
| 198 |
for (Int_t z = 0; z < 5; z++){ |
for (Int_t z = 0; z < 5; z++){ |
| 199 |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
tempt[siztmp][z] = record->TEMPERATURES[z+1]; |
| 201 |
siztmp++; |
siztmp++; |
| 202 |
} |
} |
| 203 |
} |
} |
| 204 |
countnboot+=2*(Int_t)nevent/MAXSTORAGE; |
|
| 205 |
// printf("\ncountnboot=%d\n",countnboot); |
// |
| 206 |
|
// information about the entries for the magnetic field |
| 207 |
|
if(bnevent>0) cntpgmag=1; |
| 208 |
|
maxsize=0; |
| 209 |
|
for (Int_t ev=0; ev<bnevent; ev++){ |
| 210 |
|
Btree->GetEntry(ev); |
| 211 |
|
tmpSize = Bevent->Records->GetEntries(); |
| 212 |
|
maxsize+=tmpSize; |
| 213 |
|
} |
| 214 |
|
const Int_t bsize=maxsize; |
| 215 |
|
Int_t magt[bsize][5]; |
| 216 |
|
ULong_t xb[bsize]; |
| 217 |
|
siztmp=0; |
| 218 |
|
// |
| 219 |
|
// information about the magnetic field |
| 220 |
|
for (Int_t ev=0; ev<bnevent; ev++){ |
| 221 |
|
Btree->GetEntry(ev); |
| 222 |
|
tmpSize = Bevent->Records->GetEntries(); |
| 223 |
|
for (Int_t j = 0; j < tmpSize; j++){ |
| 224 |
|
Brecord = (pamela::TsbBRecord*)Bevent->Records->At(j); |
| 225 |
|
xb[siztmp]=Brecord->RECORD_OBT; |
| 226 |
|
if((xb[siztmp]<xb[siztmp-1]) && siztmp>0) |
| 227 |
|
cntpgmag+=1; |
| 228 |
|
for (Int_t z = 0; z < 5; z++){ |
| 229 |
|
magt[siztmp][z] = Brecord->B_FIELD[z+1]; |
| 230 |
|
} |
| 231 |
|
siztmp++; |
| 232 |
|
} |
| 233 |
|
} |
| 234 |
|
|
| 235 |
// |
// |
| 236 |
// open the output text files for the alarms |
// open the output text files for the alarms |
| 250 |
// write the file for the TrkAlarm packet |
// write the file for the TrkAlarm packet |
| 251 |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
if(alnevent==0) alarm1 <<endl<< "------> NO ALARM!!! <-------"<< endl; |
| 252 |
else{ |
else{ |
| 253 |
Long64_t obt=0; |
ULong_t obt=0; |
| 254 |
for (Int_t ev=0; ev<alnevent; ev++){ |
for (Int_t ev=0; ev<alnevent; ev++){ |
| 255 |
altr->GetEntry(ev); |
altr->GetEntry(ev); |
| 256 |
ph = aleh->GetPscuHeader(); |
ph = aleh->GetPscuHeader(); |
| 257 |
|
|
| 258 |
if(ph->GetOrbitalTime()<obt && ev>0) |
if((ULong_t)ph->GetOrbitalTime()<obt && ev>0) |
| 259 |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
alarm1<<endl<<"NEW CPU BOOT"<<endl; |
| 260 |
obt=ph->GetOrbitalTime(); |
obt=ph->GetOrbitalTime(); |
| 261 |
|
|
| 262 |
alarm1 << "================================================="<< endl; |
alarm1 << "================================================="<< endl; |
| 263 |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; |
| 264 |
alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm1 << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
| 265 |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; |
| 266 |
alarm1 << "================================================="<< endl<<endl; |
alarm1 << "================================================="<< endl<<endl; |
| 267 |
|
|
| 268 |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
alarm1 << "Alarm variables (range 0-1)"<<endl; |
| 269 |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[1]<<endl; |
alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[0]<<endl; |
| 270 |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[2]<<endl; |
alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[1]<<endl; |
| 271 |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; |
| 272 |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; |
| 273 |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; |
| 325 |
|
|
| 326 |
// |
// |
| 327 |
// Define output canvas, histos and graphs |
// Define output canvas, histos and graphs |
| 328 |
TCanvas *CompTimeCanv[countnboot],*EventNumCanv[countnboot],*TempCanv[countnboot]; |
TCanvas *CompTimeCanv[countnboot],*EventNumCanv[countnboot],*TempCanv[cntpgtemp],*BfieldCanv[cntpgmag]; |
| 329 |
TCanvas *IlluminaCanv,*LandauCanv1,*LandauCanv2,*LandauCanv3; |
TCanvas *IlluminaCanv,*LandauCanv1,*LandauCanv2,*LandauCanv3; |
| 330 |
|
|
| 331 |
TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; |
TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; |
| 332 |
TGraph *comprtime[12][countnboot],*temp[5][countnboot],*eventnumb[countnboot]; |
TGraph *comprtime[12][countnboot],*temp[5][cntpgtemp],*tempw[5][cntpgtemp],*eventnumb[countnboot],*mag[5][cntpgmag]; |
| 333 |
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; |
TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5],*pad7[5]; |
| 334 |
|
|
| 335 |
for(Int_t n = 0; n<12; n++) { |
for(Int_t n = 0; n<12; n++) { |
| 336 |
|
|
| 367 |
|
|
| 368 |
TLatex *t=new TLatex(); |
TLatex *t=new TLatex(); |
| 369 |
TLatex *t1=new TLatex(); |
TLatex *t1=new TLatex(); |
| 370 |
|
|
| 371 |
|
TLine li,liva1; |
| 372 |
|
|
| 373 |
|
Int_t minev=minevent,maxev=maxevent,countTEMP=0,countMAG=0; |
| 374 |
|
ULong_t countALARMx=0,countALARMy=0,countFC[12],countFL1[12],countFL2[12],countFL3[12],countFL4[12],countFL5[12],countFL6[12]; |
| 375 |
|
|
| 376 |
Int_t cntpgtemp=0,cntpgdat=0; |
for(int i=0; i<12; i++){ |
| 377 |
Int_t minev=minevent,maxev=maxevent,countTEMP=0; |
countFC[i]=0; |
| 378 |
|
countFL1[i]=0; |
| 379 |
|
countFL2[i]=0; |
| 380 |
|
countFL3[i]=0; |
| 381 |
|
countFL4[i]=0; |
| 382 |
|
countFL5[i]=0; |
| 383 |
|
countFL6[i]=0; |
| 384 |
|
} |
| 385 |
|
|
| 386 |
// |
// |
| 387 |
// Fill temperature graphs |
// Fill temperature graphs |
| 388 |
for(Int_t ii=0; ii<countnboot;ii++){ |
for(Int_t ii=0; ii<cntpgtemp;ii++){ |
| 389 |
//**************************************************************************************** |
//**************************************************************************************** |
| 390 |
//Temperature Output Pages |
//Temperature Output Pages |
| 391 |
//**************************************************************************************** |
//**************************************************************************************** |
| 407 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 408 |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
t1->DrawLatex(78.,98.7,isfile.str().c_str()); |
| 409 |
isfile.str(""); |
isfile.str(""); |
| 410 |
|
t1->SetTextSize(0.025); |
| 411 |
|
t1->SetTextColor(196); |
| 412 |
|
isfile<<"--> Values at 28.5^{o}C (if presents) correspond"; |
| 413 |
|
t1->DrawLatex(50.,22.,isfile.str().c_str()); |
| 414 |
|
isfile.str(""); |
| 415 |
|
isfile<<" to wrong readings ( > 100^{o}C) of the Tsb"; |
| 416 |
|
t1->DrawLatex(50.,19.,isfile.str().c_str()); |
| 417 |
|
isfile.str(""); |
| 418 |
|
isfile<<"--> Values at 25.5^{o}C (if presents) correspond"; |
| 419 |
|
t1->DrawLatex(50.,12.,isfile.str().c_str()); |
| 420 |
|
isfile.str(""); |
| 421 |
|
isfile<<" to wrong readings ( < 0^{o}C) of the Tsb"; |
| 422 |
|
t1->DrawLatex(50.,9.,isfile.str().c_str()); |
| 423 |
|
isfile.str(""); |
| 424 |
|
|
| 425 |
Float_t tposy = 0.95; // up y-coord - top pads |
Float_t tposy = 0.95; // up y-coord - top pads |
| 426 |
Float_t thpad = 0; // pad height |
Float_t thpad = 0; // pad height |
| 446 |
/* -----------> pad for histograms */ |
/* -----------> pad for histograms */ |
| 447 |
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
| 448 |
|
|
| 449 |
Int_t v=0,xt_tmp[tsize]; |
Int_t v=0,vv=0; |
| 450 |
|
Double_t xt_tmp[tsize], tempt_tmp[tsize]; |
| 451 |
|
Double_t xt_tmpw[tsize], tempt_tmpw[tsize]; |
| 452 |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
for (Int_t ev=countTEMP; ev<tsize; ev++){ |
| 453 |
|
|
| 454 |
if(ev==tsize-1 && i==4) countTEMP=tsize-1; |
if(ev==tsize-1 && i==4 && ii==cntpgtemp-1) countTEMP=tsize-1; |
| 455 |
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
if(xt[ev]<xt[ev-1] && ev>countTEMP){ |
| 456 |
if(i==4) countTEMP=ev; |
if(i==4) countTEMP=ev; |
| 457 |
break; |
break; |
| 458 |
} |
} |
| 459 |
else{ |
else{ |
| 460 |
if(tempt[ev][i]!=65535){ |
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
| 461 |
tempt_tmp[v]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); |
if(tempt_tmp[v]>100) { |
| 462 |
if(tempt_tmp[v]>0) xt_tmp[v++]=xt[ev]; |
tempt_tmp[v]=28.5; |
| 463 |
|
tempt_tmpw[vv]=28.5; |
| 464 |
|
xt_tmpw[vv++]=(Double_t)xt[ev]; |
| 465 |
} |
} |
| 466 |
|
else if(tempt_tmp[v]<0){ |
| 467 |
|
tempt_tmp[v]=25.5; |
| 468 |
|
tempt_tmpw[vv]=25.5; |
| 469 |
|
xt_tmpw[vv++]=(Double_t)xt[ev]; |
| 470 |
|
} |
| 471 |
|
xt_tmp[v++]=(Double_t)xt[ev]; |
| 472 |
} |
} |
| 473 |
} |
} |
| 474 |
TempCanv[ii]->cd(); |
TempCanv[ii]->cd(); |
| 478 |
pad6[i]->cd(); |
pad6[i]->cd(); |
| 479 |
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); |
| 480 |
temp[i][ii]->SetTitle(tit.str().c_str()); |
temp[i][ii]->SetTitle(tit.str().c_str()); |
| 481 |
|
if(v==1) temp[i][ii]->GetXaxis()->SetNdivisions(-501); |
| 482 |
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
temp[i][ii]->GetXaxis()->SetLabelSize(0.04); |
| 483 |
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
temp[i][ii]->GetXaxis()->SetTitleSize(0.04); |
| 484 |
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
| 494 |
temp[i][ii]->SetMarkerSize(0.2); |
temp[i][ii]->SetMarkerSize(0.2); |
| 495 |
temp[i][ii]->Draw("ap"); |
temp[i][ii]->Draw("ap"); |
| 496 |
tit.str(""); |
tit.str(""); |
| 497 |
|
if(vv>0){ |
| 498 |
|
tempw[i][ii]= new TGraph(vv,xt_tmpw,tempt_tmpw); |
| 499 |
|
tempw[i][ii]->SetMarkerStyle(21); |
| 500 |
|
tempw[i][ii]->SetMarkerSize(0.2); |
| 501 |
|
tempw[i][ii]->SetMarkerColor(196); |
| 502 |
|
tempw[i][ii]->Draw("samep"); |
| 503 |
|
} |
| 504 |
TempCanv[ii]->Update(); |
TempCanv[ii]->Update(); |
| 505 |
|
|
| 506 |
|
|
| 507 |
} |
} |
| 508 |
if(countTEMP==tsize-1){ |
if(countTEMP==tsize-1 && ii==cntpgtemp-1){ |
|
cntpgtemp=ii+1; |
|
| 509 |
break; |
break; |
| 510 |
} |
} |
| 511 |
} |
} |
| 512 |
|
|
| 513 |
|
// |
| 514 |
|
// Fill magnetic field graphs |
| 515 |
|
for(Int_t ii=0; ii<cntpgmag;ii++){ |
| 516 |
|
//**************************************************************************************** |
| 517 |
|
//Magnetic Field Output Pages |
| 518 |
|
//**************************************************************************************** |
| 519 |
|
fromfile.str(""); |
| 520 |
|
fromfile<<"FTrkQLook_EXPERT File: "<<ffile; |
| 521 |
|
isfile<<"Magnetic Axial Field vs OBT pag"<<ii+1; |
| 522 |
|
BfieldCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
| 523 |
|
BfieldCanv[ii]->SetFillColor(10); |
| 524 |
|
BfieldCanv[ii]->Range(0,0,100,100); |
| 525 |
|
|
| 526 |
|
t->SetTextFont(32); |
| 527 |
|
t->SetTextColor(1); |
| 528 |
|
t->SetTextAlign(12); |
| 529 |
|
t->SetTextSize(0.02); |
| 530 |
|
t->DrawLatex(2.,98.7,fromfile.str().c_str()); |
| 531 |
|
t1->SetTextFont(32); |
| 532 |
|
t1->SetTextColor(1); |
| 533 |
|
t1->SetTextAlign(12); |
| 534 |
|
t1->SetTextSize(0.02); |
| 535 |
|
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
| 536 |
|
isfile.str(""); |
| 537 |
|
|
| 538 |
|
li.SetLineStyle(1); |
| 539 |
|
li.SetLineWidth(1); |
| 540 |
|
li.SetLineColor(190); |
| 541 |
|
t1->SetTextColor(190); |
| 542 |
|
t1->SetTextSize(0.04); |
| 543 |
|
|
| 544 |
|
Float_t tposy = 0.95; // up y-coord - top pads |
| 545 |
|
Float_t thpad = 0; // pad height |
| 546 |
|
Float_t tposx1=0; // left x-coord - pad column |
| 547 |
|
Float_t tposx0=0; // x-coord - column division |
| 548 |
|
Float_t twrel = 0; // relative x size of first sub-column |
| 549 |
|
Float_t tmarg = 0.004; // margin among pads |
| 550 |
|
|
| 551 |
|
thpad = (tposy-tmarg*5)/3; |
| 552 |
|
twrel = (1-tmarg*4)/2; |
| 553 |
|
|
| 554 |
|
for(Int_t i=0; i<5; i++){ |
| 555 |
|
if ( (i+1)%2==1 ) { |
| 556 |
|
if(i>1) tposy = tposy-(tmarg*2+thpad); |
| 557 |
|
tposx1 = tmarg; |
| 558 |
|
tposx0 = tposx1 + twrel; |
| 559 |
|
} |
| 560 |
|
else { |
| 561 |
|
tposx1 = tposx0 + 2*tmarg; |
| 562 |
|
tposx0 = tposx1 + twrel; |
| 563 |
|
} |
| 564 |
|
|
| 565 |
|
/* -----------> pad for histograms */ |
| 566 |
|
pad7[i] = new TPad("pad7"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); |
| 567 |
|
|
| 568 |
|
Int_t v=0; |
| 569 |
|
Double_t xb_tmp[bsize], magt_tmp[bsize]; |
| 570 |
|
for (Int_t ev=countMAG; ev<bsize; ev++){ |
| 571 |
|
|
| 572 |
|
if(ev==bsize-1 && i==4 && ii==cntpgmag-1) countMAG=bsize-1; |
| 573 |
|
if(xb[ev]<xb[ev-1] && ev>countMAG){ |
| 574 |
|
if(i==4) countMAG=ev; |
| 575 |
|
break; |
| 576 |
|
} |
| 577 |
|
else{ |
| 578 |
|
magt_tmp[v]=(Double_t)magt[ev][i]; |
| 579 |
|
xb_tmp[v++]=(Double_t)xb[ev]; |
| 580 |
|
} |
| 581 |
|
} |
| 582 |
|
BfieldCanv[ii]->cd(); |
| 583 |
|
tit<<"B"<<i+5<<" (magnetic module "<<i+1<<")"; |
| 584 |
|
pad7[i]->SetFillColor(10); |
| 585 |
|
pad7[i]->Draw(); |
| 586 |
|
pad7[i]->cd(); |
| 587 |
|
mag[i][ii]= new TGraph(v,xb_tmp,magt_tmp); |
| 588 |
|
mag[i][ii]->SetTitle(tit.str().c_str()); |
| 589 |
|
if(v==1) mag[i][ii]->GetXaxis()->SetNdivisions(-501); |
| 590 |
|
mag[i][ii]->GetXaxis()->SetLabelSize(0.04); |
| 591 |
|
mag[i][ii]->GetXaxis()->SetTitleSize(0.04); |
| 592 |
|
mag[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); |
| 593 |
|
mag[i][ii]->GetXaxis()->CenterTitle(); |
| 594 |
|
mag[i][ii]->GetXaxis()->SetTitleOffset(0.85); |
| 595 |
|
if(i!=4) mag[i][ii]->GetYaxis()->SetRangeUser(2047,2058); |
| 596 |
|
else mag[i][ii]->GetYaxis()->SetRangeUser(2059,2067); |
| 597 |
|
mag[i][ii]->GetYaxis()->SetTitleOffset(1.2); |
| 598 |
|
mag[i][ii]->GetYaxis()->SetLabelOffset(0.001); |
| 599 |
|
mag[i][ii]->GetYaxis()->SetLabelSize(0.03); |
| 600 |
|
mag[i][ii]->GetYaxis()->SetTitleSize(0.04); |
| 601 |
|
mag[i][ii]->GetYaxis()->SetTitle("Magnetic Field (au)"); |
| 602 |
|
mag[i][ii]->GetYaxis()->CenterTitle(); |
| 603 |
|
mag[i][ii]->SetMarkerStyle(21); |
| 604 |
|
mag[i][ii]->SetMarkerSize(0.4); |
| 605 |
|
mag[i][ii]->Draw("ap"); |
| 606 |
|
Double_t min=0.,max=0,xlat=0.; |
| 607 |
|
min=mag[i][ii]->GetXaxis()->GetXmin(); |
| 608 |
|
max=mag[i][ii]->GetXaxis()->GetXmax(); |
| 609 |
|
xlat=min+(max-min)/2; |
| 610 |
|
stringstream mi,ma; |
| 611 |
|
mi<<"minimum recorded value"; |
| 612 |
|
ma<<"maximum recorded value"; |
| 613 |
|
t->SetTextSize(0.1); |
| 614 |
|
switch(i){ |
| 615 |
|
case 0: |
| 616 |
|
li.DrawLine(min,2054.,max,2054.); |
| 617 |
|
li.DrawLine(min,2048.,max,2048.); |
| 618 |
|
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
| 619 |
|
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
| 620 |
|
break; |
| 621 |
|
|
| 622 |
|
case 1: |
| 623 |
|
li.DrawLine(min,2055.,max,2055.); |
| 624 |
|
li.DrawLine(min,2049.,max,2049.); |
| 625 |
|
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
| 626 |
|
t1->DrawLatex(xlat,2048.7,mi.str().c_str()); |
| 627 |
|
break; |
| 628 |
|
|
| 629 |
|
case 2: |
| 630 |
|
li.DrawLine(min,2056.,max,2056.); |
| 631 |
|
li.DrawLine(min,2050.,max,2050.); |
| 632 |
|
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
| 633 |
|
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
| 634 |
|
break; |
| 635 |
|
|
| 636 |
|
case 3: |
| 637 |
|
li.DrawLine(min,2057.,max,2057.); |
| 638 |
|
li.DrawLine(min,2051.,max,2051.); |
| 639 |
|
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
| 640 |
|
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
| 641 |
|
break; |
| 642 |
|
|
| 643 |
|
case 4: |
| 644 |
|
li.DrawLine(min,2066.,max,2066.); |
| 645 |
|
li.DrawLine(min,2060.,max,2060.); |
| 646 |
|
t1->DrawLatex(xlat,2066.2,ma.str().c_str()); |
| 647 |
|
t1->DrawLatex(xlat,2059.8,mi.str().c_str()); |
| 648 |
|
break; |
| 649 |
|
|
| 650 |
|
} |
| 651 |
|
BfieldCanv[ii]->Update(); |
| 652 |
|
tit.str(""); |
| 653 |
|
} |
| 654 |
|
if(countMAG==bsize-1 && ii==cntpgmag-1){ |
| 655 |
|
break; |
| 656 |
|
} |
| 657 |
|
} |
| 658 |
|
|
| 659 |
|
|
| 660 |
// |
// |
| 661 |
// Fill compressiontime and eventnumber graphs and DSP warnings |
// Fill compressiontime and eventnumber graphs and DSP warnings |
| 662 |
for(Int_t ii=0; ii<countnboot;ii++){ |
for(Int_t ii=0; ii<countnboot;ii++){ |
| 663 |
TPaveText *pt1; |
TPad *pt; //pad for histos |
|
TPad *pt,*pt0; //pad for histos |
|
| 664 |
|
|
|
ofstream warning(out + "warning.txt",ios::out); |
|
|
|
|
| 665 |
//**************************************************************************************** |
//**************************************************************************************** |
| 666 |
//COMPRESSIONTIME vs. OBT Output Pages |
//COMPRESSIONTIME vs. OBT Output Pages |
| 667 |
//**************************************************************************************** |
//**************************************************************************************** |
| 687 |
//DSP EVENT NUMBER Output Pages |
//DSP EVENT NUMBER Output Pages |
| 688 |
//**************************************************************************************** |
//**************************************************************************************** |
| 689 |
|
|
| 690 |
isfile<<"WARNINGS on DSP EVENT NUMBER pag"<<ii+1; |
isfile<<"DSP EVENT NUMBER vs. OBT pag"<<ii+1; |
| 691 |
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); |
| 692 |
EventNumCanv[ii]->SetFillColor(10); |
EventNumCanv[ii]->SetFillColor(10); |
| 693 |
EventNumCanv[ii]->Range(0,0,100,100); |
EventNumCanv[ii]->Range(0,0,100,100); |
| 700 |
t1->SetTextColor(1); |
t1->SetTextColor(1); |
| 701 |
t1->SetTextAlign(12); |
t1->SetTextAlign(12); |
| 702 |
t1->SetTextSize(0.02); |
t1->SetTextSize(0.02); |
| 703 |
t1->DrawLatex(65.,98.7,isfile.str().c_str()); |
t1->DrawLatex(62.,98.7,isfile.str().c_str()); |
| 704 |
isfile.str(""); |
isfile.str(""); |
| 705 |
|
|
| 706 |
Float_t posy = 0.95; // up y-coord - top pads |
Float_t posy = 0.95; // up y-coord - top pads |
| 736 |
// |
// |
| 737 |
// Obtain information about the tracker data |
// Obtain information about the tracker data |
| 738 |
// and fill graphs and histos |
// and fill graphs and histos |
| 739 |
Int_t warning_dspnumber=0,al=0; |
|
| 740 |
Float_t x[MAXSTORAGE]; |
Int_t al=0; |
| 741 |
|
ULong_t obtx=0; |
| 742 |
|
Double_t x[MAXSTORAGE]; |
| 743 |
Float_t yc[MAXSTORAGE][12]; |
Float_t yc[MAXSTORAGE][12]; |
| 744 |
Float_t eventint[MAXSTORAGE]; |
Double_t eventint[MAXSTORAGE]; |
| 745 |
|
Int_t eventn[12]; |
| 746 |
|
|
| 747 |
for (Int_t ev=minev; ev<maxevent; ev++){ |
for (Int_t ev=minev; ev<maxevent; ev++){ |
| 748 |
tr->GetEntry(ev); |
tr->GetEntry(ev); |
| 749 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 750 |
cod = eh->GetCounter(); |
cod = eh->GetCounter(); |
| 751 |
|
|
| 752 |
|
|
| 753 |
if(ev==maxevent-1) maxev=maxevent-1; |
if(ev==maxevent-1) maxev=maxevent-1; |
| 754 |
|
|
| 755 |
if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
if(((ULong_t)ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ |
| 756 |
maxev=ev; |
maxev=ev; |
| 757 |
break; |
break; |
| 758 |
} |
} |
| 759 |
else{ |
else{ |
| 760 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
obtx = ph->GetOrbitalTime(); |
| 761 |
|
x[(ev-minev)]=(Double_t)obtx; |
| 762 |
ALARM=0; |
ALARM=0; |
|
|
|
| 763 |
Int_t dsp=0; |
Int_t dsp=0; |
| 764 |
|
Int_t noacq=0; |
| 765 |
|
Int_t acq_dsp[12]; |
| 766 |
|
ULong_t acq_info_tmp=0; |
| 767 |
|
if(cod->Get(pctp->RunHeader)>0) acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)-1]; |
| 768 |
|
else acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)]; |
| 769 |
|
for(Int_t io=0;io<12;io++){ |
| 770 |
|
acq_dsp[dsp]=(acq_info_tmp>>(12+io))&(~(~0<<1)); |
| 771 |
|
if(((acq_info_tmp>>(12+io))&(~(~0<<1)))==0) |
| 772 |
|
noacq+=1; |
| 773 |
|
WARNING[io]=0; |
| 774 |
|
} |
| 775 |
|
|
| 776 |
for(Int_t i=0; i<12; i++){ |
for(Int_t i=0; i<12; i++){ |
| 777 |
dsp=te->DSPnumber[i]-1; |
|
| 778 |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
if(i<12-noacq){ |
| 779 |
|
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
| 780 |
// |
ALARM=1; |
| 781 |
// Fill Cluster Signal and Lighting of the view histos |
break; |
| 782 |
for(Int_t j=0;j<3;j++){ |
} |
| 783 |
if(te->signcluster[i][j]!=0){ |
|
| 784 |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
dsp=te->DSPnumber[i]-1; |
| 785 |
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
| 786 |
|
|
| 787 |
|
// |
| 788 |
|
// Fill Cluster Signal and Lighting of the view histos |
| 789 |
|
for(Int_t j=0;j<3;j++){ |
| 790 |
|
if(te->signcluster[i][j]!=0){ |
| 791 |
|
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
| 792 |
|
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
| 793 |
|
} |
| 794 |
} |
} |
| 795 |
} |
} |
| 796 |
} |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
| 797 |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
if(!(dsp%2)){ |
| 798 |
if(!(dsp%2)){ |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
| 799 |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
| 800 |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
| 801 |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
} |
| 802 |
} |
else{ |
| 803 |
else{ |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
| 804 |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
| 805 |
if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
| 806 |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
} |
| 807 |
} |
} |
|
} |
|
| 808 |
|
|
| 809 |
WARNING[i]=0; |
WARNING[i]=0; |
| 810 |
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){ |
| 811 |
ALARM = 1; //general alarm |
if(countFC[dsp]==0){ |
| 812 |
al=1; |
ALARM = 1; //general alarm |
| 813 |
WARNING[i] = 1; // DSP warning |
WARNING[i] = 1; // DSP warning |
| 814 |
}; |
} |
| 815 |
|
countFC[dsp]+=1; |
| 816 |
if(te->alarm[i]!=0){ // hardware alarm |
}; |
|
ALARM = 1; |
|
|
al=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; |
|
|
} |
|
|
else |
|
|
eventint[(ev-minev)]=te->eventn[0]; |
|
|
} |
|
|
} |
|
| 817 |
|
|
| 818 |
if(ev<=maxevent-1){ |
if(te->fl1[i]!=0){ |
| 819 |
|
if(countFL1[dsp]==0){ |
| 820 |
|
ALARM = 1; //general alarm |
| 821 |
|
WARNING[i] = 1; // DSP warning |
| 822 |
|
} |
| 823 |
|
countFL1[dsp]+=1; |
| 824 |
|
}; |
| 825 |
|
|
| 826 |
if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1){ |
if(te->fl2[i]!=0){ |
| 827 |
warning_dspnumber++; |
if(countFL2[dsp]==0){ |
| 828 |
warning<< "==> WARNING!! Check entry "<< ev<<endl<< |
ALARM = 1; //general alarm |
| 829 |
" DSP event num.= "<< eventint[(ev-minev)]<< |
WARNING[i] = 1; // DSP warning |
| 830 |
" is different from (previus+1) ="<<eventint[(ev-minev)-1]+1 <<"\n"<<endl; |
} |
| 831 |
} |
countFL2[dsp]+=1; |
| 832 |
} |
}; |
| 833 |
|
|
| 834 |
|
if(te->fl3[i]!=0){ |
| 835 |
|
if(countFL3[dsp]==0){ |
| 836 |
|
ALARM = 1; //general alarm |
| 837 |
|
WARNING[i] = 1; // DSP warning |
| 838 |
|
} |
| 839 |
|
countFL3[dsp]+=1; |
| 840 |
|
}; |
| 841 |
|
|
| 842 |
|
if(te->fl4[i]!=0){ |
| 843 |
|
if(countFL4[dsp]==0){ |
| 844 |
|
ALARM = 1; //general alarm |
| 845 |
|
WARNING[i] = 1; // DSP warning |
| 846 |
|
} |
| 847 |
|
countFL4[dsp]+=1; |
| 848 |
|
}; |
| 849 |
|
|
| 850 |
|
if(te->fl5[i]!=0){ |
| 851 |
|
if(countFL5[dsp]==0){ |
| 852 |
|
ALARM = 1; //general alarm |
| 853 |
|
WARNING[i] = 1; // DSP warning |
| 854 |
|
} |
| 855 |
|
countFL5[dsp]+=1; |
| 856 |
|
}; |
| 857 |
|
|
| 858 |
|
if(te->fl6[i]!=0){ |
| 859 |
|
if(countFL6[dsp]==0){ |
| 860 |
|
ALARM = 1; //general alarm |
| 861 |
|
WARNING[i] = 1; // DSP warning |
| 862 |
|
} |
| 863 |
|
countFL6[dsp]+=1; |
| 864 |
|
}; |
| 865 |
|
|
| 866 |
|
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
| 867 |
|
if(countALARMy==0) |
| 868 |
|
ALARM = 1; |
| 869 |
|
countALARMy+=1; |
| 870 |
|
}; |
| 871 |
|
|
| 872 |
|
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
| 873 |
|
if(countALARMx==0) |
| 874 |
|
ALARM = 1; |
| 875 |
|
countALARMx+=1; |
| 876 |
|
}; |
| 877 |
|
|
| 878 |
|
//************************************************************************************** |
| 879 |
|
// warning for internal number |
| 880 |
|
//************************************************************************************** |
| 881 |
|
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
| 882 |
|
if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; |
| 883 |
|
} |
| 884 |
|
} |
| 885 |
|
eventint[(ev-minev)]=te->eventn[0]; |
| 886 |
|
|
| 887 |
//******************************************************************************************** |
//******************************************************************************************** |
| 888 |
// file DSP warning |
// file DSP warning |
| 889 |
//******************************************************************************************** |
//******************************************************************************************** |
| 890 |
|
|
| 891 |
if(ALARM==1) { |
if(ALARM==1) { |
| 892 |
|
al=1; |
| 893 |
alarm <<endl<< "================================================="<< endl; |
alarm <<endl<< "================================================="<< endl; |
| 894 |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; |
| 895 |
alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; |
alarm << " - OBT "<< (ULong_t)ph->GetOrbitalTime() << " ms"<<endl; |
| 896 |
|
alarm << "Total events "<<nevent<<endl; |
| 897 |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; |
| 898 |
alarm << "================================================="<< endl; |
alarm << "================================================="<< endl; |
| 899 |
|
|
| 900 |
alarm << " DSPn"; |
alarm << " DSPn"; |
| 901 |
alarm << " Event"; |
alarm << " Counter"; |
| 902 |
|
alarm << " previous"; |
| 903 |
alarm << " Words"; |
alarm << " Words"; |
| 904 |
alarm << " crc"; |
alarm << " crc"; |
| 905 |
alarm << " FC"; |
alarm << " FC"; |
| 912 |
|
|
| 913 |
for(Int_t i=0; i<12 ; i++){ |
for(Int_t i=0; i<12 ; i++){ |
| 914 |
alarm.width(5); alarm << te->DSPnumber[i]; |
alarm.width(5); alarm << te->DSPnumber[i]; |
| 915 |
alarm.width(6); alarm << te->eventn[i]; |
alarm.width(8); alarm << te->eventn[i]; |
| 916 |
|
alarm.width(8); alarm << eventn[i]; |
| 917 |
alarm.width(6); alarm << te->DATAlength[i]; |
alarm.width(6); alarm << te->DATAlength[i]; |
| 918 |
alarm.width(4); alarm << te->crc[i]; |
alarm.width(4); alarm << te->crc[i]; |
| 919 |
alarm.width(4); alarm << te->fc[i]; |
alarm.width(4); alarm << te->fc[i]; |
| 928 |
alarm << endl; |
alarm << endl; |
| 929 |
} |
} |
| 930 |
} |
} |
| 931 |
|
for(Int_t i=0; i<12 ; i++) |
| 932 |
|
eventn[i]=te->eventn[i]; |
| 933 |
} |
} |
| 934 |
} |
} |
| 935 |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------> NO ALARM!!! <-------"<<endl; |
| 936 |
if(warning_dspnumber==0) warning<<"NONE"<<endl; |
if(maxev==maxevent-1) { |
| 937 |
|
if(countALARMy!=0){ |
| 938 |
|
if(countALARMy%6!=0) alarm << endl<<endl<< "***** "<<countALARMy/6+1 <<" events with hardware alarm in Y-view *****"<<endl; |
| 939 |
|
else alarm << endl<<endl<< "***** "<<countALARMy/6 <<" events with hardware alarm in Y-view *****"<<endl; |
| 940 |
|
} |
| 941 |
|
if(countALARMx!=0){ |
| 942 |
|
if(countALARMx%6!=0) alarm << endl<<endl<< "***** "<<countALARMx/6+1 <<" events with hardware alarm in X-view *****"<<endl; |
| 943 |
|
else alarm << endl<<endl<< "***** "<<countALARMx/6 <<" events with hardware alarm in X-view *****"<<endl; |
| 944 |
|
} |
| 945 |
|
for(int p=0; p<12; p++){ |
| 946 |
|
if(countFC[p]!=0) alarm << endl<<endl<< "***** "<<countFC[p] <<" events with fc!=0 in DSP "<<p+1<<" *****"<<endl; |
| 947 |
|
if(countFL1[p]!=0) alarm << endl<<endl<< "***** "<<countFL1[p] <<" events with fl1!=0 in DSP "<<p+1<<" *****"<<endl; |
| 948 |
|
if(countFL2[p]!=0) alarm << endl<<endl<< "***** "<<countFL2[p] <<" events with fl2!=0 in DSP "<<p+1<<" *****"<<endl; |
| 949 |
|
if(countFL3[p]!=0) alarm << endl<<endl<< "***** "<<countFL3[p] <<" events with fl3!=0 in DSP "<<p+1<<" *****"<<endl; |
| 950 |
|
if(countFL4[p]!=0) alarm << endl<<endl<< "***** "<<countFL4[p] <<" events with fl4!=0 in DSP "<<p+1<<" *****"<<endl; |
| 951 |
|
if(countFL5[p]!=0) alarm << endl<<endl<< "***** "<<countFL5[p] <<" events with fl5!=0 in DSP "<<p+1<<" *****"<<endl; |
| 952 |
|
if(countFL6[p]!=0) alarm << endl<<endl<< "***** "<<countFL6[p] <<" events with fl6!=0 in DSP "<<p+1<<" *****"<<endl; |
| 953 |
|
} |
| 954 |
|
} |
| 955 |
|
|
| 956 |
// |
// |
| 957 |
// Draw the graphs |
// Draw the graphs |
| 958 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t i=0; i<12 ; i++){ |
| 959 |
Float_t yyc[maxev-minev]; |
Double_t yyc[maxev-minev]; |
| 960 |
for (Int_t v=0; v<maxev-minev; v++){ |
for (Int_t v=0; v<maxev-minev; v++){ |
| 961 |
yyc[v]=yc[v][i]; |
yyc[v]=yc[v][i]; |
| 962 |
} |
} |
| 973 |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
comprtime[i][ii]->GetXaxis()->CenterTitle(); |
| 974 |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); |
| 975 |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
comprtime[i][ii]->GetYaxis()->CenterTitle(); |
| 976 |
comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); |
if(maxev-minev==1) comprtime[i][ii]->GetXaxis()->SetNdivisions(-501); |
| 977 |
|
// comprtime[i][ii]->GetYaxis()->SetRangeUser(0,3); |
| 978 |
comprtime[i][ii]->Draw("ap"); |
comprtime[i][ii]->Draw("ap"); |
| 979 |
oss1.str(""); |
oss1.str(""); |
| 980 |
CompTimeCanv[ii]->Update(); |
CompTimeCanv[ii]->Update(); |
| 981 |
} |
} |
| 982 |
|
|
| 983 |
|
|
| 984 |
EventNumCanv[ii]->cd(); |
EventNumCanv[ii]->cd(); |
| 985 |
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(); |
|
| 986 |
pt->SetFillColor(10); |
pt->SetFillColor(10); |
| 987 |
pt->SetFrameFillColor(10); |
pt->SetFrameFillColor(10); |
| 988 |
pt->Draw(); |
pt->Draw(); |
| 989 |
pt->cd(); |
pt->cd(); |
| 990 |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
eventnumb[ii]=new TGraph(maxev-minev,x,eventint); |
| 991 |
eventnumb[ii]->SetTitle(""); |
eventnumb[ii]->SetTitle(""); |
| 992 |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.03); |
eventnumb[ii]->GetXaxis()->SetLabelSize(0.02); |
| 993 |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetXaxis()->SetTitleSize(0.03); |
| 994 |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); |
| 995 |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
eventnumb[ii]->GetXaxis()->CenterTitle(); |
| 996 |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
eventnumb[ii]->GetXaxis()->SetTickLength(0.01); |
| 997 |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.2); |
eventnumb[ii]->GetXaxis()->SetTitleOffset(1.1); |
| 998 |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.03); |
eventnumb[ii]->GetYaxis()->SetLabelSize(0.02); |
| 999 |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.04); |
eventnumb[ii]->GetYaxis()->SetTitleSize(0.03); |
| 1000 |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); |
| 1001 |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
eventnumb[ii]->GetYaxis()->CenterTitle(); |
| 1002 |
eventnumb[ii]->GetYaxis()->SetTitleOffset(1.5); |
if(maxev-minev==1) eventnumb[ii]->GetXaxis()->SetNdivisions(-501); |
| 1003 |
|
eventnumb[ii]->GetYaxis()->SetTitleOffset(2.); |
| 1004 |
eventnumb[ii]->SetMarkerStyle(21); |
eventnumb[ii]->SetMarkerStyle(21); |
| 1005 |
eventnumb[ii]->SetMarkerColor(kBlue); |
eventnumb[ii]->SetMarkerColor(kBlue); |
| 1006 |
eventnumb[ii]->SetMarkerSize(0.3); |
eventnumb[ii]->SetMarkerSize(0.2); |
| 1007 |
|
oss1.str(""); |
| 1008 |
|
oss1<<"number of events in this graph: "<<maxev-minev; |
| 1009 |
|
t->SetTextColor(kBlue); |
| 1010 |
|
t->SetTextSize(0.02); |
| 1011 |
|
double xtex=0,ytex=0; |
| 1012 |
|
xtex=x[maxev-minev-1]-(x[maxev-minev-1]-x[0])/3; |
| 1013 |
|
ytex=1000.+eventnumb[ii]->GetYaxis()->GetXmax(); |
| 1014 |
|
t->DrawLatex(xtex,ytex,oss1.str().c_str()); |
| 1015 |
|
oss1.str(""); |
| 1016 |
eventnumb[ii]->Draw("ap"); |
eventnumb[ii]->Draw("ap"); |
| 1017 |
EventNumCanv[ii]->Update(); |
EventNumCanv[ii]->Update(); |
| 1018 |
|
|
|
|
|
|
warning.close(); |
|
| 1019 |
minev=maxev; |
minev=maxev; |
| 1020 |
if(maxev==maxevent-1) { |
if(maxev==maxevent-1) { |
| 1021 |
cntpgdat=ii+1; |
cntpgdat=ii+1; |
| 1022 |
break; |
break; |
| 1023 |
} |
} |
| 1024 |
|
|
| 1025 |
} |
} |
| 1026 |
|
|
| 1027 |
alarm.close(); |
alarm.close(); |
| 1111 |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
t1->DrawLatex(70.,98.7,isfile.str().c_str()); |
| 1112 |
isfile.str(""); |
isfile.str(""); |
| 1113 |
|
|
| 1114 |
|
isfile<<"Chips with white line at least once showed anomalous behaviour"; |
| 1115 |
|
t->SetTextColor(17); |
| 1116 |
|
t->SetTextSize(0.018); |
| 1117 |
|
t->DrawLatex(.01,.96,isfile.str().c_str()); |
| 1118 |
|
isfile.str(""); |
| 1119 |
|
|
| 1120 |
|
isfile<<"Boxes so colored point out anomalous chips (not necessarily broken)"; |
| 1121 |
|
t->SetTextColor(107); |
| 1122 |
|
// t->DrawLatex(7.,95.7,isfile.str().c_str()); |
| 1123 |
|
isfile.str(""); |
| 1124 |
|
t->SetTextColor(1); |
| 1125 |
|
|
| 1126 |
// |
// |
| 1127 |
// Draw the histos |
// Draw the histos |
| 1128 |
for (Int_t i=0; i<12 ; i++){ |
for (Int_t nn=0; nn<12 ; nn++){ |
| 1129 |
|
|
| 1130 |
TBox b; |
TBox b; |
|
b.SetFillColor(6); |
|
|
b.SetFillStyle(3945); |
|
| 1131 |
|
|
| 1132 |
Float_t maxhist=0; |
Float_t maxhist=0.,va1x=0.,minhist=0.; |
| 1133 |
LandauCanv1->cd(); |
LandauCanv1->cd(); |
| 1134 |
pad1[i]->SetFillColor(10); |
pad1[nn]->SetFillColor(10); |
| 1135 |
pad1[i]->SetFrameFillColor(10); |
pad1[nn]->SetFrameFillColor(10); |
| 1136 |
pad1[i]->Draw(); |
pad1[nn]->Draw(); |
| 1137 |
pad1[i]->cd(); |
pad1[nn]->cd(); |
| 1138 |
landau1[i]->GetXaxis()->SetTitle("max signal"); |
landau1[nn]->GetXaxis()->SetTitle("max signal"); |
| 1139 |
landau1[i]->GetXaxis()->CenterTitle(); |
landau1[nn]->GetXaxis()->CenterTitle(); |
| 1140 |
landau1[i]->Draw(""); |
landau1[nn]->Draw(""); |
| 1141 |
LandauCanv1->Update(); |
LandauCanv1->Update(); |
| 1142 |
|
|
| 1143 |
LandauCanv2->cd(); |
LandauCanv2->cd(); |
| 1144 |
pad4[i]->SetFillColor(10); |
pad4[nn]->SetFillColor(10); |
| 1145 |
pad4[i]->SetFrameFillColor(10); |
pad4[nn]->SetFrameFillColor(10); |
| 1146 |
pad4[i]->Draw(); |
pad4[nn]->Draw(); |
| 1147 |
pad4[i]->cd(); |
pad4[nn]->cd(); |
| 1148 |
landau2[i]->GetXaxis()->SetTitle("max signal"); |
landau2[nn]->GetXaxis()->SetTitle("max signal"); |
| 1149 |
landau2[i]->GetXaxis()->CenterTitle(); |
landau2[nn]->GetXaxis()->CenterTitle(); |
| 1150 |
landau2[i]->Draw(""); |
landau2[nn]->Draw(""); |
| 1151 |
LandauCanv2->Update(); |
LandauCanv2->Update(); |
| 1152 |
|
|
| 1153 |
LandauCanv3->cd(); |
LandauCanv3->cd(); |
| 1154 |
pad5[i]->SetFillColor(10); |
pad5[nn]->SetFillColor(10); |
| 1155 |
pad5[i]->SetFrameFillColor(10); |
pad5[nn]->SetFrameFillColor(10); |
| 1156 |
pad5[i]->Draw(); |
pad5[nn]->Draw(); |
| 1157 |
pad5[i]->cd(); |
pad5[nn]->cd(); |
| 1158 |
landau3[i]->GetXaxis()->SetTitle("max signal"); |
landau3[nn]->GetXaxis()->SetTitle("max signal"); |
| 1159 |
landau3[i]->GetXaxis()->CenterTitle(); |
landau3[nn]->GetXaxis()->CenterTitle(); |
| 1160 |
landau3[i]->Draw(""); |
landau3[nn]->Draw(""); |
| 1161 |
LandauCanv3->Update(); |
LandauCanv3->Update(); |
| 1162 |
|
|
| 1163 |
|
|
| 1164 |
|
li.SetLineColor(38); |
| 1165 |
|
li.SetLineStyle(4); |
| 1166 |
|
li.SetLineWidth(2); |
| 1167 |
|
liva1.SetLineColor(42); |
| 1168 |
|
liva1.SetLineStyle(3); |
| 1169 |
|
liva1.SetLineWidth(1); |
| 1170 |
|
|
| 1171 |
IlluminaCanv->cd(); |
IlluminaCanv->cd(); |
| 1172 |
pad2[i]->SetFillColor(10); |
pad2[nn]->SetFillColor(10); |
| 1173 |
pad2[i]->SetFrameFillColor(10); |
pad2[nn]->SetFrameFillColor(10); |
| 1174 |
pad2[i]->SetLogy(); |
pad2[nn]->SetLogy(); |
| 1175 |
pad2[i]->Draw(); |
pad2[nn]->Draw(); |
| 1176 |
pad2[i]->cd(); |
pad2[nn]->cd(); |
| 1177 |
illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); |
illuminazione[nn]->GetXaxis()->SetTitle("strip with max signal"); |
| 1178 |
illuminazione[i]->GetXaxis()->CenterTitle(); |
illuminazione[nn]->GetXaxis()->CenterTitle(); |
| 1179 |
illuminazione[i]->Draw(""); |
illuminazione[nn]->Draw(""); |
| 1180 |
if(i==1){ |
maxhist= illuminazione[nn]->GetMaximum(); |
| 1181 |
maxhist= illuminazione[i]->GetMaximum(); |
minhist=0.; |
| 1182 |
b.DrawBox(2816.,0.,3060.,maxhist); |
b.SetFillColor(19); |
| 1183 |
} |
b.SetFillStyle(3954); |
| 1184 |
else if(i==6){ |
if(nn==0){ |
| 1185 |
maxhist= illuminazione[i]->GetMaximum(); |
b.DrawBox(0.,minhist,2047.,maxhist); |
| 1186 |
b.DrawBox(2560.,0.,2816.,maxhist); |
} |
| 1187 |
b.DrawBox(512.,0.,768.,maxhist); |
else if(nn==1){ |
| 1188 |
b.DrawBox(1024.,0.,1792.,maxhist); |
b.DrawBox(128.,minhist,256.,maxhist); |
| 1189 |
} |
b.DrawBox(384.,minhist,512.,maxhist); |
| 1190 |
else if(i==11){ |
b.DrawBox(896.,minhist,1024.,maxhist); |
| 1191 |
maxhist= illuminazione[i]->GetMaximum(); |
b.DrawBox(2048.,minhist,2432.,maxhist); |
| 1192 |
b.DrawBox(768.,0.,1024.,maxhist); |
b.DrawBox(2816.,minhist,2944.,maxhist); |
| 1193 |
|
b.DrawBox(2944.,minhist,3070.,maxhist); |
| 1194 |
|
} |
| 1195 |
|
else if(nn==3){ |
| 1196 |
|
b.DrawBox(0.,minhist,256.,maxhist); |
| 1197 |
|
b.DrawBox(2816.,minhist,3070.,maxhist); |
| 1198 |
} |
} |
| 1199 |
|
else if(nn==4){ |
| 1200 |
|
b.DrawBox(256.,minhist,512.,maxhist); |
| 1201 |
|
b.DrawBox(1792.,minhist,1920.,maxhist); |
| 1202 |
|
b.DrawBox(2816.,minhist,3070.,maxhist); |
| 1203 |
|
} |
| 1204 |
|
else if(nn==5){ |
| 1205 |
|
b.DrawBox(0.,minhist,256.,maxhist); |
| 1206 |
|
b.DrawBox(896.,minhist,1024.,maxhist); |
| 1207 |
|
b.DrawBox(1664.,minhist,1792.,maxhist); |
| 1208 |
|
} |
| 1209 |
|
else if(nn==6){ |
| 1210 |
|
b.DrawBox(512.,minhist,768.,maxhist); |
| 1211 |
|
b.DrawBox(1024.,minhist,1280.,maxhist); |
| 1212 |
|
b.DrawBox(1280.,minhist,1792.,maxhist); |
| 1213 |
|
b.DrawBox(2560.,minhist,2816.,maxhist); |
| 1214 |
|
} |
| 1215 |
|
else if(nn==7){ |
| 1216 |
|
b.DrawBox(0.,minhist,1535.,maxhist); |
| 1217 |
|
b.DrawBox(2024.,minhist,2280.,maxhist); |
| 1218 |
|
} |
| 1219 |
|
else if(nn==8){ |
| 1220 |
|
b.DrawBox(512.,minhist,768.,maxhist); |
| 1221 |
|
} |
| 1222 |
|
else if(nn==9){ |
| 1223 |
|
b.DrawBox(0.,minhist,128.,maxhist); |
| 1224 |
|
b.DrawBox(256.,minhist,384.,maxhist); |
| 1225 |
|
b.DrawBox(512.,minhist,640.,maxhist); |
| 1226 |
|
b.DrawBox(896.,minhist,1152.,maxhist); |
| 1227 |
|
b.DrawBox(1280.,minhist,1535.,maxhist); |
| 1228 |
|
b.DrawBox(1664.,minhist,1920.,maxhist); |
| 1229 |
|
b.DrawBox(2048.,minhist,2304.,maxhist); |
| 1230 |
|
} |
| 1231 |
|
else if(nn==10){ |
| 1232 |
|
b.DrawBox(0.,minhist,512.,maxhist); |
| 1233 |
|
b.DrawBox(1024.,minhist,3070.,maxhist); |
| 1234 |
|
} |
| 1235 |
|
else if(nn==11){ |
| 1236 |
|
b.DrawBox(0.,minhist,512.,maxhist); |
| 1237 |
|
b.DrawBox(768.,minhist,1024.,maxhist); |
| 1238 |
|
b.DrawBox(1536.,minhist,1664.,maxhist); |
| 1239 |
|
b.DrawBox(1920.,minhist,2560.,maxhist); |
| 1240 |
|
b.DrawBox(2816.,minhist,3070.,maxhist); |
| 1241 |
|
} |
| 1242 |
|
for(int va=1; va<24; va++){ |
| 1243 |
|
va1x=128*va; |
| 1244 |
|
liva1.DrawLine(va1x,minhist,va1x,maxhist); |
| 1245 |
|
} |
| 1246 |
|
li.DrawLine(1024.5,minhist,1024.5,maxhist); |
| 1247 |
|
li.DrawLine(2048.5,minhist,2048.5,maxhist); |
| 1248 |
IlluminaCanv->Update(); |
IlluminaCanv->Update(); |
| 1249 |
} |
} |
| 1250 |
|
|
| 1259 |
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; |
| 1260 |
|
|
| 1261 |
for(Int_t fl=0;fl<totpg;fl++){ |
for(Int_t fl=0;fl<totpg;fl++){ |
| 1262 |
|
|
| 1263 |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ |
| 1264 |
out1.str(""); |
out1.str(""); |
| 1265 |
out2.str(""); |
out2.str(""); |
| 1273 |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
| 1274 |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1275 |
TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1276 |
|
BfieldCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1277 |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
| 1278 |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); |
| 1279 |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); |
| 1283 |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); |
| 1284 |
if(fl>0 && fl<cntpgdat) CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl>0 && fl<cntpgdat) CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1285 |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1286 |
|
if(fl<cntpgmag) BfieldCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1287 |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); |
| 1288 |
if(fl==totpg-1){ |
if(fl==totpg-1){ |
| 1289 |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); |
| 1298 |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); |
| 1299 |
if(fl<cntpgdat) CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgdat) CompTimeCanv[fl]->Print(out+out1.str().c_str()); |
| 1300 |
out1.str(""); |
out1.str(""); |
| 1301 |
|
out1<<ffile<<"_FTrkQLook_EXPERT-BField-pag"<<fl+1<<"."<<outfile.Data(); |
| 1302 |
|
if(fl<cntpgmag) BfieldCanv[fl]->Print(out+out1.str().c_str()); |
| 1303 |
|
out1.str(""); |
| 1304 |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); |
| 1305 |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out1.str().c_str()); |
if(fl<cntpgtemp) TempCanv[fl]->Print(out+out1.str().c_str()); |
| 1306 |
out1.str(""); |
out1.str(""); |
| 1337 |
com.str(""); |
com.str(""); |
| 1338 |
} |
} |
| 1339 |
|
|
|
command.str(""); |
|
|
command<<"rm -f "<<out<<"warning.txt"; |
|
|
system(command.str().c_str()); |
|
|
|
|
| 1340 |
gROOT->Reset(); |
gROOT->Reset(); |
| 1341 |
return; |
return; |
| 1342 |
} |
} |