3 #include <onlmon/OnlMonClient.h>
7 #include <TGraphErrors.h>
39 gStyle->SetOptStat(0);
40 if (name ==
"LL1Mon1")
43 TC[0] =
new TCanvas(name.c_str(),
"ll1Mon Monitor", -1, 0, xsize/2, ysize/2);
49 gSystem->ProcessEvents();
50 for(
int ipad=0; ipad<
nPad1; ipad++){
51 Pad[ipad] =
new TPad(Form(
"ll1pad%d",ipad),Form(
"ll1pad%d",ipad),
padx1[ipad],
pady1[ipad],
padx2[ipad],
pady2[ipad],0);
53 Pad[ipad]->SetTicks(1,1);
55 transparent[0] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
58 TC[0]->SetEditable(
false);
60 else if (name ==
"LL1Mon2")
63 gStyle->SetOptStat(0);
64 TC[1] =
new TCanvas(name.c_str(),
"ll1Mon2 Monitor", -xsize / 2, 0, xsize / 2, ysize/2);
66 gSystem->ProcessEvents();
68 transparent[1] =
new TPad(
"transparent1",
"this does not show", 0, 0, 1, 1);
71 TC[1]->SetEditable(
false);
73 else if (name ==
"LL1Mon3")
75 TC[2] =
new TCanvas(name.c_str(),
"ll1Mon3 Monitor", xsize / 2, 0, xsize / 2, ysize/2);
77 gSystem->ProcessEvents();
79 transparent[2] =
new TPad(
"transparent2",
"this does not show", 0, 0, 1, 1);
82 TC[2]->SetEditable(0);
91 if (what ==
"ALL" || what ==
"FIRST")
96 if (what ==
"ALL" || what ==
"SECOND")
101 if (what ==
"ALL" || what ==
"THIRD")
108 std::cout << __PRETTY_FUNCTION__ <<
" Unimplemented Drawing option: " << what << std::endl;
117 TH1 *h_nhit_n1 = cl->
getHisto(
"LL1MON_0",
"h_nhit_n1");
118 TH1 *h_nhit_n2 = cl->
getHisto(
"LL1MON_0",
"h_nhit_n2");
119 TH1 *h_nhit_s1 = cl->
getHisto(
"LL1MON_0",
"h_nhit_s1");
120 TH1 *h_nhit_s2 = cl->
getHisto(
"LL1MON_0",
"h_nhit_s2");
121 time_t evttime = cl->
EventTime(
"CURRENT");
122 if (!gROOT->FindObject(
"LL1Mon1"))
126 TC[0]->SetEditable(
true);
131 h_nhit_n1->DrawCopy();
136 TC[0]->SetEditable(
false);
140 h_nhit_n2->DrawCopy();
142 h_nhit_s1->DrawCopy();
144 h_nhit_s2->DrawCopy();
147 PrintRun.SetTextFont(62);
148 PrintRun.SetTextSize(0.04);
150 PrintRun.SetTextAlign(23);
151 std::ostringstream runnostream;
155 <<
", Time: " << ctime(&evttime);
156 runstring = runnostream.str();
158 PrintRun.DrawText(0.5, 1., runstring.c_str());
159 gStyle->SetOptStat(0);
161 TC[0]->SetTicks(1,1);
163 TC[0]->SetEditable(
false);
170 TH2 *h_nhit_corr= (TH2D*) cl->
getHisto(
"LL1MON_0",
"h_nhit_corr");
171 time_t evttime = cl->
EventTime(
"CURRENT");
172 if (!gROOT->FindObject(
"LL1Mon2"))
176 TC[1]->SetEditable(
true);
180 h_nhit_corr->Draw(
"colz");
185 TC[1]->SetEditable(
false);
189 PrintRun.SetTextFont(62);
190 PrintRun.SetTextSize(0.04);
192 PrintRun.SetTextAlign(23);
193 std::ostringstream runnostream;
197 <<
", Time: " << ctime(&evttime);
198 runstring = runnostream.str();
200 PrintRun.DrawText(0.5, 1., runstring.c_str());
201 TC[1]->SetTicks(1,1);
204 TC[1]->SetEditable(
false);
211 TH2 *h_line_up= (TH2*) cl->
getHisto(
"LL1MON_0",
"h_line_up");
212 time_t evttime = cl->
EventTime(
"CURRENT");
213 if (!gROOT->FindObject(
"LL1Mon3"))
217 TC[2]->SetEditable(
true);
219 gStyle->SetOptStat(0);
222 h_line_up->Draw(
"colz");
227 TC[2]->SetEditable(
false);
231 PrintRun.SetTextFont(62);
232 PrintRun.SetTextSize(0.04);
234 PrintRun.SetTextAlign(23);
235 std::ostringstream runnostream;
239 <<
", Time: " << ctime(&evttime);
240 runstring = runnostream.str();
242 PrintRun.DrawText(0.5, 1., runstring.c_str());
244 TC[2]->SetTicks(1,1);
246 TC[2]->SetEditable(
false);
254 int iret =
Draw(what);
260 for (TCanvas *canvas :
TC)
262 if (canvas ==
nullptr)
276 int iret =
Draw(what);
285 for (TCanvas *canvas :
TC)
287 if (canvas ==
nullptr)