| 50 |
#include <sstream> |
#include <sstream> |
| 51 |
#include "TStyle.h" |
#include "TStyle.h" |
| 52 |
#include "TFile.h" |
#include "TFile.h" |
|
#include "TAxis.h" |
|
|
#include "TLegend.h" |
|
|
#include "TF1.h" |
|
| 53 |
#include "TList.h" |
#include "TList.h" |
| 54 |
#include "TTree.h" |
#include "TTree.h" |
| 55 |
#include "TObjString.h" |
#include "TObjString.h" |
| 56 |
#include "TCanvas.h" |
#include "TCanvas.h" |
| 57 |
#include "TGraph.h" |
#include "TGraph.h" |
|
#include "TMultiGraph.h" |
|
| 58 |
#include "TH1F.h" |
#include "TH1F.h" |
| 59 |
#include "TGaxis.h" |
#include "TGaxis.h" |
| 60 |
#include "TString.h" |
#include "TString.h" |
| 168 |
} |
} |
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
//////////////////////////////////////////////////////////////////////////////// |
//////////////////////////////////////////////////////////////////////////////// |
| 173 |
////////////////////////// TMTC TEMPERATURE ////////////////////////////////// |
////////////////////////// TMTC TEMPERATURE ////////////////////////////////// |
| 174 |
////////////////////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////////////////////// |
| 196 |
pamela::TmtcRecord *tmr=0; |
pamela::TmtcRecord *tmr=0; |
| 197 |
|
|
| 198 |
tr->SetBranchAddress("Tmtc", &tme); |
tr->SetBranchAddress("Tmtc", &tme); |
| 199 |
|
|
| 200 |
|
///-------to create canvas--------------------// |
| 201 |
|
TCanvas *Canvascchot = new TCanvas("Tmtc_1", base, 1280, 1024); |
| 202 |
|
Canvascchot->Divide(2,3); |
| 203 |
|
Canvascchot->SetFillColor(10); |
| 204 |
|
|
| 205 |
|
TCanvas *Canvascccold = new TCanvas("Tmtc_2", base, 1280,1024); |
| 206 |
|
Canvascccold->Divide(2,3); |
| 207 |
|
Canvascccold->SetFillColor(10); |
| 208 |
|
|
| 209 |
|
TCanvas *Canvasccvrl = new TCanvas("Tmtc_3", base, 1280, 1024); |
| 210 |
|
Canvasccvrl->Divide(1,3); |
| 211 |
|
Canvasccvrl->SetFillColor(10); |
| 212 |
|
|
| 213 |
|
|
| 214 |
|
TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024); |
| 215 |
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
| 216 |
|
Canvasthdea->SetFillColor(10); |
| 217 |
|
Canvasthdea->Divide(3,4); |
| 218 |
|
} |
| 219 |
|
else if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
| 220 |
|
Canvasthdea->SetFillColor(10); |
| 221 |
|
Canvasthdea->Divide(4,4); |
| 222 |
|
} |
| 223 |
|
|
| 224 |
|
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
| 225 |
|
Canvasvoltdea->SetFillColor(10); |
| 226 |
|
Canvasvoltdea->Divide(2,3); |
| 227 |
|
|
| 228 |
//////--------to analize data-----------------////// |
//////--------to analize data-----------------////// |
| 229 |
Long64_t nevents = tmtcBr->GetEntries(); |
Long64_t nevents = tmtcBr->GetEntries(); |
| 234 |
} |
} |
| 235 |
|
|
| 236 |
|
|
| 237 |
string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","KHB_HOT","KHB_COLD","IDAQ_HOT","IDAQ_COLD","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB","TOFHV_HOT","TOFHV_COLD"}; |
const Int_t size = nevents; |
|
|
|
|
string titoloth[] ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH","DCDC_TH","CPU_TH1","CPU_TH2", "IPM_CPU_TH", "VRL_TH1", "VRL_TH2", "VME_COOL_TH"}; |
|
|
|
|
|
|
|
|
const Int_t size = nevents; |
|
| 238 |
std::stringstream oss; |
std::stringstream oss; |
| 239 |
Int_t recordstot=0; |
Int_t recordstot=0; |
|
Int_t recordstotmax=0; |
|
|
Int_t records[size]; |
|
|
Int_t ev[size]; |
|
|
Double_t OBT[size]; |
|
|
Int_t tot=0; |
|
| 240 |
Int_t m=0; |
Int_t m=0; |
| 241 |
Int_t l=0; |
Int_t l=0; |
| 242 |
|
Int_t n=0; |
| 243 |
|
|
| 244 |
|
for (Int_t i = 0; i < size; i++){ |
|
for (Int_t i = 0; i < size; i++){ ///ciclo per decidere le pagine |
|
| 245 |
tmtcBr->GetEntry(i); |
tmtcBr->GetEntry(i); |
| 246 |
Long64_t tmpSize = tme->Records->GetEntries(); |
Long64_t tmpSize = tme->Records->GetEntries(); |
| 247 |
|
//Int_t size_b = tmpSize; |
| 248 |
recordstot=recordstot+tmpSize; |
recordstot=recordstot+tmpSize; |
| 249 |
if (tmpSize>0){ |
} |
| 250 |
tmr = (pamela::TmtcRecord*)tme->Records->At(0); |
|
| 251 |
if(i==0){ |
const Int_t lungmax=16*recordstot; |
| 252 |
ev[0]=0; |
const Int_t lungmin=6*recordstot; |
| 253 |
records[0]=0; |
|
| 254 |
OBT[0]=tmr->TM_RECORD_OBT; |
Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], ythana[lungmax], xrecordobtth[lungmax], xrecordobtdea[lungmin], ydea[lungmin], xrecordobtcc_1[lungmax], yccdiagacq_1[lungmax], ythana_1[lungmax], xrecordobtth_1[lungmax], xrecordobtdea_1[lungmin], ydea_1[lungmin], limth[lungmax], limvolt1[lungmin], limvolt2[lungmin], limvolt3[lungmin]; |
| 255 |
}else if (fmod(i, 50)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
|
| 256 |
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
|
| 257 |
tot=tot+1; |
string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","KHB_HOT_LATCHUP","KHB_COLD_LATCHUP","IDAQ_HOT_ALARM","IDAQ_COLD_ALARM","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB_ALARM","TOFHV_HOT_ALARM","TOFHV_COLD_ALARM"}; |
| 258 |
if (recordstotmax<recordstot) recordstotmax=recordstot; |
|
| 259 |
records[tot]=recordstot; |
string titoloth[] ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH","DCDC_TH","CPU_TH1","CPU_TH2", "", "", "", ""}; |
| 260 |
OBT[tot]=tmr->TM_RECORD_OBT; |
|
| 261 |
ev[tot]=i; |
|
| 262 |
recordstot=0; |
recordstot=0; |
| 263 |
|
for (Int_t i = 0; i < size; i++){ |
| 264 |
|
tmtcBr->GetEntry(i); |
| 265 |
|
Long64_t tmpSize = tme->Records->GetEntries(); |
| 266 |
|
Int_t size_b = tmpSize; |
| 267 |
|
for (Int_t j = 0; j < size_b; j++){ |
| 268 |
|
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
| 269 |
|
|
| 270 |
|
for (Int_t k =0; k <16; k++){ |
| 271 |
|
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
| 272 |
|
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
| 273 |
} |
} |
|
} |
|
|
} |
|
|
|
|
| 274 |
|
|
| 275 |
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
| 276 |
|
for (Int_t k =0; k <12; k++){ |
| 277 |
|
ythana[12*recordstot+12*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
| 278 |
|
xrecordobtth[12*recordstot+12*j+k] = tmr->TM_RECORD_OBT; |
| 279 |
|
} |
| 280 |
|
} |
| 281 |
|
else if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
| 282 |
|
for (Int_t k =0; k <16; k++){ |
| 283 |
|
ythana[16*recordstot+16*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
| 284 |
|
xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
| 285 |
|
} |
| 286 |
|
} |
| 287 |
|
|
| 288 |
const Int_t lungmax=16*recordstotmax; |
for (Int_t k =0; k <6; k++){ |
| 289 |
const Int_t lungmin=6*recordstotmax; |
ydea[6*recordstot+6*j+k] = convert_volt(tmr->TM_DEA_ANA[k]); |
| 290 |
|
xrecordobtdea[6*recordstot+6*j+k] = tmr->TM_RECORD_OBT; |
| 291 |
|
} |
| 292 |
Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], ythana[lungmax], xrecordobtth[lungmax], xrecordobtdea[lungmin], ydea[lungmin], xrecordobtcc_1[lungmax], xrecordobtcc_1d[lungmax], xrecordobtcc_1u[lungmax], yccdiagacq_1[lungmax], yccdiagacq_1d[lungmax], yccdiagacq_1u[lungmax], ythana_1[lungmax], xrecordobtth_1[lungmax], xrecordobtdea_1[lungmin], ydea_1[lungmin], limth[lungmax], limvolt1[lungmin], limvolt2[lungmin], limvolt3[lungmin]; |
} |
| 293 |
|
recordstot=recordstot+tmpSize; |
| 294 |
Double_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax], yccipmerror2[lungmax]; |
} |
|
|
|
| 295 |
|
|
| 296 |
|
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
| 297 |
|
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
| 298 |
|
|
| 299 |
|
//CC Graph |
| 300 |
|
for (Int_t k =0; k<16; k++){ |
| 301 |
|
for (Int_t i = 0; i < recordstot; i++){ |
| 302 |
|
yccdiagacq_1[i]= yccdiagacq[16*i+k]; |
| 303 |
|
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
| 304 |
|
} |
| 305 |
|
//CC IPM |
| 306 |
|
if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){ |
| 307 |
|
Canvascchot->cd(m+1); |
| 308 |
|
gPad->SetFillColor(10); |
| 309 |
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
| 310 |
|
|
| 311 |
|
pt = new TPaveText (.01,.07,.09,.13); |
| 312 |
|
pt->AddText("ON"); |
| 313 |
|
pt->SetBorderSize(1); |
| 314 |
|
pt->Draw(); |
| 315 |
|
pt1 = new TPaveText (.01,.47,.09,.53); |
| 316 |
|
pt1->AddText("OFF"); |
| 317 |
|
pt1->SetBorderSize(1); |
| 318 |
|
pt1->Draw(); |
| 319 |
|
oss.str(""); |
| 320 |
|
oss<<filename.Data()<<": "<<titolocc[k]; |
| 321 |
|
ccrecord->SetTitle(oss.str().c_str()); |
| 322 |
|
ccrecord->SetMaximum(1.5); |
| 323 |
|
ccrecord->SetMinimum(0); |
| 324 |
|
ccrecord->SetFillColor(8); |
| 325 |
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
| 326 |
|
ccrecord->GetXaxis()->CenterTitle(); |
| 327 |
|
ccrecord->GetYaxis()->SetTitle(""); |
| 328 |
|
ccrecord->GetYaxis()->CenterTitle(); |
| 329 |
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
| 330 |
|
ccrecord->GetYaxis()->SetLabelSize(0); |
| 331 |
|
ccrecord->SetMaximum(2); |
| 332 |
|
ccrecord->SetMinimum(0); |
| 333 |
|
ccrecord->Draw("AB"); |
| 334 |
|
pt->Draw(); |
| 335 |
|
pt1->Draw(); |
| 336 |
|
m=m+1; |
| 337 |
|
} |
| 338 |
|
//CC idaq-khb-tof |
| 339 |
|
if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){ |
| 340 |
|
Canvascccold->cd(l+1); |
| 341 |
|
gPad->SetFillColor(10); |
| 342 |
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
| 343 |
|
if (k==6 || k==7){ |
| 344 |
|
TPaveText *pt = new TPaveText (.01,.07,.09,.13); |
| 345 |
|
pt->AddText("ON"); |
| 346 |
|
pt->SetBorderSize(1); |
| 347 |
|
pt->Draw(); |
| 348 |
|
TPaveText *pt1 = new TPaveText (.01,.47,.15,.53); |
| 349 |
|
pt1->AddText("OFF/LATCHUP"); |
| 350 |
|
pt1->SetBorderSize(1); |
| 351 |
|
pt1->Draw(); |
| 352 |
|
} |
| 353 |
|
if (k==8 || k==9 || k==14 || k==15){ |
| 354 |
|
TPaveText *pt = new TPaveText (.01,.07,.09,.13); |
| 355 |
|
pt->AddText("ON"); |
| 356 |
|
pt->SetBorderSize(1); |
| 357 |
|
pt->Draw(); |
| 358 |
|
TPaveText *pt1 = new TPaveText (.01,.47,.13,.53); |
| 359 |
|
pt1->AddText("OFF/ALARM"); |
| 360 |
|
pt1->SetBorderSize(1); |
| 361 |
|
pt1->Draw(); |
| 362 |
|
} |
| 363 |
|
oss.str(""); |
| 364 |
|
oss<<filename.Data()<<": "<<titolocc[k]; |
| 365 |
|
ccrecord->SetTitle(oss.str().c_str()); |
| 366 |
|
ccrecord->SetMaximum(1.5); |
| 367 |
|
ccrecord->SetMinimum(0); |
| 368 |
|
ccrecord->SetFillColor(8); |
| 369 |
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
| 370 |
|
ccrecord->GetXaxis()->CenterTitle(); |
| 371 |
|
ccrecord->GetYaxis()->SetTitle(""); |
| 372 |
|
ccrecord->GetYaxis()->CenterTitle(); |
| 373 |
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
| 374 |
|
ccrecord->GetYaxis()->SetLabelSize(0); |
| 375 |
|
ccrecord->SetMaximum(2); |
| 376 |
|
ccrecord->SetMinimum(0); |
| 377 |
|
ccrecord->Draw("AB"); |
| 378 |
|
l=l+1; |
| 379 |
|
} |
| 380 |
|
//CC vrl |
| 381 |
|
if (k==11 || k==12 || k==13 ){ |
| 382 |
|
Canvasccvrl->cd(n+1); |
| 383 |
|
gPad->SetFillColor(10); |
| 384 |
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
| 385 |
|
if (k==11 || k==12){ |
| 386 |
|
TPaveText *pt = new TPaveText (.05,.07,.09,.13); |
| 387 |
|
pt->AddText("ON"); |
| 388 |
|
pt->SetBorderSize(1); |
| 389 |
|
pt->Draw(); |
| 390 |
|
TPaveText *pt1 = new TPaveText (.05,.47,.09,.53); |
| 391 |
|
pt1->AddText("OFF"); |
| 392 |
|
pt1->SetBorderSize(1); |
| 393 |
|
pt1->Draw(); |
| 394 |
|
} |
| 395 |
|
if (k==13){ |
| 396 |
|
TPaveText *pt = new TPaveText (.05,.07,.09,.13); |
| 397 |
|
pt->AddText("ON"); |
| 398 |
|
pt->SetBorderSize(1); |
| 399 |
|
pt->Draw(); |
| 400 |
|
TPaveText *pt1 = new TPaveText (.03,.47,.11,.53); |
| 401 |
|
pt1->AddText("OFF/ALARM"); |
| 402 |
|
pt1->SetBorderSize(1); |
| 403 |
|
pt1->Draw(); |
| 404 |
|
} |
| 405 |
|
oss.str(""); |
| 406 |
|
oss<<filename.Data()<<": "<<titolocc[k]; |
| 407 |
|
ccrecord->SetTitle(oss.str().c_str()); |
| 408 |
|
ccrecord->SetMaximum(1.5); |
| 409 |
|
ccrecord->SetMinimum(0); |
| 410 |
|
ccrecord->SetFillColor(8); |
| 411 |
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
| 412 |
|
ccrecord->GetXaxis()->CenterTitle(); |
| 413 |
|
ccrecord->GetYaxis()->SetTitle(""); |
| 414 |
|
ccrecord->GetYaxis()->CenterTitle(); |
| 415 |
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
| 416 |
|
ccrecord->GetYaxis()->SetLabelSize(0); |
| 417 |
|
ccrecord->SetMaximum(2); |
| 418 |
|
ccrecord->SetMinimum(0); |
| 419 |
|
ccrecord->Draw("AB"); |
| 420 |
|
n=n+1; |
| 421 |
|
} |
| 422 |
|
} |
| 423 |
|
|
|
/////ciclo sulle pagine//////////////////// |
|
|
for (Int_t interval=0; interval<tot; interval++){ |
|
|
|
|
|
///-------to create canvas--------------------// |
|
|
TCanvas *Canvascc = new TCanvas("Tmtc_1", base, 2500, 2000); |
|
|
Canvascc->Divide(1,15); |
|
|
Canvascc->SetFillColor(10); |
|
|
|
|
|
TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024); |
|
|
Canvasthdea->SetFillColor(10); |
|
|
Canvasthdea->Divide(4,4); |
|
| 424 |
|
|
| 425 |
|
// TH Graph |
| 426 |
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
Canvasthdea->cd(); |
| 427 |
Canvasvoltdea->SetFillColor(10); |
//thermistors number 12 |
| 428 |
Canvasvoltdea->Divide(2,3); |
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
| 429 |
|
for (Int_t k =0; k<12; k++){ |
| 430 |
|
for (Int_t i = 0; i < recordstot; i++){ |
| 431 |
recordstot=0; |
ythana_1[i]= ythana[12*i+k]; |
| 432 |
|
xrecordobtth_1[i]= xrecordobtth[12*i+k]; |
| 433 |
for (Int_t i = ev[interval]; i < ev[interval+1]; i++){ //ciclo su un sottogruppo |
limth[i] = 45; |
| 434 |
// cout<<"ciclo da "<<ev[interval]<<" a "<< ev[interval+1]<<"\n"; |
} |
| 435 |
tmtcBr->GetEntry(i); |
Canvasthdea->cd(k+1); |
| 436 |
l=0; |
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
| 437 |
m=0; |
graph->SetMarkerColor(50); |
| 438 |
Long64_t tmpSize = tme->Records->GetEntries(); |
graph->SetLineColor(50); |
| 439 |
Int_t size_b = tmpSize; |
graph->SetMarkerStyle(21); |
| 440 |
for (Int_t j = 0; j < size_b; j++){ |
graph->SetMarkerSize(0.3); |
| 441 |
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
graph->SetMinimum(-10); |
| 442 |
|
graph->SetMaximum(60); |
| 443 |
for (Int_t k =0; k <16; k++){ |
graph->GetXaxis()->SetTitle("OBT"); |
| 444 |
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
graph->GetXaxis()->CenterTitle(); |
| 445 |
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
| 446 |
} |
graph->GetYaxis()->CenterTitle(); |
| 447 |
|
oss.str(""); |
| 448 |
for (Int_t k =0; k <16; k++){ |
oss << filename.Data() <<": " <<titoloth[k] ; |
| 449 |
ythana[16*recordstot+16*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
graph->SetTitle(oss.str().c_str()); |
| 450 |
xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
|
| 451 |
} |
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
| 452 |
|
pt->AddText("OFF"); |
| 453 |
for (Int_t k =0; k <6; k++){ |
pt->SetBorderSize(1); |
| 454 |
ydea[6*recordstot+6*j+k] = convert_volt(tmr->TM_DEA_ANA[k]); |
pt->Draw(); |
| 455 |
xrecordobtdea[6*recordstot+6*j+k] = tmr->TM_RECORD_OBT; |
graph->Draw("ACP"); |
| 456 |
} |
pt->Draw(); |
| 457 |
} |
|
| 458 |
recordstot=recordstot+tmpSize; |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
| 459 |
} |
threcord->SetLineColor(kBlue); |
| 460 |
|
threcord->SetMarkerColor(kBlue); |
| 461 |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
threcord->SetMarkerStyle(21); |
| 462 |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
threcord->Draw("C"); |
| 463 |
|
} |
| 464 |
TLegend *leg1 = new TLegend(0.87,0.80,0.98,0.94, ""); |
} |
| 465 |
leg1->SetFillColor(10); |
//thermistors number=16 |
| 466 |
leg1->SetBorderSize(0); |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
| 467 |
|
for (Int_t k =0; k<16; k++){ |
| 468 |
Canvascc->cd(); |
for (Int_t i = 0; i < recordstot; i++){ |
| 469 |
pt = new TPaveText (.87,.95,.98,.98); |
ythana_1[i]= ythana[16*i+k]; |
| 470 |
oss.str(""); |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
| 471 |
oss<<filename.Data(); |
limth[i] = 45; |
| 472 |
pt->AddText(oss.str().c_str()); |
} |
| 473 |
pt->SetTextColor(1); |
Canvasthdea->cd(k+1); |
| 474 |
//pt->SetTextSize(1); |
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
| 475 |
pt->SetFillColor(10); |
graph->SetMarkerColor(50); |
| 476 |
pt->SetBorderSize(0); |
graph->SetLineColor(50); |
| 477 |
pt->Draw(); |
graph->SetMarkerStyle(21); |
| 478 |
|
graph->SetMarkerSize(0.3); |
| 479 |
/* |
graph->SetMinimum(-10); |
| 480 |
TLine *line = new TLine; |
graph->SetMaximum(60); |
| 481 |
line->SetLineColor(4); |
graph->GetXaxis()->SetTitle("OBT"); |
| 482 |
line->SetLineWidth(2); |
graph->GetXaxis()->CenterTitle(); |
| 483 |
line->DrawLine(0, 0.60, 1, 0.60); |
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
| 484 |
line->Draw(); |
graph->GetYaxis()->CenterTitle(); |
| 485 |
line->DrawLine(0, 0.33, 1, 0.33); |
oss.str(""); |
| 486 |
line->Draw(); |
oss << filename.Data() <<": " <<titoloth[k] ; |
| 487 |
line->DrawLine(0, 0.20, 1, 0.20); |
graph->SetTitle(oss.str().c_str()); |
| 488 |
line->Draw(); |
|
| 489 |
line->DrawLine(0, 0.13, 1, 0.13); |
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
| 490 |
line->Draw(); |
pt->AddText("OFF"); |
| 491 |
*/ |
pt->SetBorderSize(1); |
| 492 |
|
pt->Draw(); |
| 493 |
|
graph->Draw("ACP"); |
| 494 |
|
pt->Draw(); |
| 495 |
//CC Graph |
|
| 496 |
for (Int_t k =0; k<16; k++){ |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
| 497 |
for (Int_t i = 0; i < recordstot; i++){ |
threcord->SetLineColor(kBlue); |
| 498 |
if (k>0) { |
threcord->SetMarkerColor(kBlue); |
| 499 |
yccdiagacq_11u[i]=yccdiagacq_1u[i]; |
threcord->SetMarkerStyle(21); |
| 500 |
yccdiagacq_11d[i]=yccdiagacq_1d[i]; |
threcord->Draw("C"); |
| 501 |
} |
} |
| 502 |
yccdiagacq_1d[i]=0; |
} |
| 503 |
yccdiagacq_1u[i]=0; |
|
| 504 |
if (yccdiagacq[16*i+k]==0) { |
// DEA Graph |
| 505 |
yccdiagacq_1d[i]=-1; |
Canvasvoltdea->cd(); |
| 506 |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
for (Int_t k =0; k<6; k++){ |
| 507 |
} |
for (Int_t i = 0; i < recordstot; i++){ |
| 508 |
else if (yccdiagacq[16*i+k]==1){ |
ydea_1[i]= ydea[6*i + k]; |
| 509 |
yccdiagacq_1u[i]=1; |
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
| 510 |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
limvolt1[i]= 0.65; |
| 511 |
} |
limvolt2[i]= 3.15; |
| 512 |
if (k==1) { |
limvolt3[i]= 4.25; |
| 513 |
if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1) yccipm12u[i]=1; |
} |
| 514 |
else yccipm12u[i]=0; |
Canvasvoltdea->cd(k+1); |
| 515 |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipm12d[i]=-1; |
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
| 516 |
else yccipm12d[i]=0; |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
| 517 |
} |
pt->AddText("OFF"); |
| 518 |
if (k==1 || k==3 || k==5 || k==7 || k==9) { |
pt->SetBorderSize(1); |
| 519 |
if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1) yccipmkk1u[i]=1; |
pt->Draw(); |
| 520 |
else yccipmkk1u[i]=0; |
TPaveText *pt1 = new TPaveText (.84,.67,.92,.73); |
| 521 |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
pt1->AddText("ON"); |
| 522 |
else yccipmkk1d[i]=0; |
pt1->SetBorderSize(1); |
| 523 |
if (k==7 || k==9) { |
pt1->Draw(); |
| 524 |
if (yccipmkk1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
graph1->SetMarkerColor(50); |
| 525 |
else if (yccipmkk1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0 || (yccipmkk1d[i]==-1 && yccipm12u[i]==1)) yccipmerror[i]=-1; |
graph1->SetLineColor(50); |
| 526 |
else yccipmerror[i]=0; |
graph1->SetMarkerStyle(21); |
| 527 |
} |
graph1->SetMarkerSize(0.3); |
| 528 |
} |
graph1->SetMinimum(0.0); |
| 529 |
if (k==6 || k==7 || k==8 || k==9) { |
graph1->SetMaximum(5.0); |
| 530 |
if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
graph1->GetXaxis()->SetTitle("OBT"); |
| 531 |
else yccipmerror2[i]=0; |
graph1->GetXaxis()->CenterTitle(); |
| 532 |
} |
graph1->GetYaxis()->SetTitle("Voltage value (V)"); |
| 533 |
if (k==13) { |
graph1->GetYaxis()->CenterTitle(); |
| 534 |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccdiagacq_1d[i]==-1; //psb on |
oss.str(""); |
| 535 |
if (yccdiagacq_1u[i]==1 && yccipm12u[i]==1) yccdiagacq_1u[i]==1; //psb off |
oss << filename.Data()<<": IPM "<<k+1<<" Voltage"; |
| 536 |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
graph1->SetTitle(oss.str().c_str()); |
| 537 |
else if (yccdiagacq_1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
graph1->Draw("ACP"); |
| 538 |
else yccipmerror[i]=0; //psb alarm |
pt1->Draw(); |
| 539 |
} |
pt->Draw(); |
| 540 |
if (k==15) { |
|
| 541 |
yccdiagacq_11u[i]=0; |
TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2); |
| 542 |
yccdiagacq_11d[i]=0; |
graph2->SetMarkerColor(50); |
| 543 |
} |
graph2->SetLineColor(50); |
| 544 |
} |
graph2->SetMarkerStyle(21); |
| 545 |
|
graph2->SetMarkerSize(0.2); |
| 546 |
//CC IPM |
graph2->SetMinimum(0.0); |
| 547 |
if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){ |
graph2->SetMaximum(5.0); |
| 548 |
Canvascc->cd(m+1); |
graph2->Draw("CP"); |
| 549 |
Canvascc->cd(m+1)->SetGridx(); |
|
| 550 |
gPad->SetFillColor(10); |
TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3); |
| 551 |
gPad->SetFrameBorderSize(0); |
graph3->SetMarkerColor(50); |
| 552 |
gPad->SetLineColor(1); |
graph3->SetLineColor(50); |
| 553 |
gPad->SetFrameBorderMode(0); |
graph3->SetMarkerStyle(21); |
| 554 |
|
graph3->SetMarkerSize(0.2); |
| 555 |
|
graph3->SetMinimum(0.0); |
| 556 |
pt = new TPaveText (.01,.30,.10,.70); |
graph3->SetMaximum(5.0); |
| 557 |
oss.str(""); |
graph3->Draw("CP"); |
| 558 |
oss<<titolocc[k]; |
|
| 559 |
pt->AddText(oss.str().c_str()); |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
| 560 |
pt->SetFillColor(10); |
dearecord->SetLineColor(kBlue); |
| 561 |
pt->SetBorderSize(0); |
dearecord->SetLineWidth(1); |
| 562 |
pt->Draw(); |
dearecord->SetMarkerStyle(21); |
| 563 |
|
dearecord->SetMarkerSize(0.5); |
| 564 |
|
dearecord->SetMarkerColor(kBlue); |
| 565 |
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
dearecord->Draw("CPL"); |
| 566 |
ccrecordd->SetTitle(""); |
} |
| 567 |
ccrecordd->SetFillColor(8); |
|
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetXaxis()->SetTickLength(0); |
|
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetYaxis()->SetTickLength(0); |
|
|
ccrecordd->SetMaximum(1.3); |
|
|
ccrecordd->SetMinimum(-1.3); |
|
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordd->Draw("AB"); |
|
|
if (k==0) leg1->AddEntry(ccrecordd,"ON","f"); |
|
|
|
|
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
|
|
ccrecordu->SetTitle(""); |
|
|
ccrecordu->SetFillColor(17); |
|
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetXaxis()->SetTickLength(0); |
|
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetYaxis()->SetTickLength(0); |
|
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordu->SetMaximum(1.3); |
|
|
ccrecordu->SetMinimum(-1.3); |
|
|
ccrecordu->Draw("Bsame"); |
|
|
if (k==0) leg1->AddEntry(ccrecordu,"OFF","f"); |
|
|
|
|
|
|
|
|
if (k==1 || k==3 || k==5){ |
|
|
Canvascc->cd(m); |
|
|
TGraph *ccrecorderrord = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1d); |
|
|
ccrecorderrord->SetTitle(""); |
|
|
ccrecorderrord->SetFillColor(2); |
|
|
ccrecorderrord->GetXaxis()->SetLabelSize(0); |
|
|
ccrecorderrord->GetXaxis()->SetTickLength(0); |
|
|
ccrecorderrord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecorderrord->GetYaxis()->SetTickLength(0); |
|
|
ccrecorderrord->SetMaximum(1.3); |
|
|
ccrecorderrord->SetMinimum(-1.3); |
|
|
ccrecorderrord->GetXaxis()->SetAxisColor(0); |
|
|
ccrecorderrord->Draw("Bsame"); |
|
|
|
|
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1u); |
|
|
ccrecorderroru->SetTitle(""); |
|
|
ccrecorderroru->SetFillColor(2); |
|
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
|
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
|
|
ccrecorderroru->SetMaximum(1.3); |
|
|
ccrecorderroru->SetMinimum(-1.3); |
|
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
|
|
ccrecorderroru->Draw("Bsame"); |
|
|
|
|
|
Canvascc->cd(m+1); |
|
|
ccrecorderrord->Draw("Bsame"); |
|
|
ccrecorderroru->Draw("Bsame"); |
|
|
} |
|
|
|
|
|
|
|
|
Double_t xmin; |
|
|
Double_t xmax; |
|
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
|
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
|
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
|
|
axis->Draw("same"); |
|
|
/*TF1 *func1 = new TF1("func1", "0"); |
|
|
func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]); |
|
|
func1->SetLineColor(1); |
|
|
func1->SetLineStyle(1); |
|
|
func1->SetLineWidth(2); |
|
|
func1->Draw("same");*/ |
|
|
|
|
|
m=m+1; |
|
|
} |
|
|
|
|
|
//CC idaq-khb-tof |
|
|
if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){ |
|
|
Canvascc->cd(l+7); |
|
|
gPad->SetFillColor(10); |
|
|
gPad->SetFrameBorderSize(0); |
|
|
|
|
|
pt = new TPaveText (.00,.30,.09,.70); |
|
|
oss.str(""); |
|
|
oss<<titolocc[k]; |
|
|
pt->AddText(oss.str().c_str()); |
|
|
pt->SetFillColor(10); |
|
|
pt->SetBorderSize(0); |
|
|
pt->Draw(); |
|
|
|
|
|
|
|
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
|
|
ccrecordd->SetTitle(""); |
|
|
if (k==14 || k==15) ccrecordd->SetFillColor(2); |
|
|
else ccrecordd->SetFillColor(8); |
|
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetXaxis()->SetTickLength(0); |
|
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetYaxis()->SetTickLength(0); |
|
|
ccrecordd->SetMaximum(1.3); |
|
|
ccrecordd->SetMinimum(-1.3); |
|
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordd->Draw("AB"); |
|
|
|
|
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
|
|
ccrecordu->SetTitle(""); |
|
|
if (k==14 || k==15) { |
|
|
ccrecordu->SetFillColor(7); |
|
|
if (k==14) leg1->AddEntry(ccrecordu,"ON-OFF-LATCHUP","f"); |
|
|
} |
|
|
else ccrecordu->SetFillColor(17); |
|
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetXaxis()->SetTickLength(0); |
|
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetYaxis()->SetTickLength(0); |
|
|
ccrecordu->SetMaximum(1.3); |
|
|
ccrecordu->SetMinimum(-1.3); |
|
|
ccrecordu->Draw("Bsame"); |
|
|
|
|
|
if (k==6 || k==7 || k==8 || k==9){ |
|
|
Canvascc->cd(l+7); |
|
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror2); |
|
|
ccrecorderroru->SetTitle(""); |
|
|
ccrecorderroru->SetFillColor(2); |
|
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
|
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
|
|
ccrecorderroru->SetMaximum(1.3); |
|
|
ccrecorderroru->SetMinimum(-1.3); |
|
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
|
|
ccrecorderroru->Draw("Bsame"); |
|
|
} |
|
|
|
|
|
|
|
|
if (k==7 || k==9){ |
|
|
Canvascc->cd(l+7-1); |
|
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror); |
|
|
ccrecorderroru->SetTitle(""); |
|
|
ccrecorderroru->SetFillColor(2); |
|
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
|
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
|
|
ccrecorderroru->SetMaximum(1.3); |
|
|
ccrecorderroru->SetMinimum(-1.3); |
|
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
|
|
if (k==7) leg1->AddEntry(ccrecorderroru,"ALARM","f"); |
|
|
ccrecorderroru->Draw("Bsame"); |
|
|
|
|
|
Canvascc->cd(l+7); |
|
|
ccrecorderroru->Draw("Bsame"); |
|
|
} |
|
|
|
|
|
|
|
|
Double_t xmin; |
|
|
Double_t xmax; |
|
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
|
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
|
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 1.5); |
|
|
axis->Draw("same"); |
|
|
/*TF1 *func1 = new TF1("func1", "0"); |
|
|
func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]); |
|
|
func1->SetLineColor(1); |
|
|
func1->SetLineStyle(1); |
|
|
func1->SetLineWidth(2); |
|
|
func1->Draw("same");*/ |
|
|
l=l+1; |
|
|
|
|
|
} |
|
|
|
|
|
//CC vrl |
|
|
if (k==11 || k==12 || k==13 ){ |
|
|
if (k==13) Canvascc->cd(13); |
|
|
if (k==11) Canvascc->cd(14); |
|
|
if (k==12) Canvascc->cd(15); |
|
|
gPad->SetFillColor(10); |
|
|
gPad->SetFrameBorderSize(0); |
|
|
|
|
|
pt = new TPaveText (.01,.30,.09,.70); |
|
|
oss.str(""); |
|
|
oss<<titolocc[k]; |
|
|
pt->AddText(oss.str().c_str()); |
|
|
pt->SetFillColor(10); |
|
|
pt->SetBorderSize(0); |
|
|
pt->Draw(); |
|
|
|
|
|
if (k==11 || k==12){ |
|
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
|
|
ccrecordd->SetTitle(""); |
|
|
ccrecordd->SetFillColor(8); |
|
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetXaxis()->SetTickLength(0); |
|
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetYaxis()->SetTickLength(0); |
|
|
ccrecordd->SetMaximum(1.3); |
|
|
ccrecordd->SetMinimum(-1.3); |
|
|
ccrecordd->Draw("AB"); |
|
|
|
|
|
|
|
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
|
|
ccrecordu->SetTitle(""); |
|
|
ccrecordu->SetFillColor(17); |
|
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetXaxis()->SetTickLength(0); |
|
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetYaxis()->SetTickLength(0); |
|
|
ccrecordu->SetMaximum(1.3); |
|
|
ccrecordu->SetMinimum(-1.3); |
|
|
ccrecordu->Draw("Bsame"); |
|
|
|
|
|
Double_t xmin; |
|
|
Double_t xmax; |
|
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
|
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
|
|
if (k==12){ |
|
|
TGaxis *axis = new TGaxis (xmin, -1, xmax, -1, xmin, xmax, 510, "", 0); |
|
|
axis->SetLabelSize(0.24); |
|
|
axis->SetLabelColor(1); |
|
|
axis->SetTitle("OBT (ms)"); |
|
|
//axis->CenterTitle(); |
|
|
axis->SetTitleOffset(0.4); |
|
|
axis->SetTitleSize(0.21); |
|
|
axis->Draw(); |
|
|
TF1 *func1 = new TF1("func1", "0"); |
|
|
func1->SetRange(xmin,xmax); |
|
|
func1->SetLineColor(1); |
|
|
func1->SetLineStyle(1); |
|
|
func1->SetLineWidth(1); |
|
|
func1->Draw("same"); |
|
|
} |
|
|
if (k==11){ |
|
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
|
|
axis->SetLineWidth(1); |
|
|
axis->SetTickSize(2); |
|
|
axis->Draw("same"); |
|
|
} |
|
|
} |
|
|
|
|
|
if (k==13){ |
|
|
Canvascc->cd(13); |
|
|
|
|
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
|
|
ccrecordd->SetTitle(""); |
|
|
ccrecordd->SetFillColor(8); |
|
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetXaxis()->SetTickLength(0); |
|
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordd->GetYaxis()->SetTickLength(0); |
|
|
ccrecordd->SetMaximum(1.3); |
|
|
ccrecordd->SetMinimum(-1.3); |
|
|
ccrecordd->Draw("AB"); |
|
|
|
|
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
|
|
ccrecordu->SetTitle(""); |
|
|
ccrecordu->SetFillColor(17); |
|
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
|
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetXaxis()->SetTickLength(0); |
|
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
|
|
ccrecordu->GetYaxis()->SetTickLength(0); |
|
|
ccrecordu->SetMaximum(1.3); |
|
|
ccrecordu->SetMinimum(-1.3); |
|
|
ccrecordu->Draw("Bsame"); |
|
|
|
|
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror); |
|
|
ccrecorderroru->SetTitle(""); |
|
|
ccrecorderroru->SetFillColor(2); |
|
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
|
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
|
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
|
|
ccrecorderroru->SetMaximum(1.3); |
|
|
ccrecorderroru->SetMinimum(-1.3); |
|
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
|
|
ccrecorderroru->Draw("Bsame"); |
|
|
|
|
|
|
|
|
Double_t xmin=ccrecordu->GetXaxis()->GetXmin(); |
|
|
Double_t xmax=ccrecordu->GetXaxis()->GetXmax(); |
|
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
|
|
axis->SetLineWidth(1); |
|
|
axis->SetTickSize(2); |
|
|
axis->Draw("same"); |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Canvascc->cd(); |
|
|
leg1->Draw(); |
|
|
Canvascc->Update(); |
|
|
|
|
|
// TH Graph |
|
|
Canvasthdea->cd(); |
|
|
//thermistors number 12 |
|
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
|
|
for (Int_t k =0; k<12; k++){ |
|
|
for (Int_t i = 0; i < recordstot; i++){ |
|
|
ythana_1[i]= ythana[12*i+k]; |
|
|
xrecordobtth_1[i]= xrecordobtth[12*i+k]; |
|
|
limth[i] = 45; |
|
|
} |
|
|
Canvasthdea->cd(k+1); |
|
|
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
|
|
graph->SetMarkerColor(50); |
|
|
graph->SetLineColor(50); |
|
|
graph->SetMarkerStyle(21); |
|
|
graph->SetMarkerSize(0.3); |
|
|
graph->SetMinimum(-10); |
|
|
graph->SetMaximum(60); |
|
|
graph->GetXaxis()->SetTitle("OBT"); |
|
|
graph->GetXaxis()->CenterTitle(); |
|
|
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
|
|
graph->GetYaxis()->CenterTitle(); |
|
|
oss.str(""); |
|
|
oss << filename.Data() <<": " <<titoloth[k] ; |
|
|
graph->SetTitle(oss.str().c_str()); |
|
|
|
|
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
|
|
pt->AddText("OFF"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
graph->Draw("ACP"); |
|
|
pt->Draw(); |
|
|
|
|
|
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
|
|
threcord->SetLineColor(kBlue); |
|
|
threcord->SetMarkerColor(kBlue); |
|
|
threcord->SetMarkerStyle(21); |
|
|
threcord->Draw("C"); |
|
|
} |
|
|
} |
|
|
//thermistors number=16 |
|
|
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
|
|
for (Int_t k =0; k<16; k++){ |
|
|
for (Int_t i = 0; i < recordstot; i++){ |
|
|
ythana_1[i]= ythana[16*i+k]; |
|
|
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
|
|
limth[i] = 45; |
|
|
} |
|
|
Canvasthdea->cd(k+1); |
|
|
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
|
|
graph->SetMarkerColor(50); |
|
|
graph->SetLineColor(50); |
|
|
graph->SetMarkerStyle(21); |
|
|
graph->SetMarkerSize(0.3); |
|
|
graph->SetMinimum(-10); |
|
|
graph->SetMaximum(60); |
|
|
graph->GetXaxis()->SetTitle("OBT"); |
|
|
graph->GetXaxis()->CenterTitle(); |
|
|
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
|
|
graph->GetYaxis()->CenterTitle(); |
|
|
oss.str(""); |
|
|
oss << filename.Data() <<": " <<titoloth[k] ; |
|
|
graph->SetTitle(oss.str().c_str()); |
|
|
|
|
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
|
|
pt->AddText("OFF"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
graph->Draw("ACP"); |
|
|
pt->Draw(); |
|
|
|
|
|
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
|
|
threcord->SetLineColor(kBlue); |
|
|
threcord->SetMarkerColor(kBlue); |
|
|
threcord->SetMarkerStyle(21); |
|
|
threcord->Draw("C"); |
|
|
} |
|
|
} |
|
|
|
|
|
// DEA Graph |
|
|
Canvasvoltdea->cd(); |
|
|
for (Int_t k =0; k<6; k++){ |
|
|
for (Int_t i = 0; i < recordstot; i++){ |
|
|
ydea_1[i]= ydea[6*i + k]; |
|
|
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
|
|
limvolt1[i]= 0.65; |
|
|
limvolt2[i]= 3.15; |
|
|
limvolt3[i]= 4.25; |
|
|
} |
|
|
Canvasvoltdea->cd(k+1); |
|
|
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
|
|
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
|
|
pt->AddText("OFF"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.84,.67,.92,.73); |
|
|
pt1->AddText("ON"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
graph1->SetMarkerColor(50); |
|
|
graph1->SetLineColor(50); |
|
|
graph1->SetMarkerStyle(21); |
|
|
graph1->SetMarkerSize(0.3); |
|
|
graph1->SetMinimum(0.0); |
|
|
graph1->SetMaximum(5.0); |
|
|
graph1->GetXaxis()->SetTitle("OBT"); |
|
|
graph1->GetXaxis()->CenterTitle(); |
|
|
graph1->GetYaxis()->SetTitle("Voltage value (V)"); |
|
|
graph1->GetYaxis()->CenterTitle(); |
|
|
oss.str(""); |
|
|
oss << filename.Data()<<": IPM "<<k+1<<" Voltage"; |
|
|
graph1->SetTitle(oss.str().c_str()); |
|
|
graph1->Draw("ACP"); |
|
|
pt1->Draw(); |
|
|
pt->Draw(); |
|
|
|
|
|
TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2); |
|
|
graph2->SetMarkerColor(50); |
|
|
graph2->SetLineColor(50); |
|
|
graph2->SetMarkerStyle(21); |
|
|
graph2->SetMarkerSize(0.2); |
|
|
graph2->SetMinimum(0.0); |
|
|
graph2->SetMaximum(5.0); |
|
|
graph2->Draw("CP"); |
|
|
|
|
|
TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3); |
|
|
graph3->SetMarkerColor(50); |
|
|
graph3->SetLineColor(50); |
|
|
graph3->SetMarkerStyle(21); |
|
|
graph3->SetMarkerSize(0.2); |
|
|
graph3->SetMinimum(0.0); |
|
|
graph3->SetMaximum(5.0); |
|
|
graph3->Draw("CP"); |
|
|
|
|
|
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
|
|
dearecord->SetLineColor(kBlue); |
|
|
dearecord->SetLineWidth(1); |
|
|
dearecord->SetMarkerStyle(21); |
|
|
dearecord->SetMarkerSize(0.5); |
|
|
dearecord->SetMarkerColor(kBlue); |
|
|
dearecord->Draw("CPL"); |
|
|
} |
|
|
|
|
|
|
|
|
stringstream oss1, oss2, oss3, oss4; |
|
|
oss.str(""); |
|
|
oss1.str(""); |
|
|
oss2.str(""); |
|
|
oss << outDir.Data() << filename.Data() << "_Tmtc_cc_"<<interval+1<<"." << format; |
|
|
oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea_"<<interval+1<<"." << format; |
|
|
oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea_"<<interval+1<<"." << format; |
|
|
Canvascc->SaveAs(oss.str().c_str()); |
|
|
Canvasthdea->SaveAs(oss1.str().c_str()); |
|
|
Canvasvoltdea->SaveAs(oss2.str().c_str()); //// fine del lavoro sul sottogruppo |
|
|
|
|
|
Canvascc->Clear(); |
|
|
Canvasthdea->Clear(); |
|
|
Canvasvoltdea->Clear(); |
|
|
//gROOT->GetListOfCanvases()->Delete(); |
|
|
//gROOT->Reset(); |
|
|
|
|
|
} |
|
| 568 |
|
|
| 569 |
|
stringstream oss1, oss2, oss3, oss4; |
| 570 |
|
oss.str(""); |
| 571 |
|
oss1.str(""); |
| 572 |
|
oss2.str(""); |
| 573 |
|
oss3.str(""); |
| 574 |
|
oss4.str(""); |
| 575 |
|
oss << outDir.Data() << filename.Data() << "_Tmtc_cc_hot." << format; |
| 576 |
|
oss3 << outDir.Data() << filename.Data() << "_Tmtc_cc_cold." << format; |
| 577 |
|
oss4 << outDir.Data() << filename.Data() << "_Tmtc_cc_vrl." << format; |
| 578 |
|
oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea." << format; |
| 579 |
|
oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea." << format; |
| 580 |
|
Canvascchot->SaveAs(oss.str().c_str()); |
| 581 |
|
Canvascccold->SaveAs(oss3.str().c_str()); |
| 582 |
|
Canvasccvrl->SaveAs(oss4.str().c_str()); |
| 583 |
|
Canvasthdea->SaveAs(oss1.str().c_str()); |
| 584 |
|
Canvasvoltdea->SaveAs(oss2.str().c_str()); |
| 585 |
|
|
| 586 |
file->Close(); |
file->Close(); |
| 587 |
} |
} |
| 588 |
|
|
| 589 |
|
|