| 1 |
|
|
| 2 |
|
|
| 3 |
/** |
/** |
| 4 |
* TmtcTemperature |
* TmtcTemperature |
| 5 |
* author Marcelli |
* author Marcelli |
| 52 |
#include <sstream> |
#include <sstream> |
| 53 |
#include "TStyle.h" |
#include "TStyle.h" |
| 54 |
#include "TFile.h" |
#include "TFile.h" |
| 55 |
|
#include "TAxis.h" |
| 56 |
|
#include "TLegend.h" |
| 57 |
|
#include "TF1.h" |
| 58 |
#include "TList.h" |
#include "TList.h" |
| 59 |
#include "TTree.h" |
#include "TTree.h" |
| 60 |
#include "TObjString.h" |
#include "TObjString.h" |
| 61 |
#include "TCanvas.h" |
#include "TCanvas.h" |
| 62 |
#include "TGraph.h" |
#include "TGraph.h" |
| 63 |
|
#include "TMultiGraph.h" |
| 64 |
#include "TH1F.h" |
#include "TH1F.h" |
| 65 |
#include "TGaxis.h" |
#include "TGaxis.h" |
| 66 |
#include "TString.h" |
#include "TString.h" |
| 174 |
} |
} |
| 175 |
|
|
| 176 |
|
|
|
|
|
| 177 |
//////////////////////////////////////////////////////////////////////////////// |
//////////////////////////////////////////////////////////////////////////////// |
| 178 |
////////////////////////// TMTC TEMPERATURE ////////////////////////////////// |
////////////////////////// TMTC TEMPERATURE ////////////////////////////////// |
| 179 |
////////////////////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////////////////////// |
| 201 |
pamela::TmtcRecord *tmr=0; |
pamela::TmtcRecord *tmr=0; |
| 202 |
|
|
| 203 |
tr->SetBranchAddress("Tmtc", &tme); |
tr->SetBranchAddress("Tmtc", &tme); |
|
|
|
|
///-------to create canvas--------------------// |
|
|
TCanvas *Canvascchot = new TCanvas("Tmtc_1", base, 1280, 1024); |
|
|
Canvascchot->Divide(2,3); |
|
|
Canvascchot->SetFillColor(10); |
|
|
|
|
|
TCanvas *Canvascccold = new TCanvas("Tmtc_2", base, 1280,1024); |
|
|
Canvascccold->Divide(2,3); |
|
|
Canvascccold->SetFillColor(10); |
|
|
|
|
|
TCanvas *Canvasccvrl = new TCanvas("Tmtc_3", base, 1280, 1024); |
|
|
Canvasccvrl->Divide(1,3); |
|
|
Canvasccvrl->SetFillColor(10); |
|
|
|
|
|
|
|
|
TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024); |
|
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
|
|
Canvasthdea->SetFillColor(10); |
|
|
Canvasthdea->Divide(3,4); |
|
|
} |
|
|
else if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
|
|
Canvasthdea->SetFillColor(10); |
|
|
Canvasthdea->Divide(4,4); |
|
|
} |
|
|
|
|
|
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
|
|
Canvasvoltdea->SetFillColor(10); |
|
|
Canvasvoltdea->Divide(2,3); |
|
| 204 |
|
|
| 205 |
//////--------to analize data-----------------////// |
//////--------to analize data-----------------////// |
| 206 |
Long64_t nevents = tmtcBr->GetEntries(); |
Long64_t nevents = tmtcBr->GetEntries(); |
| 210 |
return; |
return; |
| 211 |
} |
} |
| 212 |
|
|
| 213 |
|
string titolocc[] ={"IPM1 input","IPM2 input","IPM3 input","IPM4 input","IPM5 input","IPM6 input","KHB_HOT","KHB_COLD","IDAQ_HOT","IDAQ_COLD","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB","TOFHV_HOT","TOFHV_COLD"}; |
| 214 |
|
|
| 215 |
|
string titoloth[] ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH1","DCDC_TH","CPU_TH1","CPU_TH2", "IPM_CPU_TH", "VRL_TH1", "VRL_TH2", "VME_TH2"}; |
| 216 |
|
|
| 217 |
|
|
| 218 |
const Int_t size = nevents; |
const Int_t size = nevents; |
| 219 |
std::stringstream oss; |
std::stringstream oss; |
| 220 |
Int_t recordstot=0; |
Int_t recordstot=0; |
| 221 |
|
Int_t recordstotmax=0; |
| 222 |
|
Int_t records[size]; |
| 223 |
|
Int_t ev[size]; |
| 224 |
|
Double_t OBT[size]; |
| 225 |
|
Int_t tot=0; |
| 226 |
Int_t m=0; |
Int_t m=0; |
| 227 |
Int_t l=0; |
Int_t l=0; |
|
Int_t n=0; |
|
| 228 |
|
|
| 229 |
for (Int_t i = 0; i < size; i++){ |
|
| 230 |
|
for (Int_t i = 0; i < size; i++){ ///ciclo per decidere le pagine |
| 231 |
tmtcBr->GetEntry(i); |
tmtcBr->GetEntry(i); |
| 232 |
Long64_t tmpSize = tme->Records->GetEntries(); |
Long64_t tmpSize = tme->Records->GetEntries(); |
|
//Int_t size_b = tmpSize; |
|
| 233 |
recordstot=recordstot+tmpSize; |
recordstot=recordstot+tmpSize; |
| 234 |
} |
if (tmpSize>0){ |
| 235 |
|
tmr = (pamela::TmtcRecord*)tme->Records->At(0); |
| 236 |
const Int_t lungmax=16*recordstot; |
if(i==0){ |
| 237 |
const Int_t lungmin=6*recordstot; |
ev[0]=0; |
| 238 |
|
records[0]=0; |
| 239 |
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]; |
OBT[0]=tmr->TM_RECORD_OBT; |
| 240 |
|
}else if (fmod(i, 35)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
| 241 |
|
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
| 242 |
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"}; |
tot=tot+1; |
| 243 |
|
if (recordstotmax<recordstot) recordstotmax=recordstot; |
| 244 |
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", "", "", "", ""}; |
records[tot]=recordstot; |
| 245 |
|
OBT[tot]=tmr->TM_RECORD_OBT; |
| 246 |
|
ev[tot]=i; |
| 247 |
recordstot=0; |
recordstot=0; |
|
for (Int_t i = 0; i < size; i++){ |
|
|
tmtcBr->GetEntry(i); |
|
|
Long64_t tmpSize = tme->Records->GetEntries(); |
|
|
Int_t size_b = tmpSize; |
|
|
for (Int_t j = 0; j < size_b; j++){ |
|
|
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
|
|
|
|
|
for (Int_t k =0; k <16; k++){ |
|
|
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
|
|
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
|
| 248 |
} |
} |
| 249 |
|
} |
| 250 |
|
} |
| 251 |
|
|
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
|
|
for (Int_t k =0; k <12; k++){ |
|
|
ythana[12*recordstot+12*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
|
|
xrecordobtth[12*recordstot+12*j+k] = tmr->TM_RECORD_OBT; |
|
|
} |
|
|
} |
|
|
else if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
|
|
for (Int_t k =0; k <16; k++){ |
|
|
ythana[16*recordstot+16*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
|
|
xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
|
|
} |
|
|
} |
|
| 252 |
|
|
| 253 |
for (Int_t k =0; k <6; k++){ |
const Int_t lungmax=16*recordstotmax; |
| 254 |
ydea[6*recordstot+6*j+k] = convert_volt(tmr->TM_DEA_ANA[k]); |
const Int_t lungmin=6*recordstotmax; |
| 255 |
xrecordobtdea[6*recordstot+6*j+k] = tmr->TM_RECORD_OBT; |
|
| 256 |
} |
Float_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]; |
| 257 |
} |
|
| 258 |
recordstot=recordstot+tmpSize; |
Float_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax], yccipmerror2[lungmax]; |
|
} |
|
| 259 |
|
|
|
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
|
|
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
|
| 260 |
|
|
| 261 |
//CC Graph |
/////ciclo sulle pagine//////////////////// |
| 262 |
for (Int_t k =0; k<16; k++){ |
for (Int_t interval=0; interval<tot; interval++){ |
| 263 |
for (Int_t i = 0; i < recordstot; i++){ |
|
| 264 |
yccdiagacq_1[i]= yccdiagacq[16*i+k]; |
///-------to create canvas--------------------// |
| 265 |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
TCanvas *Canvascc = new TCanvas("Tmtc_1", base, 2500, 2000); |
| 266 |
} |
Canvascc->Divide(1,15); |
| 267 |
//CC IPM |
Canvascc->SetFillColor(10); |
| 268 |
if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){ |
|
| 269 |
Canvascchot->cd(m+1); |
TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024); |
| 270 |
gPad->SetFillColor(10); |
Canvasthdea->SetFillColor(10); |
| 271 |
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
Canvasthdea->Divide(4,4); |
| 272 |
|
|
| 273 |
pt = new TPaveText (.01,.07,.09,.13); |
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
| 274 |
pt->AddText("ON"); |
Canvasvoltdea->SetFillColor(10); |
| 275 |
pt->SetBorderSize(1); |
Canvasvoltdea->Divide(2,3); |
| 276 |
pt->Draw(); |
|
| 277 |
pt1 = new TPaveText (.01,.47,.09,.53); |
|
| 278 |
pt1->AddText("OFF"); |
recordstot=0; |
| 279 |
pt1->SetBorderSize(1); |
|
| 280 |
pt1->Draw(); |
for (Int_t i = ev[interval]; i < ev[interval+1]; i++){ //ciclo su un sottogruppo |
| 281 |
oss.str(""); |
// cout<<"ciclo da "<<ev[interval]<<" a "<< ev[interval+1]<<"\n"; |
|
oss<<filename.Data()<<": "<<titolocc[k]; |
|
|
ccrecord->SetTitle(oss.str().c_str()); |
|
|
ccrecord->SetMaximum(1.5); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->SetFillColor(8); |
|
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
|
|
ccrecord->GetXaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetTitle(""); |
|
|
ccrecord->GetYaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
|
|
ccrecord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecord->SetMaximum(2); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->Draw("AB"); |
|
|
pt->Draw(); |
|
|
pt1->Draw(); |
|
|
m=m+1; |
|
|
} |
|
|
//CC idaq-khb-tof |
|
|
if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){ |
|
|
Canvascccold->cd(l+1); |
|
|
gPad->SetFillColor(10); |
|
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
|
|
if (k==6 || k==7){ |
|
|
TPaveText *pt = new TPaveText (.01,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.01,.47,.15,.53); |
|
|
pt1->AddText("OFF/LATCHUP"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
if (k==8 || k==9 || k==14 || k==15){ |
|
|
TPaveText *pt = new TPaveText (.01,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.01,.47,.13,.53); |
|
|
pt1->AddText("OFF/ALARM"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
oss.str(""); |
|
|
oss<<filename.Data()<<": "<<titolocc[k]; |
|
|
ccrecord->SetTitle(oss.str().c_str()); |
|
|
ccrecord->SetMaximum(1.5); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->SetFillColor(8); |
|
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
|
|
ccrecord->GetXaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetTitle(""); |
|
|
ccrecord->GetYaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
|
|
ccrecord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecord->SetMaximum(2); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->Draw("AB"); |
|
|
l=l+1; |
|
|
} |
|
|
//CC vrl |
|
|
if (k==11 || k==12 || k==13 ){ |
|
|
Canvasccvrl->cd(n+1); |
|
|
gPad->SetFillColor(10); |
|
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
|
|
if (k==11 || k==12){ |
|
|
TPaveText *pt = new TPaveText (.05,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.05,.47,.09,.53); |
|
|
pt1->AddText("OFF"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
if (k==13){ |
|
|
TPaveText *pt = new TPaveText (.05,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.03,.47,.11,.53); |
|
|
pt1->AddText("OFF/ALARM"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
oss.str(""); |
|
|
oss<<filename.Data()<<": "<<titolocc[k]; |
|
|
ccrecord->SetTitle(oss.str().c_str()); |
|
|
ccrecord->SetMaximum(1.5); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->SetFillColor(8); |
|
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
|
|
ccrecord->GetXaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetTitle(""); |
|
|
ccrecord->GetYaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
|
|
ccrecord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecord->SetMaximum(2); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->Draw("AB"); |
|
|
n=n+1; |
|
|
} |
|
|
} |
|
| 282 |
|
|
| 283 |
|
tmtcBr->GetEntry(i); |
| 284 |
// TH Graph |
l=0; |
| 285 |
Canvasthdea->cd(); |
m=0; |
| 286 |
//thermistors number 12 |
Long64_t tmpSize = tme->Records->GetEntries(); |
| 287 |
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
Int_t size_b = tmpSize; |
| 288 |
for (Int_t k =0; k<12; k++){ |
for (Int_t j = 0; j < size_b; j++){ |
| 289 |
for (Int_t i = 0; i < recordstot; i++){ |
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
| 290 |
ythana_1[i]= ythana[12*i+k]; |
|
| 291 |
xrecordobtth_1[i]= xrecordobtth[12*i+k]; |
for (Int_t k =0; k <16; k++){ |
| 292 |
limth[i] = 45; |
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
| 293 |
} |
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
| 294 |
Canvasthdea->cd(k+1); |
} |
| 295 |
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
|
| 296 |
graph->SetMarkerColor(50); |
for (Int_t k =0; k <16; k++){ |
| 297 |
graph->SetLineColor(50); |
ythana[16*recordstot+16*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
| 298 |
graph->SetMarkerStyle(21); |
xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
| 299 |
graph->SetMarkerSize(0.3); |
} |
| 300 |
graph->SetMinimum(-10); |
|
| 301 |
graph->SetMaximum(60); |
for (Int_t k =0; k <6; k++){ |
| 302 |
graph->GetXaxis()->SetTitle("OBT"); |
ydea[6*recordstot+6*j+k] = convert_volt(tmr->TM_DEA_ANA[k]); |
| 303 |
graph->GetXaxis()->CenterTitle(); |
xrecordobtdea[6*recordstot+6*j+k] = tmr->TM_RECORD_OBT; |
| 304 |
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
} |
| 305 |
graph->GetYaxis()->CenterTitle(); |
} |
| 306 |
oss.str(""); |
recordstot=recordstot+tmpSize; |
| 307 |
oss << filename.Data() <<": " <<titoloth[k] ; |
} |
| 308 |
graph->SetTitle(oss.str().c_str()); |
|
| 309 |
|
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
| 310 |
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
| 311 |
pt->AddText("OFF"); |
|
| 312 |
pt->SetBorderSize(1); |
TLegend *leg1 = new TLegend(0.87,0.80,0.98,0.94, ""); |
| 313 |
pt->Draw(); |
leg1->SetFillColor(10); |
| 314 |
graph->Draw("ACP"); |
leg1->SetBorderSize(0); |
| 315 |
pt->Draw(); |
|
| 316 |
|
Canvascc->cd(); |
| 317 |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
pt = new TPaveText (.87,.95,.98,.98); |
| 318 |
threcord->SetLineColor(kBlue); |
oss.str(""); |
| 319 |
threcord->SetMarkerColor(kBlue); |
oss<<filename.Data(); |
| 320 |
threcord->SetMarkerStyle(21); |
pt->AddText(oss.str().c_str()); |
| 321 |
threcord->Draw("C"); |
pt->SetTextColor(1); |
| 322 |
} |
//pt->SetTextSize(1); |
| 323 |
} |
pt->SetFillColor(10); |
| 324 |
//thermistors number=16 |
pt->SetBorderSize(0); |
| 325 |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
pt->Draw(); |
| 326 |
for (Int_t k =0; k<16; k++){ |
|
| 327 |
for (Int_t i = 0; i < recordstot; i++){ |
/* |
| 328 |
ythana_1[i]= ythana[16*i+k]; |
TLine *line = new TLine; |
| 329 |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
line->SetLineColor(4); |
| 330 |
limth[i] = 45; |
line->SetLineWidth(2); |
| 331 |
} |
line->DrawLine(0, 0.60, 1, 0.60); |
| 332 |
Canvasthdea->cd(k+1); |
line->Draw(); |
| 333 |
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
line->DrawLine(0, 0.33, 1, 0.33); |
| 334 |
graph->SetMarkerColor(50); |
line->Draw(); |
| 335 |
graph->SetLineColor(50); |
line->DrawLine(0, 0.20, 1, 0.20); |
| 336 |
graph->SetMarkerStyle(21); |
line->Draw(); |
| 337 |
graph->SetMarkerSize(0.3); |
line->DrawLine(0, 0.13, 1, 0.13); |
| 338 |
graph->SetMinimum(-10); |
line->Draw(); |
| 339 |
graph->SetMaximum(60); |
*/ |
| 340 |
graph->GetXaxis()->SetTitle("OBT"); |
|
| 341 |
graph->GetXaxis()->CenterTitle(); |
|
| 342 |
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
|
| 343 |
graph->GetYaxis()->CenterTitle(); |
//CC Graph |
| 344 |
oss.str(""); |
for (Int_t k =0; k<16; k++){ |
| 345 |
oss << filename.Data() <<": " <<titoloth[k] ; |
for (Int_t i = 0; i < recordstot; i++){ |
| 346 |
graph->SetTitle(oss.str().c_str()); |
if (k>0) { |
| 347 |
|
yccdiagacq_11u[i]=yccdiagacq_1u[i]; |
| 348 |
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
yccdiagacq_11d[i]=yccdiagacq_1d[i]; |
| 349 |
pt->AddText("OFF"); |
} |
| 350 |
pt->SetBorderSize(1); |
yccdiagacq_1d[i]=0; |
| 351 |
pt->Draw(); |
yccdiagacq_1u[i]=0; |
| 352 |
graph->Draw("ACP"); |
if (yccdiagacq[16*i+k]==0) { |
| 353 |
pt->Draw(); |
yccdiagacq_1d[i]=-1; |
| 354 |
|
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
| 355 |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
} |
| 356 |
threcord->SetLineColor(kBlue); |
else if (yccdiagacq[16*i+k]==1){ |
| 357 |
threcord->SetMarkerColor(kBlue); |
yccdiagacq_1u[i]=1; |
| 358 |
threcord->SetMarkerStyle(21); |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
| 359 |
threcord->Draw("C"); |
} |
| 360 |
} |
if (k==1) { |
| 361 |
} |
if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1) yccipm12u[i]=1; |
| 362 |
|
else yccipm12u[i]=0; |
| 363 |
// DEA Graph |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipm12d[i]=-1; |
| 364 |
Canvasvoltdea->cd(); |
else yccipm12d[i]=0; |
| 365 |
for (Int_t k =0; k<6; k++){ |
} |
| 366 |
for (Int_t i = 0; i < recordstot; i++){ |
if (k==1 || k==3 || k==5 || k==7 || k==9) { |
| 367 |
ydea_1[i]= ydea[6*i + k]; |
if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1) yccipmkk1u[i]=1; |
| 368 |
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
else yccipmkk1u[i]=0; |
| 369 |
limvolt1[i]= 0.65; |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
| 370 |
limvolt2[i]= 3.15; |
else yccipmkk1d[i]=0; |
| 371 |
limvolt3[i]= 4.25; |
if (k==7 || k==9) { |
| 372 |
} |
/* if (yccipmkk1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
| 373 |
Canvasvoltdea->cd(k+1); |
else if (yccipmkk1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0 || (yccipmkk1d[i]==-1 && yccipm12u[i]==1)) yccipmerror[i]=-1; |
| 374 |
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
else yccipmerror[i]=0;*/ |
| 375 |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
if ((yccipmkk1u[i]==1 && ydea[6*i]<0.65 && ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccipmkk1u[i]==1 && ydea[6*i+1]<0.65 && ydea[6*i]>3.15 && ydea[6*i]<4.25)) yccipmerror[i]=1; |
| 376 |
pt->AddText("OFF"); |
else if ((yccipmkk1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccipmkk1d[i]==-1 && ydea[6*i+1]<0.65 && ydea[6*i]>3.15 && ydea[6*i]<4.25) || (yccipmkk1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65)) yccipmerror[i]=-1; |
| 377 |
pt->SetBorderSize(1); |
else yccipmerror[i]=0; |
| 378 |
pt->Draw(); |
} |
| 379 |
TPaveText *pt1 = new TPaveText (.84,.67,.92,.73); |
} |
| 380 |
pt1->AddText("ON"); |
if (k==6 || k==7 || k==8 || k==9) { |
| 381 |
pt1->SetBorderSize(1); |
/*if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
| 382 |
pt1->Draw(); |
else yccipmerror2[i]=0;*/ |
| 383 |
graph1->SetMarkerColor(50); |
if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror2[i]=-1; |
| 384 |
graph1->SetLineColor(50); |
else yccipmerror2[i]=0; |
| 385 |
graph1->SetMarkerStyle(21); |
} |
| 386 |
graph1->SetMarkerSize(0.3); |
if (k==13) { |
| 387 |
graph1->SetMinimum(0.0); |
if ((yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccdiagacq_1d[i]==-1 && ydea[6*i+1]<0.65 && ydea[6*i]>3.15 && ydea[6*i]<4.25)) yccdiagacq_1d[i]==-1; //psb on |
| 388 |
graph1->SetMaximum(5.0); |
if (yccdiagacq_1u[i]==1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccdiagacq_1u[i]==1; //psb off |
| 389 |
graph1->GetXaxis()->SetTitle("OBT"); |
/*if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
| 390 |
graph1->GetXaxis()->CenterTitle(); |
else if (yccdiagacq_1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
| 391 |
graph1->GetYaxis()->SetTitle("Voltage value (V)"); |
else yccipmerror[i]=0;*/ |
| 392 |
graph1->GetYaxis()->CenterTitle(); |
if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror[i]=-1; |
| 393 |
oss.str(""); |
else if ((yccdiagacq_1u[i]==1 && ydea[6*i]<0.65 && ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccdiagacq_1u[i]==1 && ydea[6*i+1]<0.65 && ydea[6*i]>3.15 && ydea[6*i]<4.25)) yccipmerror[i]=1; |
| 394 |
oss << filename.Data()<<": IPM "<<k+1<<" Voltage"; |
else yccipmerror[i]=0; //psb alarm |
| 395 |
graph1->SetTitle(oss.str().c_str()); |
} |
| 396 |
graph1->Draw("ACP"); |
if (k==15) { |
| 397 |
pt1->Draw(); |
yccdiagacq_11u[i]=0; |
| 398 |
pt->Draw(); |
yccdiagacq_11d[i]=0; |
| 399 |
|
} |
| 400 |
TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2); |
} |
| 401 |
graph2->SetMarkerColor(50); |
|
| 402 |
graph2->SetLineColor(50); |
//CC IPM |
| 403 |
graph2->SetMarkerStyle(21); |
if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){ |
| 404 |
graph2->SetMarkerSize(0.2); |
Canvascc->cd(m+1); |
| 405 |
graph2->SetMinimum(0.0); |
Canvascc->cd(m+1)->SetGridx(); |
| 406 |
graph2->SetMaximum(5.0); |
gPad->SetFillColor(10); |
| 407 |
graph2->Draw("CP"); |
gPad->SetFrameBorderSize(0); |
| 408 |
|
gPad->SetLineColor(1); |
| 409 |
TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3); |
gPad->SetFrameBorderMode(0); |
| 410 |
graph3->SetMarkerColor(50); |
|
| 411 |
graph3->SetLineColor(50); |
|
| 412 |
graph3->SetMarkerStyle(21); |
pt = new TPaveText (.01,.30,.10,.70); |
| 413 |
graph3->SetMarkerSize(0.2); |
oss.str(""); |
| 414 |
graph3->SetMinimum(0.0); |
oss<<titolocc[k]; |
| 415 |
graph3->SetMaximum(5.0); |
pt->AddText(oss.str().c_str()); |
| 416 |
graph3->Draw("CP"); |
pt->SetFillColor(10); |
| 417 |
|
pt->SetBorderSize(0); |
| 418 |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
pt->Draw(); |
| 419 |
dearecord->SetLineColor(kBlue); |
|
| 420 |
dearecord->SetLineWidth(1); |
|
| 421 |
dearecord->SetMarkerStyle(21); |
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
| 422 |
dearecord->SetMarkerSize(0.5); |
ccrecordd->SetTitle(""); |
| 423 |
dearecord->SetMarkerColor(kBlue); |
ccrecordd->SetFillColor(8); |
| 424 |
dearecord->Draw("CPL"); |
ccrecordd->GetXaxis()->SetLabelSize(0); |
| 425 |
} |
ccrecordd->GetXaxis()->SetTickLength(0); |
| 426 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
| 427 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
| 428 |
|
ccrecordd->SetMaximum(1.3); |
| 429 |
|
ccrecordd->SetMinimum(-1.3); |
| 430 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
| 431 |
|
ccrecordd->Draw("AB"); |
| 432 |
|
if (k==0) leg1->AddEntry(ccrecordd,"ON","f"); |
| 433 |
|
|
| 434 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
| 435 |
|
ccrecordu->SetTitle(""); |
| 436 |
|
ccrecordu->SetFillColor(17); |
| 437 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
| 438 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
| 439 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
| 440 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
| 441 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
| 442 |
|
ccrecordu->SetMaximum(1.3); |
| 443 |
|
ccrecordu->SetMinimum(-1.3); |
| 444 |
|
ccrecordu->Draw("Bsame"); |
| 445 |
|
if (k==0) leg1->AddEntry(ccrecordu,"OFF","f"); |
| 446 |
|
|
| 447 |
|
|
| 448 |
|
if (k==1 || k==3 || k==5){ |
| 449 |
|
Canvascc->cd(m); |
| 450 |
|
TGraph *ccrecorderrord = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1d); |
| 451 |
|
ccrecorderrord->SetTitle(""); |
| 452 |
|
ccrecorderrord->SetFillColor(2); |
| 453 |
|
ccrecorderrord->GetXaxis()->SetLabelSize(0); |
| 454 |
|
ccrecorderrord->GetXaxis()->SetTickLength(0); |
| 455 |
|
ccrecorderrord->GetYaxis()->SetLabelSize(0); |
| 456 |
|
ccrecorderrord->GetYaxis()->SetTickLength(0); |
| 457 |
|
ccrecorderrord->SetMaximum(1.3); |
| 458 |
|
ccrecorderrord->SetMinimum(-1.3); |
| 459 |
|
ccrecorderrord->GetXaxis()->SetAxisColor(0); |
| 460 |
|
ccrecorderrord->Draw("Bsame"); |
| 461 |
|
|
| 462 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1u); |
| 463 |
|
ccrecorderroru->SetTitle(""); |
| 464 |
|
ccrecorderroru->SetFillColor(2); |
| 465 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
| 466 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
| 467 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
| 468 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
| 469 |
|
ccrecorderroru->SetMaximum(1.3); |
| 470 |
|
ccrecorderroru->SetMinimum(-1.3); |
| 471 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
| 472 |
|
ccrecorderroru->Draw("Bsame"); |
| 473 |
|
|
| 474 |
|
Canvascc->cd(m+1); |
| 475 |
|
ccrecorderrord->Draw("Bsame"); |
| 476 |
|
ccrecorderroru->Draw("Bsame"); |
| 477 |
|
} |
| 478 |
|
|
| 479 |
|
|
| 480 |
|
Double_t xmin; |
| 481 |
|
Double_t xmax; |
| 482 |
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
| 483 |
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
| 484 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
| 485 |
|
axis->Draw("same"); |
| 486 |
|
/*TF1 *func1 = new TF1("func1", "0"); |
| 487 |
|
func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]); |
| 488 |
|
func1->SetLineColor(1); |
| 489 |
|
func1->SetLineStyle(1); |
| 490 |
|
func1->SetLineWidth(2); |
| 491 |
|
func1->Draw("same");*/ |
| 492 |
|
|
| 493 |
|
m=m+1; |
| 494 |
|
} |
| 495 |
|
|
| 496 |
|
//CC idaq-khb-tof |
| 497 |
|
if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){ |
| 498 |
|
Canvascc->cd(l+7); |
| 499 |
|
gPad->SetFillColor(10); |
| 500 |
|
gPad->SetFrameBorderSize(0); |
| 501 |
|
|
| 502 |
|
pt = new TPaveText (.00,.30,.09,.70); |
| 503 |
|
oss.str(""); |
| 504 |
|
oss<<titolocc[k]; |
| 505 |
|
pt->AddText(oss.str().c_str()); |
| 506 |
|
pt->SetFillColor(10); |
| 507 |
|
pt->SetBorderSize(0); |
| 508 |
|
pt->Draw(); |
| 509 |
|
|
| 510 |
|
|
| 511 |
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
| 512 |
|
ccrecordd->SetTitle(""); |
| 513 |
|
if (k==14 || k==15) ccrecordd->SetFillColor(2); |
| 514 |
|
else ccrecordd->SetFillColor(8); |
| 515 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
| 516 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
| 517 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
| 518 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
| 519 |
|
ccrecordd->SetMaximum(1.3); |
| 520 |
|
ccrecordd->SetMinimum(-1.3); |
| 521 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
| 522 |
|
ccrecordd->Draw("AB"); |
| 523 |
|
|
| 524 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
| 525 |
|
ccrecordu->SetTitle(""); |
| 526 |
|
if (k==14 || k==15) { |
| 527 |
|
ccrecordu->SetFillColor(7); |
| 528 |
|
if (k==14) leg1->AddEntry(ccrecordu,"ON-OFF-LATCHUP","f"); |
| 529 |
|
} |
| 530 |
|
else ccrecordu->SetFillColor(17); |
| 531 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
| 532 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
| 533 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
| 534 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
| 535 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
| 536 |
|
ccrecordu->SetMaximum(1.3); |
| 537 |
|
ccrecordu->SetMinimum(-1.3); |
| 538 |
|
ccrecordu->Draw("Bsame"); |
| 539 |
|
|
| 540 |
|
if (k==6 || k==7 || k==8 || k==9){ |
| 541 |
|
Canvascc->cd(l+7); |
| 542 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror2); |
| 543 |
|
ccrecorderroru->SetTitle(""); |
| 544 |
|
ccrecorderroru->SetFillColor(2); |
| 545 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
| 546 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
| 547 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
| 548 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
| 549 |
|
ccrecorderroru->SetMaximum(1.3); |
| 550 |
|
ccrecorderroru->SetMinimum(-1.3); |
| 551 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
| 552 |
|
ccrecorderroru->Draw("Bsame"); |
| 553 |
|
} |
| 554 |
|
|
| 555 |
|
|
| 556 |
|
if (k==7 || k==9){ |
| 557 |
|
Canvascc->cd(l+7-1); |
| 558 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror); |
| 559 |
|
ccrecorderroru->SetTitle(""); |
| 560 |
|
ccrecorderroru->SetFillColor(2); |
| 561 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
| 562 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
| 563 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
| 564 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
| 565 |
|
ccrecorderroru->SetMaximum(1.3); |
| 566 |
|
ccrecorderroru->SetMinimum(-1.3); |
| 567 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
| 568 |
|
if (k==7) leg1->AddEntry(ccrecorderroru,"ALARM","f"); |
| 569 |
|
ccrecorderroru->Draw("Bsame"); |
| 570 |
|
|
| 571 |
|
Canvascc->cd(l+7); |
| 572 |
|
ccrecorderroru->Draw("Bsame"); |
| 573 |
|
} |
| 574 |
|
|
| 575 |
|
|
| 576 |
|
Double_t xmin; |
| 577 |
|
Double_t xmax; |
| 578 |
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
| 579 |
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
| 580 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 1.5); |
| 581 |
|
axis->Draw("same"); |
| 582 |
|
/*TF1 *func1 = new TF1("func1", "0"); |
| 583 |
|
func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]); |
| 584 |
|
func1->SetLineColor(1); |
| 585 |
|
func1->SetLineStyle(1); |
| 586 |
|
func1->SetLineWidth(2); |
| 587 |
|
func1->Draw("same");*/ |
| 588 |
|
l=l+1; |
| 589 |
|
|
| 590 |
|
} |
| 591 |
|
|
| 592 |
|
//CC vrl |
| 593 |
|
if (k==11 || k==12 || k==13 ){ |
| 594 |
|
if (k==13) Canvascc->cd(13); |
| 595 |
|
if (k==11) Canvascc->cd(14); |
| 596 |
|
if (k==12) Canvascc->cd(15); |
| 597 |
|
gPad->SetFillColor(10); |
| 598 |
|
gPad->SetFrameBorderSize(0); |
| 599 |
|
|
| 600 |
|
pt = new TPaveText (.01,.30,.09,.70); |
| 601 |
|
oss.str(""); |
| 602 |
|
oss<<titolocc[k]; |
| 603 |
|
pt->AddText(oss.str().c_str()); |
| 604 |
|
pt->SetFillColor(10); |
| 605 |
|
pt->SetBorderSize(0); |
| 606 |
|
pt->Draw(); |
| 607 |
|
|
| 608 |
|
if (k==11 || k==12){ |
| 609 |
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
| 610 |
|
ccrecordd->SetTitle(""); |
| 611 |
|
ccrecordd->SetFillColor(8); |
| 612 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
| 613 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
| 614 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
| 615 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
| 616 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
| 617 |
|
ccrecordd->SetMaximum(1.3); |
| 618 |
|
ccrecordd->SetMinimum(-1.3); |
| 619 |
|
ccrecordd->Draw("AB"); |
| 620 |
|
|
| 621 |
|
|
| 622 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
| 623 |
|
ccrecordu->SetTitle(""); |
| 624 |
|
ccrecordu->SetFillColor(17); |
| 625 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
| 626 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
| 627 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
| 628 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
| 629 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
| 630 |
|
ccrecordu->SetMaximum(1.3); |
| 631 |
|
ccrecordu->SetMinimum(-1.3); |
| 632 |
|
ccrecordu->Draw("Bsame"); |
| 633 |
|
|
| 634 |
|
Double_t xmin; |
| 635 |
|
Double_t xmax; |
| 636 |
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
| 637 |
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
| 638 |
|
if (k==12){ |
| 639 |
|
TGaxis *axis = new TGaxis (xmin, -1, xmax, -1, xmin, xmax, 510, "", 0); |
| 640 |
|
axis->SetLabelSize(0.24); |
| 641 |
|
axis->SetLabelColor(1); |
| 642 |
|
axis->SetTitle("OBT (ms)"); |
| 643 |
|
//axis->CenterTitle(); |
| 644 |
|
axis->SetTitleOffset(0.4); |
| 645 |
|
axis->SetTitleSize(0.21); |
| 646 |
|
axis->Draw(); |
| 647 |
|
TF1 *func1 = new TF1("func1", "0"); |
| 648 |
|
func1->SetRange(xmin,xmax); |
| 649 |
|
func1->SetLineColor(1); |
| 650 |
|
func1->SetLineStyle(1); |
| 651 |
|
func1->SetLineWidth(1); |
| 652 |
|
func1->Draw("same"); |
| 653 |
|
} |
| 654 |
|
if (k==11){ |
| 655 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
| 656 |
|
axis->SetLineWidth(1); |
| 657 |
|
axis->SetTickSize(2); |
| 658 |
|
axis->Draw("same"); |
| 659 |
|
} |
| 660 |
|
} |
| 661 |
|
|
| 662 |
|
if (k==13){ |
| 663 |
|
Canvascc->cd(13); |
| 664 |
|
|
| 665 |
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
| 666 |
|
ccrecordd->SetTitle(""); |
| 667 |
|
ccrecordd->SetFillColor(8); |
| 668 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
| 669 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
| 670 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
| 671 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
| 672 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
| 673 |
|
ccrecordd->SetMaximum(1.3); |
| 674 |
|
ccrecordd->SetMinimum(-1.3); |
| 675 |
|
ccrecordd->Draw("AB"); |
| 676 |
|
|
| 677 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
| 678 |
|
ccrecordu->SetTitle(""); |
| 679 |
|
ccrecordu->SetFillColor(17); |
| 680 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
| 681 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
| 682 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
| 683 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
| 684 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
| 685 |
|
ccrecordu->SetMaximum(1.3); |
| 686 |
|
ccrecordu->SetMinimum(-1.3); |
| 687 |
|
ccrecordu->Draw("Bsame"); |
| 688 |
|
|
| 689 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror); |
| 690 |
|
ccrecorderroru->SetTitle(""); |
| 691 |
|
ccrecorderroru->SetFillColor(2); |
| 692 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
| 693 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
| 694 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
| 695 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
| 696 |
|
ccrecorderroru->SetMaximum(1.3); |
| 697 |
|
ccrecorderroru->SetMinimum(-1.3); |
| 698 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
| 699 |
|
ccrecorderroru->Draw("Bsame"); |
| 700 |
|
|
| 701 |
|
|
| 702 |
|
Double_t xmin=ccrecordu->GetXaxis()->GetXmin(); |
| 703 |
|
Double_t xmax=ccrecordu->GetXaxis()->GetXmax(); |
| 704 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
| 705 |
|
axis->SetLineWidth(1); |
| 706 |
|
axis->SetTickSize(2); |
| 707 |
|
axis->Draw("same"); |
| 708 |
|
} |
| 709 |
|
|
| 710 |
|
} |
| 711 |
|
|
| 712 |
|
} |
| 713 |
|
|
| 714 |
|
Canvascc->cd(); |
| 715 |
|
leg1->Draw(); |
| 716 |
|
Canvascc->Update(); |
| 717 |
|
|
| 718 |
|
// TH Graph |
| 719 |
|
Canvasthdea->cd(); |
| 720 |
|
//thermistors number=16 |
| 721 |
|
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
| 722 |
|
for (Int_t k =0; k<16; k++){ |
| 723 |
|
for (Int_t i = 0; i < recordstot; i++){ |
| 724 |
|
ythana_1[i]= ythana[16*i+k]; |
| 725 |
|
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
| 726 |
|
} |
| 727 |
|
Canvasthdea->cd(k+1); |
| 728 |
|
|
| 729 |
|
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
| 730 |
|
threcord->SetLineColor(kBlue); |
| 731 |
|
threcord->SetMarkerColor(kBlue); |
| 732 |
|
threcord->SetMarkerStyle(21); |
| 733 |
|
threcord->SetMinimum(-10); |
| 734 |
|
threcord->SetMaximum(60); |
| 735 |
|
threcord->GetXaxis()->SetTitle("OBT"); |
| 736 |
|
threcord->GetXaxis()->CenterTitle(); |
| 737 |
|
threcord->GetYaxis()->SetTitle("Temperature value (°C)"); |
| 738 |
|
threcord->GetYaxis()->CenterTitle(); |
| 739 |
|
oss.str(""); |
| 740 |
|
oss << filename.Data() <<": " <<titoloth[k] ; |
| 741 |
|
threcord->SetTitle(oss.str().c_str()); |
| 742 |
|
|
| 743 |
|
Double_t xmin=threcord->GetXaxis()->GetXmin(); |
| 744 |
|
Double_t xmax=threcord->GetXaxis()->GetXmax(); |
| 745 |
|
if (k==10 || k==11 ) { |
| 746 |
|
TPaveText *pt = new TPaveText (.45,.75,.55,.82); |
| 747 |
|
pt->AddText("OFF"); |
| 748 |
|
pt->SetBorderSize(1); |
| 749 |
|
pt->Draw(); |
| 750 |
|
threcord->Draw("ACsame"); |
| 751 |
|
TF1 *func1 = new TF1("func1", "50"); |
| 752 |
|
func1->SetRange(xmin,xmax); |
| 753 |
|
func1->SetLineColor(2); |
| 754 |
|
func1->SetLineStyle(1); |
| 755 |
|
func1->SetLineWidth(2); |
| 756 |
|
func1->Draw("same"); |
| 757 |
|
pt->Draw(); |
| 758 |
|
}else { |
| 759 |
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
| 760 |
|
pt->AddText("OFF"); |
| 761 |
|
pt->SetBorderSize(1); |
| 762 |
|
pt->Draw(); |
| 763 |
|
threcord->Draw("ACsame"); |
| 764 |
|
TF1 *func1 = new TF1("func1", "45"); |
| 765 |
|
func1->SetRange(xmin,xmax); |
| 766 |
|
func1->SetLineColor(2); |
| 767 |
|
func1->SetLineStyle(1); |
| 768 |
|
func1->SetLineWidth(2); |
| 769 |
|
func1->Draw("same"); |
| 770 |
|
pt->Draw(); |
| 771 |
|
} |
| 772 |
|
|
| 773 |
|
|
| 774 |
|
|
| 775 |
|
} |
| 776 |
|
} |
| 777 |
|
|
| 778 |
|
// DEA Graph |
| 779 |
|
Canvasvoltdea->cd(); |
| 780 |
|
for (Int_t k =0; k<6; k++){ |
| 781 |
|
for (Int_t i = 0; i < recordstot; i++){ |
| 782 |
|
ydea_1[i]= ydea[6*i + k]; |
| 783 |
|
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
| 784 |
|
} |
| 785 |
|
Canvasvoltdea->cd(k+1); |
| 786 |
|
|
| 787 |
|
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
| 788 |
|
pt->AddText("OFF"); |
| 789 |
|
pt->SetBorderSize(1); |
| 790 |
|
pt->Draw(); |
| 791 |
|
TPaveText *pt1 = new TPaveText (.84,.67,.92,.73); |
| 792 |
|
pt1->AddText("ON"); |
| 793 |
|
pt1->SetBorderSize(1); |
| 794 |
|
pt1->Draw(); |
| 795 |
|
|
| 796 |
|
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
| 797 |
|
dearecord->SetLineColor(kBlue); |
| 798 |
|
dearecord->SetLineWidth(1); |
| 799 |
|
dearecord->SetMarkerStyle(21); |
| 800 |
|
dearecord->SetMarkerSize(0.5); |
| 801 |
|
dearecord->SetMarkerColor(kBlue); |
| 802 |
|
dearecord->SetMinimum(0.0); |
| 803 |
|
dearecord->SetMaximum(5.0); |
| 804 |
|
dearecord->GetXaxis()->SetTitle("OBT"); |
| 805 |
|
dearecord->GetXaxis()->CenterTitle(); |
| 806 |
|
dearecord->GetYaxis()->SetTitle("Voltage value (V)"); |
| 807 |
|
dearecord->GetYaxis()->CenterTitle(); |
| 808 |
|
oss.str(""); |
| 809 |
|
oss << filename.Data()<<": IPM "<<k+1<<" output"; |
| 810 |
|
dearecord->SetTitle(oss.str().c_str()); |
| 811 |
|
dearecord->Draw("ACPLsame"); |
| 812 |
|
|
| 813 |
|
Double_t xmin=dearecord->GetXaxis()->GetXmin(); |
| 814 |
|
Double_t xmax=dearecord->GetXaxis()->GetXmax(); |
| 815 |
|
TF1 *func1 = new TF1("func1", "0.65"); |
| 816 |
|
func1->SetRange(xmin, xmax); |
| 817 |
|
func1->SetLineColor(2); |
| 818 |
|
func1->SetLineStyle(1); |
| 819 |
|
func1->SetLineWidth(2); |
| 820 |
|
func1->Draw("Csame"); |
| 821 |
|
|
| 822 |
|
TF1 *func2 = new TF1("func2", "3.15"); |
| 823 |
|
func2->SetRange(xmin, xmax); |
| 824 |
|
func2->SetLineColor(2); |
| 825 |
|
func2->SetLineStyle(1); |
| 826 |
|
func2->SetLineWidth(2); |
| 827 |
|
func2->Draw("Csame"); |
| 828 |
|
|
| 829 |
|
TF1 *func3 = new TF1("func3", "4.25"); |
| 830 |
|
func3->SetRange(xmin, xmax); |
| 831 |
|
func3->SetLineColor(2); |
| 832 |
|
func3->SetLineStyle(1); |
| 833 |
|
func3->SetLineWidth(2); |
| 834 |
|
func3->Draw("Csame"); |
| 835 |
|
|
| 836 |
|
|
| 837 |
|
pt1->Draw(); |
| 838 |
|
pt->Draw(); |
| 839 |
|
} |
| 840 |
|
|
| 841 |
|
|
| 842 |
|
stringstream oss1, oss2, oss3, oss4; |
| 843 |
|
oss.str(""); |
| 844 |
|
oss1.str(""); |
| 845 |
|
oss2.str(""); |
| 846 |
|
oss << outDir.Data() << filename.Data() << "_Tmtc_cc_"<<interval+1<<"." << format; |
| 847 |
|
oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea_"<<interval+1<<"." << format; |
| 848 |
|
oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea_"<<interval+1<<"." << format; |
| 849 |
|
Canvascc->SaveAs(oss.str().c_str()); |
| 850 |
|
Canvasthdea->SaveAs(oss1.str().c_str()); |
| 851 |
|
Canvasvoltdea->SaveAs(oss2.str().c_str()); //// fine del lavoro sul sottogruppo |
| 852 |
|
|
| 853 |
|
Canvascc->Clear(); |
| 854 |
|
Canvasthdea->Clear(); |
| 855 |
|
Canvasvoltdea->Clear(); |
| 856 |
|
//gROOT->GetListOfCanvases()->Delete(); |
| 857 |
|
//gROOT->Reset(); |
| 858 |
|
|
| 859 |
|
} |
| 860 |
|
|
|
stringstream oss1, oss2, oss3, oss4; |
|
|
oss.str(""); |
|
|
oss1.str(""); |
|
|
oss2.str(""); |
|
|
oss3.str(""); |
|
|
oss4.str(""); |
|
|
oss << outDir.Data() << filename.Data() << "_Tmtc_cc_hot." << format; |
|
|
oss3 << outDir.Data() << filename.Data() << "_Tmtc_cc_cold." << format; |
|
|
oss4 << outDir.Data() << filename.Data() << "_Tmtc_cc_vrl." << format; |
|
|
oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea." << format; |
|
|
oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea." << format; |
|
|
Canvascchot->SaveAs(oss.str().c_str()); |
|
|
Canvascccold->SaveAs(oss3.str().c_str()); |
|
|
Canvasccvrl->SaveAs(oss4.str().c_str()); |
|
|
Canvasthdea->SaveAs(oss1.str().c_str()); |
|
|
Canvasvoltdea->SaveAs(oss2.str().c_str()); |
|
| 861 |
|
|
| 862 |
file->Close(); |
file->Close(); |
| 863 |
} |
} |
| 864 |
|
|
| 865 |
|
|