211 |
} |
} |
212 |
|
|
213 |
|
|
214 |
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"}; |
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"}; |
215 |
|
|
216 |
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"}; |
217 |
|
|
218 |
|
|
219 |
const Int_t size = nevents; |
const Int_t size = nevents; |
238 |
ev[0]=0; |
ev[0]=0; |
239 |
records[0]=0; |
records[0]=0; |
240 |
OBT[0]=tmr->TM_RECORD_OBT; |
OBT[0]=tmr->TM_RECORD_OBT; |
241 |
}else if (fmod(i, 50)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
}else if (fmod(i, 35)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
242 |
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
243 |
tot=tot+1; |
tot=tot+1; |
244 |
if (recordstotmax<recordstot) recordstotmax=recordstot; |
if (recordstotmax<recordstot) recordstotmax=recordstot; |
256 |
const Int_t lungmin=6*recordstotmax; |
const Int_t lungmin=6*recordstotmax; |
257 |
|
|
258 |
|
|
259 |
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]; |
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]; |
260 |
|
|
261 |
Double_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]; |
262 |
|
|
373 |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
374 |
else yccipmkk1d[i]=0; |
else yccipmkk1d[i]=0; |
375 |
if (k==7 || k==9) { |
if (k==7 || k==9) { |
376 |
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; |
377 |
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; |
378 |
|
else yccipmerror[i]=0;*/ |
379 |
|
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; |
380 |
|
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; |
381 |
else yccipmerror[i]=0; |
else yccipmerror[i]=0; |
382 |
} |
} |
383 |
} |
} |
384 |
if (k==6 || k==7 || k==8 || k==9) { |
if (k==6 || k==7 || k==8 || k==9) { |
385 |
if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
/*if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
386 |
|
else yccipmerror2[i]=0;*/ |
387 |
|
if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror2[i]=-1; |
388 |
else yccipmerror2[i]=0; |
else yccipmerror2[i]=0; |
389 |
} |
} |
390 |
if (k==13) { |
if (k==13) { |
391 |
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 |
392 |
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 |
393 |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
/*if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
394 |
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; |
395 |
else yccipmerror[i]=0; //psb alarm |
else yccipmerror[i]=0;*/ |
396 |
|
if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror[i]=-1; |
397 |
|
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; |
398 |
|
else yccipmerror[i]=0; //psb alarm |
399 |
} |
} |
400 |
if (k==15) { |
if (k==15) { |
401 |
yccdiagacq_11u[i]=0; |
yccdiagacq_11u[i]=0; |
721 |
|
|
722 |
// TH Graph |
// TH Graph |
723 |
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"); |
|
|
} |
|
|
} |
|
724 |
//thermistors number=16 |
//thermistors number=16 |
725 |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
726 |
for (Int_t k =0; k<16; k++){ |
for (Int_t k =0; k<16; k++){ |
727 |
for (Int_t i = 0; i < recordstot; i++){ |
for (Int_t i = 0; i < recordstot; i++){ |
728 |
ythana_1[i]= ythana[16*i+k]; |
ythana_1[i]= ythana[16*i+k]; |
729 |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
|
limth[i] = 45; |
|
730 |
} |
} |
731 |
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(); |
|
732 |
|
|
733 |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
734 |
threcord->SetLineColor(kBlue); |
threcord->SetLineColor(kBlue); |
735 |
threcord->SetMarkerColor(kBlue); |
threcord->SetMarkerColor(kBlue); |
736 |
threcord->SetMarkerStyle(21); |
threcord->SetMarkerStyle(21); |
737 |
threcord->Draw("C"); |
threcord->SetMinimum(-10); |
738 |
|
threcord->SetMaximum(60); |
739 |
|
threcord->GetXaxis()->SetTitle("OBT"); |
740 |
|
threcord->GetXaxis()->CenterTitle(); |
741 |
|
threcord->GetYaxis()->SetTitle("Temperature value (°C)"); |
742 |
|
threcord->GetYaxis()->CenterTitle(); |
743 |
|
oss.str(""); |
744 |
|
oss << filename.Data() <<": " <<titoloth[k] ; |
745 |
|
threcord->SetTitle(oss.str().c_str()); |
746 |
|
|
747 |
|
Double_t xmin=threcord->GetXaxis()->GetXmin(); |
748 |
|
Double_t xmax=threcord->GetXaxis()->GetXmax(); |
749 |
|
if (k==10 || k==11 ) { |
750 |
|
TPaveText *pt = new TPaveText (.45,.75,.55,.82); |
751 |
|
pt->AddText("OFF"); |
752 |
|
pt->SetBorderSize(1); |
753 |
|
pt->Draw(); |
754 |
|
threcord->Draw("ACsame"); |
755 |
|
TF1 *func1 = new TF1("func1", "50"); |
756 |
|
func1->SetRange(xmin,xmax); |
757 |
|
func1->SetLineColor(2); |
758 |
|
func1->SetLineStyle(1); |
759 |
|
func1->SetLineWidth(2); |
760 |
|
func1->Draw("same"); |
761 |
|
pt->Draw(); |
762 |
|
}else { |
763 |
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
764 |
|
pt->AddText("OFF"); |
765 |
|
pt->SetBorderSize(1); |
766 |
|
pt->Draw(); |
767 |
|
threcord->Draw("ACsame"); |
768 |
|
TF1 *func1 = new TF1("func1", "45"); |
769 |
|
func1->SetRange(xmin,xmax); |
770 |
|
func1->SetLineColor(2); |
771 |
|
func1->SetLineStyle(1); |
772 |
|
func1->SetLineWidth(2); |
773 |
|
func1->Draw("same"); |
774 |
|
pt->Draw(); |
775 |
|
} |
776 |
|
|
777 |
|
|
778 |
|
|
779 |
} |
} |
780 |
} |
} |
781 |
|
|
785 |
for (Int_t i = 0; i < recordstot; i++){ |
for (Int_t i = 0; i < recordstot; i++){ |
786 |
ydea_1[i]= ydea[6*i + k]; |
ydea_1[i]= ydea[6*i + k]; |
787 |
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; |
|
788 |
} |
} |
789 |
Canvasvoltdea->cd(k+1); |
Canvasvoltdea->cd(k+1); |
790 |
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
|
791 |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
792 |
pt->AddText("OFF"); |
pt->AddText("OFF"); |
793 |
pt->SetBorderSize(1); |
pt->SetBorderSize(1); |
796 |
pt1->AddText("ON"); |
pt1->AddText("ON"); |
797 |
pt1->SetBorderSize(1); |
pt1->SetBorderSize(1); |
798 |
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"); |
|
799 |
|
|
800 |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
801 |
dearecord->SetLineColor(kBlue); |
dearecord->SetLineColor(kBlue); |
803 |
dearecord->SetMarkerStyle(21); |
dearecord->SetMarkerStyle(21); |
804 |
dearecord->SetMarkerSize(0.5); |
dearecord->SetMarkerSize(0.5); |
805 |
dearecord->SetMarkerColor(kBlue); |
dearecord->SetMarkerColor(kBlue); |
806 |
dearecord->Draw("CPL"); |
dearecord->SetMinimum(0.0); |
807 |
|
dearecord->SetMaximum(5.0); |
808 |
|
dearecord->GetXaxis()->SetTitle("OBT"); |
809 |
|
dearecord->GetXaxis()->CenterTitle(); |
810 |
|
dearecord->GetYaxis()->SetTitle("Voltage value (V)"); |
811 |
|
dearecord->GetYaxis()->CenterTitle(); |
812 |
|
oss.str(""); |
813 |
|
oss << filename.Data()<<": IPM "<<k+1<<" output"; |
814 |
|
dearecord->SetTitle(oss.str().c_str()); |
815 |
|
dearecord->Draw("ACPLsame"); |
816 |
|
|
817 |
|
Double_t xmin=dearecord->GetXaxis()->GetXmin(); |
818 |
|
Double_t xmax=dearecord->GetXaxis()->GetXmax(); |
819 |
|
TF1 *func1 = new TF1("func1", "0.65"); |
820 |
|
func1->SetRange(xmin, xmax); |
821 |
|
func1->SetLineColor(2); |
822 |
|
func1->SetLineStyle(1); |
823 |
|
func1->SetLineWidth(2); |
824 |
|
func1->Draw("Csame"); |
825 |
|
|
826 |
|
TF1 *func2 = new TF1("func2", "3.15"); |
827 |
|
func2->SetRange(xmin, xmax); |
828 |
|
func2->SetLineColor(2); |
829 |
|
func2->SetLineStyle(1); |
830 |
|
func2->SetLineWidth(2); |
831 |
|
func2->Draw("Csame"); |
832 |
|
|
833 |
|
TF1 *func3 = new TF1("func3", "4.25"); |
834 |
|
func3->SetRange(xmin, xmax); |
835 |
|
func3->SetLineColor(2); |
836 |
|
func3->SetLineStyle(1); |
837 |
|
func3->SetLineWidth(2); |
838 |
|
func3->Draw("Csame"); |
839 |
|
|
840 |
|
|
841 |
|
pt1->Draw(); |
842 |
|
pt->Draw(); |
843 |
} |
} |
844 |
|
|
845 |
|
|