1 |
|
|
2 |
|
|
3 |
/** |
/** |
4 |
* TmtcTemperature |
* TmtcTemperature |
5 |
* author Marcelli |
* author Marcelli |
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"}; |
|
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"}; |
|
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_TH","DCDC_TH","CPU_TH1","CPU_TH2", "IPM_CPU_TH", "VRL_TH1", "VRL_TH2", "VME_COOL_TH"}; |
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; |
237 |
ev[0]=0; |
ev[0]=0; |
238 |
records[0]=0; |
records[0]=0; |
239 |
OBT[0]=tmr->TM_RECORD_OBT; |
OBT[0]=tmr->TM_RECORD_OBT; |
240 |
}else if (fmod(i, 50)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
}else if (fmod(i, 30)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
241 |
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
242 |
tot=tot+1; |
tot=tot+1; |
243 |
if (recordstotmax<recordstot) recordstotmax=recordstot; |
if (recordstotmax<recordstot) recordstotmax=recordstot; |
250 |
} |
} |
251 |
|
|
252 |
|
|
|
|
|
253 |
const Int_t lungmax=16*recordstotmax; |
const Int_t lungmax=16*recordstotmax; |
254 |
const Int_t lungmin=6*recordstotmax; |
const Int_t lungmin=6*recordstotmax; |
255 |
|
|
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 |
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]; |
Float_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax], yccipmerror2[lungmax]; |
|
|
|
|
Double_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax], yccipmerror2[lungmax]; |
|
|
|
|
259 |
|
|
260 |
|
|
261 |
/////ciclo sulle pagine//////////////////// |
/////ciclo sulle pagine//////////////////// |
270 |
Canvasthdea->SetFillColor(10); |
Canvasthdea->SetFillColor(10); |
271 |
Canvasthdea->Divide(4,4); |
Canvasthdea->Divide(4,4); |
272 |
|
|
|
|
|
273 |
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
274 |
Canvasvoltdea->SetFillColor(10); |
Canvasvoltdea->SetFillColor(10); |
275 |
Canvasvoltdea->Divide(2,3); |
Canvasvoltdea->Divide(2,3); |
279 |
|
|
280 |
for (Int_t i = ev[interval]; i < ev[interval+1]; i++){ //ciclo su un sottogruppo |
for (Int_t i = ev[interval]; i < ev[interval+1]; i++){ //ciclo su un sottogruppo |
281 |
// cout<<"ciclo da "<<ev[interval]<<" a "<< ev[interval+1]<<"\n"; |
// cout<<"ciclo da "<<ev[interval]<<" a "<< ev[interval+1]<<"\n"; |
282 |
|
|
283 |
tmtcBr->GetEntry(i); |
tmtcBr->GetEntry(i); |
284 |
l=0; |
l=0; |
285 |
m=0; |
m=0; |
369 |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
370 |
else yccipmkk1d[i]=0; |
else yccipmkk1d[i]=0; |
371 |
if (k==7 || k==9) { |
if (k==7 || k==9) { |
372 |
if (yccipmkk1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
/* if (yccipmkk1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
373 |
else if (yccipmkk1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0 || (yccipmkk1d[i]==-1 && yccipm12u[i]==1)) yccipmerror[i]=-1; |
else if (yccipmkk1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0 || (yccipmkk1d[i]==-1 && yccipm12u[i]==1)) yccipmerror[i]=-1; |
374 |
|
else yccipmerror[i]=0;*/ |
375 |
|
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 |
|
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 |
else yccipmerror[i]=0; |
else yccipmerror[i]=0; |
378 |
} |
} |
379 |
} |
} |
380 |
if (k==6 || k==7 || k==8 || k==9) { |
if (k==6 || k==7 || k==8 || k==9) { |
381 |
if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
/*if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
382 |
|
else yccipmerror2[i]=0;*/ |
383 |
|
if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror2[i]=-1; |
384 |
else yccipmerror2[i]=0; |
else yccipmerror2[i]=0; |
385 |
} |
} |
386 |
if (k==13) { |
if (k==13) { |
387 |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccdiagacq_1d[i]==-1; //psb on |
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 |
if (yccdiagacq_1u[i]==1 && yccipm12u[i]==1) yccdiagacq_1u[i]==1; //psb off |
if (yccdiagacq_1u[i]==1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccdiagacq_1u[i]==1; //psb off |
389 |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
/*if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
390 |
else if (yccdiagacq_1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
else if (yccdiagacq_1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
391 |
else yccipmerror[i]=0; //psb alarm |
else yccipmerror[i]=0;*/ |
392 |
|
if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror[i]=-1; |
393 |
|
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 |
|
else yccipmerror[i]=0; //psb alarm |
395 |
} |
} |
396 |
if (k==15) { |
if (k==15) { |
397 |
yccdiagacq_11u[i]=0; |
yccdiagacq_11u[i]=0; |
717 |
|
|
718 |
// TH Graph |
// TH Graph |
719 |
Canvasthdea->cd(); |
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"); |
|
|
} |
|
|
} |
|
720 |
//thermistors number=16 |
//thermistors number=16 |
721 |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
722 |
for (Int_t k =0; k<16; k++){ |
for (Int_t k =0; k<16; k++){ |
723 |
for (Int_t i = 0; i < recordstot; i++){ |
for (Int_t i = 0; i < recordstot; i++){ |
724 |
ythana_1[i]= ythana[16*i+k]; |
ythana_1[i]= ythana[16*i+k]; |
725 |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
|
limth[i] = 45; |
|
726 |
} |
} |
727 |
Canvasthdea->cd(k+1); |
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(); |
|
728 |
|
|
729 |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
730 |
threcord->SetLineColor(kBlue); |
// threcord->SetLineColor(kBlue); |
731 |
|
threcord->SetMarkerSize(0.2); |
732 |
threcord->SetMarkerColor(kBlue); |
threcord->SetMarkerColor(kBlue); |
733 |
threcord->SetMarkerStyle(21); |
threcord->SetMarkerStyle(21); |
734 |
threcord->Draw("C"); |
threcord->SetMinimum(-10); |
735 |
|
threcord->SetMaximum(60); |
736 |
|
threcord->GetXaxis()->SetTitle("OBT"); |
737 |
|
threcord->GetXaxis()->CenterTitle(); |
738 |
|
threcord->GetYaxis()->SetTitle("Temperature value (°C)"); |
739 |
|
threcord->GetYaxis()->CenterTitle(); |
740 |
|
oss.str(""); |
741 |
|
oss << filename.Data() <<": " <<titoloth[k] ; |
742 |
|
threcord->SetTitle(oss.str().c_str()); |
743 |
|
|
744 |
|
Double_t xmin=threcord->GetXaxis()->GetXmin(); |
745 |
|
Double_t xmax=threcord->GetXaxis()->GetXmax(); |
746 |
|
if (k==10 || k==11 ) { |
747 |
|
TPaveText *pt = new TPaveText (.45,.75,.55,.82); |
748 |
|
pt->AddText("OFF"); |
749 |
|
pt->SetBorderSize(1); |
750 |
|
pt->Draw(); |
751 |
|
threcord->Draw("APsame"); |
752 |
|
TF1 *func1 = new TF1("func1", "50"); |
753 |
|
func1->SetRange(xmin,xmax); |
754 |
|
func1->SetLineColor(2); |
755 |
|
func1->SetLineStyle(1); |
756 |
|
func1->SetLineWidth(2); |
757 |
|
func1->Draw("same"); |
758 |
|
pt->Draw(); |
759 |
|
}else { |
760 |
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
761 |
|
pt->AddText("OFF"); |
762 |
|
pt->SetBorderSize(1); |
763 |
|
pt->Draw(); |
764 |
|
threcord->Draw("APsame"); |
765 |
|
TF1 *func1 = new TF1("func1", "45"); |
766 |
|
func1->SetRange(xmin,xmax); |
767 |
|
func1->SetLineColor(2); |
768 |
|
func1->SetLineStyle(1); |
769 |
|
func1->SetLineWidth(2); |
770 |
|
func1->Draw("same"); |
771 |
|
pt->Draw(); |
772 |
|
} |
773 |
|
|
774 |
|
|
775 |
|
|
776 |
} |
} |
777 |
} |
} |
778 |
|
|
782 |
for (Int_t i = 0; i < recordstot; i++){ |
for (Int_t i = 0; i < recordstot; i++){ |
783 |
ydea_1[i]= ydea[6*i + k]; |
ydea_1[i]= ydea[6*i + k]; |
784 |
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
|
limvolt1[i]= 0.65; |
|
|
limvolt2[i]= 3.15; |
|
|
limvolt3[i]= 4.25; |
|
785 |
} |
} |
786 |
Canvasvoltdea->cd(k+1); |
Canvasvoltdea->cd(k+1); |
787 |
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
|
788 |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
789 |
pt->AddText("OFF"); |
pt->AddText("OFF"); |
790 |
pt->SetBorderSize(1); |
pt->SetBorderSize(1); |
793 |
pt1->AddText("ON"); |
pt1->AddText("ON"); |
794 |
pt1->SetBorderSize(1); |
pt1->SetBorderSize(1); |
795 |
pt1->Draw(); |
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"); |
|
796 |
|
|
797 |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
798 |
dearecord->SetLineColor(kBlue); |
//dearecord->SetLineColor(kBlue); |
799 |
dearecord->SetLineWidth(1); |
//dearecord->SetLineWidth(1); |
800 |
dearecord->SetMarkerStyle(21); |
dearecord->SetMarkerStyle(21); |
801 |
dearecord->SetMarkerSize(0.5); |
dearecord->SetMarkerSize(0.5); |
802 |
dearecord->SetMarkerColor(kBlue); |
dearecord->SetMarkerColor(kBlue); |
803 |
dearecord->Draw("CPL"); |
dearecord->SetMinimum(0.0); |
804 |
|
dearecord->SetMaximum(5.0); |
805 |
|
dearecord->GetXaxis()->SetTitle("OBT"); |
806 |
|
dearecord->GetXaxis()->CenterTitle(); |
807 |
|
dearecord->GetYaxis()->SetTitle("Voltage value (V)"); |
808 |
|
dearecord->GetYaxis()->CenterTitle(); |
809 |
|
oss.str(""); |
810 |
|
oss << filename.Data()<<": IPM "<<k+1<<" output"; |
811 |
|
dearecord->SetTitle(oss.str().c_str()); |
812 |
|
dearecord->Draw("APsame"); |
813 |
|
//dearecord->Draw("ACPLsame"); |
814 |
|
|
815 |
|
Double_t xmin=dearecord->GetXaxis()->GetXmin(); |
816 |
|
Double_t xmax=dearecord->GetXaxis()->GetXmax(); |
817 |
|
TF1 *func1 = new TF1("func1", "0.65"); |
818 |
|
func1->SetRange(xmin, xmax); |
819 |
|
func1->SetLineColor(2); |
820 |
|
func1->SetLineStyle(1); |
821 |
|
func1->SetLineWidth(2); |
822 |
|
func1->Draw("Csame"); |
823 |
|
|
824 |
|
TF1 *func2 = new TF1("func2", "3.15"); |
825 |
|
func2->SetRange(xmin, xmax); |
826 |
|
func2->SetLineColor(2); |
827 |
|
func2->SetLineStyle(1); |
828 |
|
func2->SetLineWidth(2); |
829 |
|
func2->Draw("Csame"); |
830 |
|
|
831 |
|
TF1 *func3 = new TF1("func3", "4.25"); |
832 |
|
func3->SetRange(xmin, xmax); |
833 |
|
func3->SetLineColor(2); |
834 |
|
func3->SetLineStyle(1); |
835 |
|
func3->SetLineWidth(2); |
836 |
|
func3->Draw("Csame"); |
837 |
|
|
838 |
|
|
839 |
|
pt1->Draw(); |
840 |
|
pt->Draw(); |
841 |
} |
} |
842 |
|
|
843 |
|
|