6 {
"chip_hitmap", (
struct Option_s)
14 {
"chip_nll", (
struct Option_s)
24 {
"ladder_hitmap", (
struct Option_s)
57 for(std::size_t
s = 0;
s < what.length(); ++
s)
59 temp += (char)std::tolower(what[
s]);
62 for(Options_t::iterator itr =
OPTIONS.begin(); itr !=
OPTIONS.end(); ++itr)
66 if(temp ==
"all")b =
true;
67 if(temp == itr->first)b =
true;
72 (*(itr->second.head))(itr->first);
77 std::cout <<
"Option \"" << what <<
"\" not found" << std::endl;
78 std::cout <<
"Try \"all\" or one of the following (case insensitive)" << std::endl;
79 for(Options_t::iterator itr =
OPTIONS.begin(); itr !=
OPTIONS.end(); ++itr)
81 std::cout <<
"\t" << itr->first << std::endl;
93 if(
Draw(what))
return 1;
95 TSeqCollection* canvases = gROOT->GetListOfCanvases();
96 TCanvas* canvas =
nullptr;
104 for(std::size_t
s = 0;
s < what.length(); ++
s)
106 temp += (char)std::tolower(what[
s]);
108 for(Options_t::iterator itr =
OPTIONS.begin(); itr !=
OPTIONS.end(); ++itr)
112 if(temp ==
"all")b =
true;
113 if(temp == itr->first)b =
true;
120 name = Form(
"Intt_%s_Global_Canvas", (itr->first).c_str());
121 for(TIter t_itr = canvases->begin(); t_itr != canvases->end(); ++t_itr)
123 if(
std::string((*t_itr)->GetName()).find(name) == std::string::npos)
continue;
125 canvas = (TCanvas*)(*t_itr);
131 pngfile = cl->
htmlRegisterPage(*
this, canvas->GetTitle(), itr->first,
"png");
137 std::cout <<
"Option \"" << what <<
"\" not found" << std::endl;
138 std::cout <<
"Try \"all\" or one of the following (case insensitive)" << std::endl;
139 for(Options_t::iterator itr =
OPTIONS.begin(); itr !=
OPTIONS.end(); ++itr)
141 std::cout <<
"\t" << itr->first << std::endl;
146 std::ofstream log_out(logfile.c_str());
147 log_out <<
"<HTML><HEAD><TITLE>Log file for run " << cl->
RunNumber();
148 log_out <<
"</TITLE></HEAD>" << std::endl;
149 log_out <<
"<P>[Implement me]" << std::endl;
153 std::ofstream sts_out(stsfile.c_str());
154 sts_out <<
"<HTML><HEAD><TITLE>Status file for run " << cl->
RunNumber();
155 sts_out <<
"</TITLE></HEAD>" << std::endl;
156 sts_out <<
"<P>[Implement me]" << std::endl;
167 if(
Draw(what))
return 1;
169 TSeqCollection* canvases = gROOT->GetListOfCanvases();
170 TCanvas* canvas =
nullptr;
178 for(std::size_t
s = 0;
s < what.length(); ++
s)
180 temp += (char)std::tolower(what[
s]);
182 for(Options_t::iterator itr =
OPTIONS.begin(); itr !=
OPTIONS.end(); ++itr)
186 if(temp ==
"all")b =
true;
187 if(temp == itr->first)b =
true;
194 name = Form(
"Intt_%s_Global_Canvas", (itr->first).c_str());
195 for(TIter t_itr = canvases->begin(); t_itr != canvases->end(); ++t_itr)
197 if(
std::string((*t_itr)->GetName()).find(name) == std::string::npos)
continue;
199 canvas = (TCanvas*)(*t_itr);
211 std::cout <<
"Option \"" << what <<
"\" not found" << std::endl;
212 std::cout <<
"Try \"all\" or one of the following (case insensitive)" << std::endl;
213 for(Options_t::iterator itr =
OPTIONS.begin(); itr !=
OPTIONS.end(); ++itr)
215 std::cout <<
"\t" << itr->first << std::endl;
224 pad->SetFillStyle(4000);
225 pad->Range(0.0, 0.0, 1.0, 1.0);
245 double y_lower = 0.0;
246 double x_upper = 1.0;
247 double y_upper = 1.0;
261 TH2D* client_hists[4] = {
nullptr};
263 name = Form(
"Intt_%s_Global_Style", option.c_str());
264 style = (TStyle*)gROOT->FindObject(name.c_str());
272 style->SetOptStat(0);
273 style->SetOptTitle(0);
278 name = Form(
"Intt_%s_Global_Canvas", option.c_str());
279 cnvs = (TCanvas*)gROOT->FindObject(name.c_str());
295 name = Form(
"Intt_%s_Global_DispPad", option.c_str());
296 disp_pad = (TPad*)gROOT->FindObject(name.c_str());
310 TText* disp_text =
new TText
316 disp_text->SetName(Form(
"Intt_%s_Global_DispText", option.c_str()));
317 disp_text->SetTextAlign(22);
322 TText* run_text =
new TText
328 run_text->SetName(Form(
"Intt_%s_Global_RunText", option.c_str()));
329 run_text->SetTextAlign(22);
334 struct std::tm* time_s = std::localtime(&now);
335 TText* time_text =
new TText
339 Form(
"%02d/%02d/%4d (mm/dd/yyy)", time_s->tm_mon + 1, time_s->tm_mday, time_s->tm_year + 1900)
341 time_text->SetName(Form(
"Intt_%s_Global_TimeText", option.c_str()));
342 time_text->SetTextAlign(22);
347 Options_t::const_iterator itr =
OPTIONS.find(option);
348 if(itr ==
OPTIONS.end())
return;
349 (*(itr->second.global))(option, client_hists);
356 name = Form(
"Intt_%s_Global_HistPad_%d", option.c_str(), indexes.
lyr);
357 hist_pad = (TPad*)gROOT->FindObject(name.c_str());
373 client_hists[indexes.
lyr]->DrawCopy(
"COLZ");
375 name = Form(
"Intt_%s_Global_GridPad_%d", option.c_str(), indexes.
lyr);
376 grid_pad = (TPad*)gROOT->FindObject(name.c_str());
398 line->SetLineStyle((i % 2) ? 3 : 1);
399 line->SetLineWidth((i % 2) ? 1 : 2);
408 line->SetLineStyle((i % (INTT::CHIP / 2)) ? 3 : 1);
409 line->SetLineWidth((i % (INTT::CHIP / 2)) ? 1 : 2);
414 name = Form(
"Intt_%s_Global_YLblPad_%d", option.c_str(), indexes.
lyr);
415 ylbl_pad = (TPad*)gROOT->FindObject(name.c_str());
429 TText*
label =
new TText
433 Form(
"B%01dL%01d", indexes.
lyr / 2, indexes.
lyr % 2)
436 label->SetTextAlign(22);
437 label->SetTextAngle(90);
447 Form(
"%s", i ?
"North" :
"South")
450 label->SetTextAlign(22);
451 label->SetTextAngle(90);
456 name = Form(
"Intt_%s_Global_XLblPad_%d", option.c_str(), indexes.
lyr);
457 xlbl_pad = (TPad*)gROOT->FindObject(name.c_str());
477 TText*
label =
new TText
484 label->SetTextAlign(22);
489 name = Form(
"Intt_%s_Global_ExecPad_%d", option.c_str(), indexes.
lyr);
490 exec_pad = (TPad*)gROOT->FindObject(name.c_str());
497 x_lower + (x_upper - x_lower) *
L_MARGIN,
498 y_lower + (y_upper - y_lower) *
B_MARGIN,
499 x_upper - (x_upper - x_lower) *
R_MARGIN,
500 y_upper - (y_upper - y_lower) *
T_MARGIN
505 Form(
"Intt_%s_Global_Exec_%d",option.c_str(), indexes.
lyr),
506 Form(
"InttMonDraw::InttGlobalChipExec(\"%s\", %d)", option.c_str(), indexes.
lyr)
512 cnvs->SetEditable(0);
517 int bin_x = gPad->AbsPixeltoX(gPad->GetEventX()) * (2 *
INTT::LADDER[layer]);
518 int bin_y = gPad->AbsPixeltoY(gPad->GetEventY()) * (
INTT::CHIP);
521 if(bin_x < 0)bin_x = 0;
522 if(bin_y < 0)bin_y = 0;
531 name = Form(
"Intt_%s_Global_DispText", option.c_str());
532 TText* disp_text = (TText*)gROOT->FindObject(name.c_str());
535 name = Form(
"Intt_%s_Global_DispPad", option.c_str());
536 TPad* disp_pad = (TPad*)gROOT->FindObject(name.c_str());
537 if(disp_pad)disp_pad->Update();
539 if(gPad->GetEvent() != 11)
return;
546 double x_lower = 0.0;
548 double x_upper = 1.0;
549 double y_upper = 1.0;
560 TH2D* client_hists[1] = {
nullptr};
561 Options_t::const_iterator itr =
OPTIONS.find(option);
562 if(itr ==
OPTIONS.end())
return;
563 (*(itr->second.local))(option, client_hists, indexes);
565 name = Form(
"Intt_%s_Local_Style_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
566 style = (TStyle*)gROOT->FindObject(name.c_str());
574 style->SetOptStat(0);
575 style->SetOptTitle(0);
580 name = Form(
"Intt_%s_Local_Canvas_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
581 cnvs = (TCanvas*)gROOT->FindObject(name.c_str());
595 name = Form(
"Intt_%s_Local_DispPad_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
596 disp_pad = (TPad*)gROOT->FindObject(name.c_str());
609 TText* disp_text =
new TText
613 Form(
"Channel: %3d ADC: %d", 0, 0)
615 disp_text->SetName(Form(
"Intt_%s_Local_DispText_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp));
616 disp_text->SetTextAlign(22);
621 name = Form(
"Intt_%s_Local_HistPad_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
622 hist_pad = (TPad*)gROOT->FindObject(name.c_str());
640 client_hists[0]->DrawCopy(
"COLZ");
641 delete client_hists[0];
644 name = Form(
"Intt_%s_Local_GridPad_%d", option.c_str(), indexes.
lyr);
645 grid_pad = (TPad*)gROOT->FindObject(name.c_str());
667 line->SetLineStyle(3);
668 line->SetLineWidth(1);
677 line->SetLineStyle(3);
678 line->SetLineWidth(1);
683 name = Form(
"Intt_%s_Local_ExecPad_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
684 exec_pad = (TPad*)gROOT->FindObject(name.c_str());
691 x_lower + (x_upper - x_lower) *
L_MARGIN,
692 y_lower + (y_upper - y_lower) *
B_MARGIN,
693 x_upper - (x_upper - x_lower) *
R_MARGIN,
694 y_upper - (y_upper - y_lower) *
T_MARGIN
699 Form(
"Intt_%s_Local_Exec_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp),
700 Form(
"InttMonDraw::InttLocalChannelExec(\"%s\", %d, %d, %d, %d)", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp)
707 int bin_x = gPad->AbsPixeltoX(gPad->GetEventX()) *
INTT::CHANNEL;
708 int bin_y = gPad->AbsPixeltoY(gPad->GetEventY()) *
INTT::ADC;
711 if(bin_x < 0)bin_x = 0;
712 if(bin_y < 0)bin_y = 0;
719 indexes.
ldr = ladder;
720 indexes.
arm = northsouth;
724 name = Form(
"Intt_%s_Local_DispText_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
725 TText* disp_text = (TText*)gROOT->FindObject(name.c_str());
726 if(disp_text)disp_text->SetTitle(Form(
"Channel: %3d ADC: %d", indexes.
chn, indexes.
adc));
728 name = Form(
"Intt_%s_Local_DispPad_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
729 TPad* disp_pad = (TPad*)gROOT->FindObject(name.c_str());
730 if(disp_pad)disp_pad->Update();
742 double y_lower = 0.0;
743 double x_upper = 1.0;
744 double y_upper = 1.0;
758 TH2D* client_hists[4] = {
nullptr};
760 name = Form(
"Intt_%s_Global_Style", option.c_str());
761 style = (TStyle*)gROOT->FindObject(name.c_str());
769 style->SetOptStat(0);
770 style->SetOptTitle(0);
775 name = Form(
"Intt_%s_Global_Canvas", option.c_str());
776 cnvs = (TCanvas*)gROOT->FindObject(name.c_str());
792 name = Form(
"Intt_%s_Global_DispPad", option.c_str());
793 disp_pad = (TPad*)gROOT->FindObject(name.c_str());
807 TText* disp_text =
new TText
813 disp_text->SetName(Form(
"Intt_%s_Global_DispText", option.c_str()));
814 disp_text->SetTextAlign(22);
819 TText* run_text =
new TText
825 run_text->SetName(Form(
"Intt_%s_Global_RunText", option.c_str()));
826 run_text->SetTextAlign(22);
831 struct std::tm* time_s = std::localtime(&now);
832 TText* time_text =
new TText
836 Form(
"%02d/%02d/%4d (mm/dd/yyy)", time_s->tm_mon + 1, time_s->tm_mday, time_s->tm_year + 1900)
838 time_text->SetName(Form(
"Intt_%s_Global_TimeText", option.c_str()));
839 time_text->SetTextAlign(22);
844 Options_t::const_iterator itr =
OPTIONS.find(option);
845 if(itr ==
OPTIONS.end())
return;
846 (*(itr->second.global))(option, client_hists);
853 name = Form(
"Intt_%s_Global_HistPad_%d", option.c_str(), indexes.
lyr);
854 hist_pad = (TPad*)gROOT->FindObject(name.c_str());
870 client_hists[indexes.
lyr]->DrawCopy(
"COL");
872 name = Form(
"Intt_%s_Global_GridPad_%d", option.c_str(), indexes.
lyr);
873 grid_pad = (TPad*)gROOT->FindObject(name.c_str());
894 line->SetLineStyle(1);
895 line->SetLineWidth(2);
899 for(i = 0; i < 2; ++
i)
903 line->SetLineStyle(1);
904 line->SetLineWidth(2);
909 name = Form(
"Intt_%s_Global_YLblPad_%d", option.c_str(), indexes.
lyr);
910 ylbl_pad = (TPad*)gROOT->FindObject(name.c_str());
924 TText*
label =
new TText
928 Form(
"B%01dL%01d", indexes.
lyr / 2, indexes.
lyr % 2)
931 label->SetTextAlign(22);
932 label->SetTextAngle(90);
942 Form(
"%s", i ?
"North" :
"South")
945 label->SetTextAlign(22);
946 label->SetTextAngle(90);
951 name = Form(
"Intt_%s_Global_XLblPad_%d", option.c_str(), indexes.
lyr);
952 xlbl_pad = (TPad*)gROOT->FindObject(name.c_str());
972 TText*
label =
new TText
979 label->SetTextAlign(22);
984 name = Form(
"Intt_%s_Global_ExecPad_%d", option.c_str(), indexes.
lyr);
985 exec_pad = (TPad*)gROOT->FindObject(name.c_str());
992 x_lower + (x_upper - x_lower) *
L_MARGIN,
993 y_lower + (y_upper - y_lower) *
B_MARGIN,
994 x_upper - (x_upper - x_lower) *
R_MARGIN,
995 y_upper - (y_upper - y_lower) *
T_MARGIN
1000 Form(
"Intt_%s_Global_Exec_%d",option.c_str(), indexes.
lyr),
1001 Form(
"InttMonDraw::InttGlobalLadderExec(\"%s\", %d)", option.c_str(), indexes.
lyr)
1007 cnvs->SetEditable(0);
1012 int bin_x = gPad->AbsPixeltoX(gPad->GetEventX()) *
INTT::LADDER[layer];
1013 int bin_y = gPad->AbsPixeltoY(gPad->GetEventY()) *
INTT::ARM;
1016 if(bin_x < 0)bin_x = 0;
1017 if(bin_y < 0)bin_y = 0;
1026 name = Form(
"Intt_%s_Global_DispText", option.c_str());
1027 TText* disp_text = (TText*)gROOT->FindObject(name.c_str());
1028 if(disp_text)disp_text->SetTitle(Form(
"Layer: %2d Ladder: %2d (%s)", indexes.
lyr +
INTT::LAYER_OFFSET, indexes.
ldr, indexes.
arm ?
"North" :
"South"));
1030 name = Form(
"Intt_%s_Global_DispPad", option.c_str());
1031 TPad* disp_pad = (TPad*)gROOT->FindObject(name.c_str());
1032 if(disp_pad)disp_pad->Update();
1034 if(gPad->GetEvent() != 11)
return;
1041 double x_lower = 0.0;
1043 double x_upper = 1.0;
1044 double y_upper = 1.0;
1055 TH2D* client_hists[1] = {
nullptr};
1056 Options_t::const_iterator itr =
OPTIONS.find(option);
1057 if(itr ==
OPTIONS.end())
return;
1058 (*(itr->second.local))(option, client_hists, indexes);
1060 name = Form(
"Intt_%s_Local_Style_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
1061 style = (TStyle*)gROOT->FindObject(name.c_str());
1069 style->SetOptStat(0);
1070 style->SetOptTitle(0);
1075 name = Form(
"Intt_%s_Local_Canvas_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1076 cnvs = (TCanvas*)gROOT->FindObject(name.c_str());
1090 name = Form(
"Intt_%s_Local_DispPad_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1091 disp_pad = (TPad*)gROOT->FindObject(name.c_str());
1104 TText* disp_text =
new TText
1110 disp_text->SetName(Form(
"Intt_%s_Local_DispText_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm));
1111 disp_text->SetTextAlign(22);
1116 name = Form(
"Intt_%s_Local_HistPad_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1117 hist_pad = (TPad*)gROOT->FindObject(name.c_str());
1135 client_hists[0]->DrawCopy(
"COLZ");
1136 delete client_hists[0];
1139 name = Form(
"Intt_%s_Local_GridPad_Lyr%d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1140 grid_pad = (TPad*)gROOT->FindObject(name.c_str());
1162 line->SetLineStyle(i == INTT::CHANNEL ? 1 : 3);
1163 line->SetLineWidth(i == INTT::CHANNEL ? 2 : 1);
1172 line->SetLineStyle(i ==
INTT::CHIP / 2 ? 1 : 3);
1173 line->SetLineWidth(i ==
INTT::CHIP / 2 ? 2 : 1);
1178 name = Form(
"Intt_%s_Local_ExecPad_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1179 exec_pad = (TPad*)gROOT->FindObject(name.c_str());
1186 x_lower + (x_upper - x_lower) *
L_MARGIN,
1187 y_lower + (y_upper - y_lower) *
B_MARGIN,
1188 x_upper - (x_upper - x_lower) *
R_MARGIN,
1189 y_upper - (y_upper - y_lower) *
T_MARGIN
1194 Form(
"Intt_%s_Local_Exec_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm),
1195 Form(
"InttMonDraw::InttLocalChipExec(\"%s\", %d, %d, %d)", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm)
1202 int bin_x = gPad->AbsPixeltoX(gPad->GetEventX()) * 2 *
INTT::CHANNEL;
1203 int bin_y = gPad->AbsPixeltoY(gPad->GetEventY()) *
INTT::CHIP / 2;
1206 if(bin_x < 0)bin_x = 0;
1207 if(bin_y < 0)bin_y = 0;
1214 indexes.
ldr = ladder;
1220 name = Form(
"Intt_%s_Local_DispText_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1221 TText* disp_text = (TText*)gROOT->FindObject(name.c_str());
1222 if(disp_text)disp_text->SetTitle(Form(
"Chip: %2d Channel: %3d", indexes.
chp +
INTT::CHIP_OFFSET, indexes.
chn));
1224 name = Form(
"Intt_%s_Local_DispPad_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1225 TPad* disp_pad = (TPad*)gROOT->FindObject(name.c_str());
1226 if(disp_pad)disp_pad->Update();
1235 double min = DBL_MAX;
1236 double max = -DBL_MAX;
1237 int prev_felix = -1;
1239 int felix_channel = 0;
1249 TH1D* server_hist =
nullptr;
1253 name = Form(
"Intt_%s_Global_Hist_%d", option.c_str(), indexes.
lyr);
1254 client_hists[indexes.
lyr] = (TH2D*)gROOT->FindObject(name.c_str());
1255 if(!client_hists[indexes.
lyr])
1257 client_hists[indexes.
lyr] =
new TH2D
1268 client_hists[indexes.
lyr]->GetXaxis()->SetNdivisions(
INTT::LADDER[indexes.
lyr],
true);
1269 client_hists[indexes.
lyr]->GetYaxis()->SetNdivisions(
INTT::CHIP,
true);
1271 client_hists[indexes.
lyr]->GetXaxis()->SetLabelSize(0.0);
1272 client_hists[indexes.
lyr]->GetYaxis()->SetLabelSize(0.0);
1274 client_hists[indexes.
lyr]->GetXaxis()->SetTickLength(0.0);
1275 client_hists[indexes.
lyr]->GetYaxis()->SetTickLength(0.0);
1278 client_hists[indexes.
lyr]->Reset();
1293 if(prev_felix != felix)
1295 server_hist = (TH1D*)cl->getHisto(Form(
"INTTMON_%d", felix),
"InttMap");
1302 indexes.
arm = felix / 4;
1313 temp = server_hist ? server_hist->GetBinContent(bin) : 0;
1314 bin = client_hists[indexes.
lyr]->GetBin(bin_x, bin_y);
1315 temp += client_hists[indexes.
lyr]->GetBinContent(bin);
1316 client_hists[indexes.
lyr]->SetBinContent(bin, temp);
1339 if(client_hists[indexes.
lyr]->GetMinimum() <
min)min = client_hists[indexes.
lyr]->GetMinimum();
1340 if(client_hists[indexes.
lyr]->GetMaximum() > max)max = client_hists[indexes.
lyr]->GetMaximum();
1345 client_hists[indexes.
lyr]->SetMinimum(min);
1346 client_hists[indexes.
lyr]->SetMaximum(max);
1354 int prev_felix = -1;
1356 int felix_channel = 0;
1364 TH1D* server_hist =
nullptr;
1366 name = Form(
"Intt_%s_Local_Hist_Lyr%02d_Ldr%02d_Arm%02d_Chp%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm, indexes.
chp);
1367 client_hists[0] = (TH2D*)gROOT->FindObject(name.c_str());
1368 if(!client_hists[0])
1370 client_hists[0] =
new TH2D
1382 client_hists[0]->GetXaxis()->SetNdivisions(
INTT::CHANNEL,
true);
1383 client_hists[0]->GetYaxis()->SetNdivisions(
INTT::ADC,
true);
1385 client_hists[0]->GetXaxis()->SetLabelSize(0.0);
1386 client_hists[0]->GetYaxis()->SetLabelSize(0.0);
1388 client_hists[0]->GetXaxis()->SetTickLength(0.0);
1389 client_hists[0]->GetYaxis()->SetTickLength(0.0);
1391 client_hists[0]->Reset();
1401 if(prev_felix != felix)
1403 server_hist = (TH1D*)cl->
getHisto(Form(
"INTTMON_%d", felix),
"InttMap");
1417 temp = server_hist ? server_hist->GetBinContent(bin) : 0;
1418 bin = client_hists[0]->GetBin(bin_x, bin_y);
1419 temp += client_hists[0]->GetBinContent(bin);
1420 client_hists[0]->SetBinContent(bin, temp);
1443 double min = DBL_MAX;
1444 double max = -DBL_MAX;
1445 int prev_felix = -1;
1447 int felix_channel = 0;
1458 TH1D* server_hist =
nullptr;
1462 name = Form(
"Intt_%s_Global_Hist_%d", option.c_str(), indexes.
lyr);
1463 client_hists[indexes.
lyr] = (TH2D*)gROOT->FindObject(name.c_str());
1464 if(!client_hists[indexes.
lyr])
1466 client_hists[indexes.
lyr] =
new TH2D
1477 client_hists[indexes.
lyr]->GetXaxis()->SetNdivisions(
INTT::LADDER[indexes.
lyr],
true);
1478 client_hists[indexes.
lyr]->GetYaxis()->SetNdivisions(
INTT::CHIP,
true);
1480 client_hists[indexes.
lyr]->GetXaxis()->SetLabelSize(0.0);
1481 client_hists[indexes.
lyr]->GetYaxis()->SetLabelSize(0.0);
1483 client_hists[indexes.
lyr]->GetXaxis()->SetTickLength(0.0);
1484 client_hists[indexes.
lyr]->GetYaxis()->SetTickLength(0.0);
1487 client_hists[indexes.
lyr]->Reset();
1502 if(prev_felix != felix)
1504 server_hist = (TH1D*)cl->
getHisto(Form(
"INTTMON_%d", felix),
"InttMap");
1509 temp = server_hist ? server_hist->GetBinContent(bin) : 0;
1510 adc_counts[indexes.
adc] += temp;
1548 if(prev_felix != felix)
1550 server_hist = (TH1D*)cl->
getHisto(Form(
"INTTMON_%d", felix),
"InttMap");
1557 indexes.
arm = felix / 4;
1561 temp = server_hist ? server_hist->GetBinContent(bin) : 0;
1564 temp = adc_counts[indexes.
adc] ? lgamma(temp + 1) - temp * log(adc_counts[indexes.
adc]) + adc_counts[indexes.
adc] : 0;
1566 bin = client_hists[indexes.
lyr]->GetBin(bin_x, bin_y);
1567 temp += client_hists[indexes.
lyr]->GetBinContent(bin);
1568 client_hists[indexes.
lyr]->SetBinContent(bin, temp);
1591 if(client_hists[indexes.
lyr]->GetMinimum() <
min)min = client_hists[indexes.
lyr]->GetMinimum();
1592 if(client_hists[indexes.
lyr]->GetMaximum() > max)max = client_hists[indexes.
lyr]->GetMaximum();
1597 client_hists[indexes.
lyr]->SetMinimum(min);
1598 client_hists[indexes.
lyr]->SetMaximum(max);
1610 name = Form(
"Intt_%s_Global_Hist_%d", option.c_str(), indexes.
lyr);
1611 client_hists[indexes.
lyr] = (TH2D*)gROOT->FindObject(name.c_str());
1612 if(!client_hists[indexes.
lyr])
1614 client_hists[indexes.
lyr] =
new TH2D
1625 client_hists[indexes.
lyr]->GetXaxis()->SetNdivisions(
INTT::LADDER[indexes.
lyr],
true);
1626 client_hists[indexes.
lyr]->GetYaxis()->SetNdivisions(
INTT::ARM,
true);
1628 client_hists[indexes.
lyr]->GetXaxis()->SetLabelSize(0.0);
1629 client_hists[indexes.
lyr]->GetYaxis()->SetLabelSize(0.0);
1631 client_hists[indexes.
lyr]->GetXaxis()->SetTickLength(0.0);
1632 client_hists[indexes.
lyr]->GetYaxis()->SetTickLength(0.0);
1634 client_hists[indexes.
lyr]->SetMinimum(-1.0);
1635 client_hists[indexes.
lyr]->SetMaximum(20.0);
1638 client_hists[indexes.
lyr]->Reset();
1640 for(
int n = 0;
n < client_hists[indexes.
lyr]->GetNcells(); ++
n)
1642 client_hists[indexes.
lyr]->SetBinContent(
n, 0);
1651 int prev_felix = -1;
1653 int felix_channel = 0;
1661 TH1D* server_hist =
nullptr;
1663 name = Form(
"Intt_%s_Local_ClientHist_Lyr%02d_Ldr%02d_Arm%02d", option.c_str(), indexes.
lyr, indexes.
ldr, indexes.
arm);
1664 client_hists[0] = (TH2D*)gROOT->FindObject(name.c_str());
1665 if(!client_hists[0])
1667 client_hists[0] =
new TH2D
1679 client_hists[0]->GetXaxis()->SetNdivisions(2 *
INTT::CHANNEL,
true);
1680 client_hists[0]->GetYaxis()->SetNdivisions(
INTT::CHIP / 2,
true);
1682 client_hists[0]->GetXaxis()->SetLabelSize(0.0);
1683 client_hists[0]->GetYaxis()->SetLabelSize(0.0);
1685 client_hists[0]->GetXaxis()->SetTickLength(0.0);
1686 client_hists[0]->GetYaxis()->SetTickLength(0.0);
1689 client_hists[0]->Reset();
1700 if(prev_felix != felix)
1702 server_hist = (TH1D*)cl->
getHisto(Form(
"INTTMON_%d", felix),
"InttMap");
1716 temp = server_hist ? server_hist->GetBinContent(bin) : 0;
1718 bin = client_hists[0]->GetBin(bin_x, bin_y);
1719 temp += client_hists[0]->GetBinContent(bin);
1720 client_hists[0]->SetBinContent(bin, temp);