3 #include <onlmon/OnlMonClient.h>
12 #include <TGraphErrors.h>
18 #include <TPaveText.h>
20 #include <TSpectrum.h>
37 #define PRINT_DEBUG(x) std::cout<<x<<std::endl
39 #define PRINT_DEBUG(x) {};
43 #define ifdelete(x) if(x!=nullptr){ std::cout << "Delete " << #x << std::endl; delete x;x=nullptr;}
44 #define ifnew(t,x) {if(x!=nullptr){ std::cout << "Delete " << #x << std::endl; delete x;}std::cout << "New "<< #x << std::endl;x = new t;}
46 #define ifdelete(x) if(x!=nullptr){ delete x;x=nullptr;}
47 #define ifnew(t,x) {if(x!=nullptr){ delete x;}x = new t;}
52 static float xpos[4] = {0.20, 0.35, 0.55, 0.75};
58 std::cout <<
"Done with BbcMonDraw::BbcMonDraw" << std::endl;
86 for (
int side = 0; side <
nSIDE; side++)
93 for (
int trig = 0; trig <
nTRIGGER; trig++)
105 for (
int side = 0; side <
nSIDE; side++)
181 for (
int i = 0;
i < 5;
i++)
191 for (
int icv=0; icv<
nCANVAS; icv++)
205 TStyle *oldStyle = gStyle;
206 bbcStyle =
new TStyle(
"bbcStyle",
"BBC/MBD Online Monitor Style");
219 memset(
TC, 0,
sizeof(
TC));
265 FitZvtx =
new TF1(
"FitZvtx",
"gaus");
269 tspec =
new TSpectrum(5);
294 static int brink = 1;
295 float x1, x2, y1, y2;
297 x1 = pad->GetX1() * 0.97 + pad->GetX2() * 0.03;
298 x2 = pad->GetX1() * 0.03 + pad->GetX2() * 0.97;
300 if (y > pad->GetY1() * 0.5 + pad->GetY2() * 0.5)
302 y1 = pad->GetY1() + (pad->GetY2() - pad->GetY1()) * 0.10;
303 y2 = pad->GetY1() + (pad->GetY2() - pad->GetY1()) * 0.30;
307 y1 = pad->GetY1() + (pad->GetY2() - pad->GetY1()) * 0.70;
308 y2 = pad->GetY1() + (pad->GetY2() - pad->GetY1()) * 0.90;
326 ArcWarning[newWarning]->SetLineColor(2 + 3 * brink);
327 PaveWarning[newWarning]->SetFillColor(5 + 5 * brink);
332 if (newWarning == nWarning)
340 std::ostringstream wmsg;
341 wmsg <<
"... and other " <<
nPadWarning[newWarning] <<
" warnings";
342 nPadWarning[newWarning]++;
343 PaveWarning[newWarning]->AddText(wmsg.str().c_str());
347 PaveWarning[newWarning]->AddText(
"Do Quick-feed BBC/MBD");
348 PaveWarning[newWarning]->AddText(
"If it is NOT fixed by feed at PHYSICS run, call BBC/MBD experts");
382 if (name ==
"BbcMon1")
384 std::cout <<
"Creating Canvas BbcMon1..." << std::endl;
386 TC[0] =
new TCanvas(
"BbcMon1",
"BBC/MBD Z-Vertex View for Shift crew", -1, 0, xsize / 2, ysize);
392 gSystem->ProcessEvents();
395 PadTop[0] =
new TPad(
"PadTop0",
"PadTop0", 0.00, 0.90, 1.00, 1.00, 0, 0, 0);
396 PadZVertex =
new TPad(
"PadZVertex",
"PadZVertex", 0.00, 0.60, 1.00, 0.90, 0, 0, 0);
397 PadZVertexSummary =
new TPad(
"PadZVertexSummary",
"PadZVertexSummary", 0.00, 0.40, 1.00, 0.60, 0, 0, 0);
398 PadSouthHitMap =
new TPad(
"PadSouthHitMap",
"PadSouthHitMap", 0.00, 0.00, 0.495, 0.40, 0, 0, 0);
399 PadNorthHitMap =
new TPad(
"PadNorthHitMap",
"PadNorthHitMap", 0.505, 0.00, 1.0, 0.40, 0, 0, 0);
417 for (
int i = 0;
i < 1;
i++)
435 transparent[0] =
new TPad(
"transparent3",
"this does not show", 0, 0, 1, 1, 0, 0);
456 else if (name ==
"BbcMon2")
458 std::cout <<
"Creating Canvas BbcMon2..." << std::endl;
460 TC[1] =
new TCanvas(
"BbcMon2",
"Beam status view for Shift crew", -xsize / 2, 0, xsize / 2, ysize);
461 gSystem->ProcessEvents();
463 PadTop[1] =
new TPad(
"PadTop1",
"PadTop1", 0.00, 0.90, 1.00, 1.00, 0, 0, 0);
464 PadTimeWave =
new TPad(
"PadTimeWave",
"PadTimeWave", 0.00, 0.30, 1.00, 0.90, 0, 0, 0);
465 PadSouthHitTime =
new TPad(
"PadHitTimeSouth1",
"PadHitTimeSouth1", 0.00, 0.00, 0.50, 0.30, 0, 0, 0);
466 PadNorthHitTime =
new TPad(
"PadHitTimeNorth1",
"PadHitTimeNorth1", 0.50, 0.00, 1.00, 0.30, 0, 0, 0);
576 transparent[1] =
new TPad(
"transparent1",
"this does not show", 0, 0, 1, 1, 0, 0);
581 else if (name ==
"BbcMon3")
583 std::cout <<
"Creating Canvas BbcMon3..." << std::endl;
585 TC[2] =
new TCanvas(
"BbcMon3",
"BBC/MBD status view for Expert", -xsize / 2, 0, xsize / 2, ysize);
586 gSystem->ProcessEvents();
590 PadTop[2] =
new TPad(
"PadTop0",
"PadTop0", 0.00, 0.90, 1.00, 1.00, 0, 0, 0);
591 PadTdcOver[0] =
new TPad(
"PadTdcOverSouth0",
"PadTdcOverSouth0", 0.00, 0.30, 0.50, 0.60, 0, 0, 0);
592 PadTdcOver[1] =
new TPad(
"PadTdcOverNorth1",
"PadTdcOverNorth1", 0.50, 0.60, 1.00, 0.90, 0, 0, 0);
593 PadnHit[1] =
new TPad(
"PadnHitNorth",
"PadnHitNorth", 0.50, 0.03, 1.00, 0.30, 0, 0, 0);
594 PadnHit[0] =
new TPad(
"PadnHitSouth",
"PadnHitSouth", 0.00, 0.03, 0.50, 0.30, 0);
595 PadnHitStatus =
new TPad(
"PadnHitStatus",
"PadnHitStatus", 0.00, 0.00, 1.00, 0.03, 0, 0, 0);
598 for (
int side = 0; side <
nSIDE; side++)
605 BoxnHit[0][side]->SetFillColor(5);
606 BoxnHit[0][side]->SetLineColor(3);
609 BoxnHit[1][side]->SetFillColor(7);
610 BoxnHit[1][side]->SetLineColor(4);
616 side->SetFillColor(5);
617 side->SetLineColor(3);
621 TextnHitStatus->SetText(0.05, 0.5,
"Red Square : Collision Event / Blue Triangle : Laser Event");
622 transparent[2] =
new TPad(
"transparent2",
"this does not show", 0, 0, 1, 1, 0, 0);
629 else if (name ==
"BbcMon4")
631 std::cout <<
"Creating Canvas BbcMon4..." << std::endl;
639 TC[3] =
new TCanvas(
"BbcMon4",
"Beam/Trigger status view for Shift clew", -1, 0, xsize / 2, ysize);
640 gSystem->ProcessEvents();
643 PadTop[3] =
new TPad(
"PadTop3",
"PadTop3", 0.00, 0.90, 1.00, 1.00, 0, 0, 0);
646 PadHitTime[0] =
new TPad(
"PadHitTimeSouth1",
"PadHitTimeSouth1", 0.00, 0.60, 0.50, 0.90, 0, 0, 0);
647 PadHitTime[1] =
new TPad(
"PadHitTimeNorth1",
"PadHitTimeNorth1", 0.50, 0.60, 1.00, 0.90, 0, 0, 0);
653 for (
int side = 0; side <
nSIDE; side++)
672 PadZvtx =
new TPad(
"PadZvtx",
"PadZvtx", 0.00, 0.30, 0.50, 0.60, 0, 0, 0);
707 PadChargeSum =
new TPad(
"PadChargeSum",
"PadCHargeSum", 0.50, 0.30, 1.00, 0.60, 0, 0, 0);
725 PadAdc =
new TPad(
"PadAdc",
"PadAdc", 0.00, 0.00, 1.00, 0.30, 0, 0, 0);
728 transparent[3] =
new TPad(
"transparent0",
"this does not show", 0, 0, 1, 1);
758 PaveTop->AddText(
"BBC/MBD ONLINE MONITOR");
763 std::cout <<
"Initialize completed" << std::endl;
771 std::cout << what << std::endl;
773 TStyle *oldStyle = gStyle;
776 if (!gROOT->FindObject(
"BbcMon1"))
780 if (what ==
"ALL" || what ==
"FIRST" || what ==
"BbcMon1" || what ==
"BbcMonitor")
785 if (!gROOT->FindObject(
"BbcMon2"))
789 if (what ==
"ALL" || what ==
"SECOND" || what ==
"BbcMon2" || what ==
"VertexMonitor")
794 if (!gROOT->FindObject(
"BbcMon3"))
797 if (what ==
"BbcMon3" || what ==
"BbcMonitor")
803 if (!gROOT->FindObject(
"BbcMon4"))
806 if (what ==
"BbcMon4" || what ==
"VertexMonitor")
812 TH2 *bbc_adc{
nullptr};
813 TH2 *bbc_tdc{
nullptr};
817 TH2 *bbc_tdc_armhittime{
nullptr};
818 TH1 *bbc_zvertex{
nullptr};
819 TH1 *bbc_zvertex_bbll1{
nullptr};
820 TH1 *bbc_nevent_counter{
nullptr};
821 TH2 *bbc_tzero_zvtx{
nullptr};
822 TH1 *bbc_avr_hittime{
nullptr};
823 TH1 *bbc_south_hittime{
nullptr};
824 TH1 *bbc_north_hittime{
nullptr};
825 TH1 *bbc_south_chargesum{
nullptr};
826 TH1 *bbc_north_chargesum{
nullptr};
827 TH1 *bbc_prescale_hist{
nullptr};
828 TH2 *bbc_time_wave{
nullptr};
829 TH2 *bbc_charge_wave{
nullptr};
830 TH2 *bbc_south_hitmap{
nullptr};
831 TH2 *bbc_north_hitmap{
nullptr};
835 std::ostringstream otext;
839 std::ostringstream
name;
849 bbc_tdc =
static_cast<TH2 *
>(cl->
getHisto(
"BBCMON_0",name.str().c_str()));
865 bbc_adc =
static_cast<TH2 *
>(cl->
getHisto(
"BBCMON_0",
"bbc_adc"));
877 Adc =
static_cast<TH2 *
>(bbc_adc->Clone());
882 std::cout <<
"SERVER IS DEAD, no bbc_adc" << std::endl;
896 bbc_tdc_armhittime =
static_cast<TH2 *
>(cl->
getHisto(
"BBCMON_0",
"bbc_tdc_armhittime"));
898 ArmHit =
static_cast<TH2 *
>(bbc_tdc_armhittime->Clone());
900 bbc_zvertex = cl->
getHisto(
"BBCMON_0",
"bbc_zvertex");
902 Zvtx =
static_cast<TH1 *
>(bbc_zvertex->Clone());
904 bbc_zvertex_bbll1 = cl->
getHisto(
"BBCMON_0",
"bbc_zvertex_bbll1");
906 Zvtx_bbll1 =
static_cast<TH1 *
>(bbc_zvertex_bbll1->Clone());
908 bbc_nevent_counter = cl->
getHisto(
"BBCMON_0",
"bbc_nevent_counter");
910 bbc_tzero_zvtx =
static_cast<TH2 *
>(cl->
getHisto(
"BBCMON_0",
"bbc_tzero_zvtx"));
912 TzeroZvtx =
static_cast<TH2 *
>(bbc_tzero_zvtx->Clone());
914 bbc_avr_hittime = cl->
getHisto(
"BBCMON_0",
"bbc_avr_hittime");
916 AvrHitTime =
static_cast<TH1 *
>(bbc_avr_hittime->Clone());
918 bbc_north_hittime = cl->
getHisto(
"BBCMON_0",
"bbc_north_hittime");
920 NorthHitTime =
static_cast<TH1 *
>(bbc_north_hittime->Clone());
922 bbc_south_hittime = cl->
getHisto(
"BBCMON_0",
"bbc_south_hittime");
924 SouthHitTime =
static_cast<TH1 *
>(bbc_south_hittime->Clone());
926 bbc_south_chargesum = cl->
getHisto(
"BBCMON_0",
"bbc_south_chargesum");
928 SouthChargeSum =
static_cast<TH1 *
>(bbc_south_chargesum->Clone());
930 bbc_north_chargesum = cl->
getHisto(
"BBCMON_0",
"bbc_north_chargesum");
932 NorthChargeSum =
static_cast<TH1 *
>(bbc_north_chargesum->Clone());
934 bbc_prescale_hist = cl->
getHisto(
"BBCMON_0",
"bbc_prescale_hist");
936 Prescale_hist =
static_cast<TH1 *
>(bbc_prescale_hist->Clone());
938 bbc_time_wave =
static_cast<TH2 *
>( cl->
getHisto(
"BBCMON_0",
"bbc_time_wave") );
940 TimeWave =
static_cast<TH2 *
>(bbc_time_wave->Clone());
942 bbc_charge_wave =
static_cast<TH2 *
>( cl->
getHisto(
"BBCMON_0",
"bbc_charge_wave") );
944 ChargeWave =
static_cast<TH2 *
>(bbc_charge_wave->Clone());
946 bbc_south_hitmap =
static_cast<TH2 *
>( cl->
getHisto(
"BBCMON_0",
"bbc_south_hitmap") );
948 SouthHitMap =
static_cast<TH2 *
>(bbc_south_hitmap->Clone());
950 bbc_north_hitmap =
static_cast<TH2 *
>( cl->
getHisto(
"BBCMON_0",
"bbc_north_hitmap") );
952 NorthHitMap =
static_cast<TH2 *
>(bbc_north_hitmap->Clone());
958 for (
int side = 0; side <
nSIDE; side++)
962 name <<
"FitHitTime" << bbc_onlmon::SIDE_Str[side];
963 HitTime[side] = bbc_tdc->ProjectionY(name.str().c_str(), side * 64, side * 64 + 63);
966 name << bbc_onlmon::SIDE_Str[side] <<
" BBC/MBD TDC Distribution";
968 HitTime[side]->SetTitle(name.str().c_str());
990 double nhit_total = bbc_nevent_counter->GetBinContent(2);
992 nhit[0] = bbc_nevent_counter->GetBinContent(2);
993 nhit[1] = bbc_nevent_counter->GetBinContent(3);
1003 for (
int side = 0; side <
nSIDE; side++)
1005 for (
int trig = 0; trig <
nTRIGGER; trig++)
1009 if (nhit[trig] != 0)
1012 if (side == 0 && trig == 1 &&
i == 7)
1014 nhitPmt[trig][side][
i] = 999;
1019 nhitPmt[trig][side][
i] = 999;
1024 nhitPmt[trig][side][
i] = 0;
1027 ifnew(TGraph(nPMT_1SIDE_BBC, pmt, nhitPmt[trig][side]),
nHit[trig][side]);
1040 for (
int iside = 0; iside <
nSIDE; iside++)
1044 tdcOverMean[iside][
i] = 0.0;
1045 tdcOverErrY[iside][
i] = 0.0;
1049 for (
int side = 0; side <
nSIDE; side++)
1065 ifnew(TGraphErrors(nPMT_1SIDE_BBC, pmt, tdcOverMean[side], zero,
1076 std::ostringstream
msg;
1080 time_t evttime = cl->
EventTime(
"CURRENT");
1084 otext <<
" Events: " << nhit_total;
1085 otext <<
" Date:" << ctime(&evttime);
1087 TextTop->SetText(0.01, 0.25, text.c_str());
1099 Zvtx->SetLineColor(4);
1100 Zvtx->SetFillColor(4);
1106 float maxEntries = 10;
1108 for (
int i = 0;
i <
Zvtx->GetNbinsX();
i++)
1110 if (fabs(
Zvtx->GetBinCenter(
i)) < 130)
1112 if (maxEntries < Zvtx->GetBinContent(
i + 1))
1114 maxEntries =
Zvtx->GetBinContent(
i + 1);
1123 Zvtx->Fit(
"FitZvtx",
"R");
1145 Zvtx->SetMaximum(maxEntries * 1.05);
1146 Zvtx->SetTitle(
"BBC/MBD ZVertex (south<-->north)");
1154 if (
Zvtx->GetEntries() > 0)
1163 memset(trig_rate, 0,
sizeof(trig_rate));
1164 memset(trig_rate_err, 0,
sizeof(trig_rate_err));
1165 memset(nevent, 0,
sizeof(nevent));
1205 Zvtx_array[0] =
Zvtx;
1222 otext <<
" ( " <<
Prescale_hist->GetBinContent(i + 1) <<
" ) "
1225 otext << Zvtx_array[
i]->GetEntries();
1233 otext << ((float)
int(Zvtx_array[i]->GetMean() * 10)) / 10.0 <<
"cm ( "
1234 << ((float)
int(Zvtx_array[i]->GetRMS() * 10)) / 10.0 <<
" cm) ";
1253 otext <<
"Z_{All Trigs}^{Fit}= " << ((float)
int(
FitZvtx->GetParameter(1) * 10)) / 10.0 <<
" cm";
1264 otext <<
"#sigma = " << int(
FitZvtx->GetParameter(2)) <<
" cm";
1276 Zvtx_bbll1->GetXaxis()->SetRangeUser(-30,30);
1296 double nevents = bbc_nevent_counter->GetBinContent(2);
1336 double *peakpos =
tspec->GetPositionX();
1337 float centerpeak = peakpos[0];
1339 if (peakpos[2] > peakpos[1])
1341 sidepeak[0] = peakpos[1];
1342 sidepeak[1] = peakpos[2];
1346 sidepeak[1] = peakpos[1];
1347 sidepeak[0] = peakpos[2];
1349 rangemin = centerpeak - (centerpeak - sidepeak[0]) / 2.;
1350 rangemax = centerpeak + (sidepeak[1] - centerpeak) / 2.;
1392 double *peakpos =
tspec->GetPositionX();
1393 float centerpeak = peakpos[0];
1395 if (peakpos[2] > peakpos[1])
1397 sidepeak[0] = peakpos[1];
1398 sidepeak[1] = peakpos[2];
1402 sidepeak[1] = peakpos[1];
1403 sidepeak[0] = peakpos[2];
1405 rangemin = centerpeak - (centerpeak - sidepeak[0]) / 2.;
1406 rangemax = centerpeak + (sidepeak[1] - centerpeak) / 2.;
1445 double *peakpos =
tspec->GetPositionX();
1446 float centerpeak = peakpos[0];
1448 if (peakpos[2] > peakpos[1])
1450 sidepeak[0] = peakpos[1];
1451 sidepeak[1] = peakpos[2];
1455 sidepeak[1] = peakpos[1];
1456 sidepeak[0] = peakpos[2];
1458 rangemin = centerpeak - (centerpeak - sidepeak[0]) / 2.;
1459 rangemax = centerpeak + (sidepeak[1] - centerpeak) / 2.;
1497 otext <<
"South:" << ((float)
int(
FitSouthHitTime->GetParameter(1) * 10)) / 10 <<
"[ns] ";
1498 otext <<
"North:" << ((float)
int(
FitNorthHitTime->GetParameter(1) * 10)) / 10 <<
"[ns] ";
1500 if (bbc_onlmon::BBC_MIN_REGULAR_TDC0_MEAN < FitNorthHitTime->
GetParameter(1) &&
1513 otext <<
"Too low statistics";
1517 otext <<
"Change Global-Offset on V124";
1534 otext <<
" Global offset : ";
1535 if (
int(-2 * delay) == 0)
1544 if (!(bbc_onlmon::BBC_MIN_REGULAR_TDC0_MEAN < FitNorthHitTime->
GetParameter(1) &&
1550 otext <<
"Need to call BBC expert: " << int(-2 * delay) <<
"count shifted";
1615 for (
int side = 0; side <
nSIDE; side++)
1622 std::cout <<
"FrameTdcOver[" << side <<
"] = " << (
unsigned long)
FrameTdcOver[side] << std::endl;
1625 name << bbc_onlmon::SIDE_Str[side] <<
" BBC/MBD TDC Distribution";
1629 FrameTdcOver[side]->GetXaxis()->SetTitle(
"PMT Number");
1632 FrameTdcOver[side]->GetYaxis()->SetTitle(
"Deviation [#sigma]");
1636 TdcOver[side]->SetMarkerStyle(21);
1637 TdcOver[side]->SetMarkerSize(0.5);
1638 TdcOver[side]->SetMarkerColor(2);
1646 if (tdcOverMean[side][
i] == 0 && tdcOverErrY[side][
i] == 0)
1649 msg <<
"Stop the run (ch " <<
i + 1 <<
" is out of the range)";
1658 msg <<
"ch " <<
i + 1 <<
" is too low ( " << std::fixed << std::setprecision(1) << tdcOverMean[side][
i] <<
" #sigma)";
1667 msg <<
"ch " <<
i + 1 <<
" is too high ( " << std::fixed << std::setprecision(1) << tdcOverMean[side][
i] <<
" #sigma)";
1676 msg <<
"ch " <<
i + 1 <<
" is too wide ( " << std::fixed << std::setprecision(1) << tdcOverErrY[side][
i] <<
" #sigma)";
1688 FramenHit[side] = gPad->DrawFrame(0.5, 0, 64.5, 1);
1692 name << bbc_onlmon::SIDE_Str[side] <<
" BBC/MBD number of Hit per Event";
1693 FramenHit[side]->SetTitle(name.str().c_str());
1696 FramenHit[side]->GetXaxis()->SetTitle(
"PMT Number");
1697 FramenHit[side]->GetXaxis()->SetTitleSize(0.05);
1698 FramenHit[side]->GetXaxis()->SetLabelSize(0.05);
1699 FramenHit[side]->GetYaxis()->SetTitleSize(0.05);
1700 FramenHit[side]->GetYaxis()->SetLabelSize(0.05);
1701 nHit[0][side]->SetMarkerStyle(21);
1702 nHit[0][side]->SetMarkerSize(0.5);
1703 nHit[0][side]->SetMarkerColor(2);
1704 nHit[0][side]->Draw(
"P");
1705 nHit[1][side]->SetMarkerStyle(22);
1706 nHit[1][side]->SetMarkerSize(0.5);
1707 nHit[1][side]->SetMarkerColor(4);
1708 nHit[1][side]->Draw(
"P");
1730 msg <<
"Too low hit-rate into ch " <<
i + 1 <<
" ("
1731 << std::fixed << std::setprecision(2) << nhitPmt[0][side][
i]
1732 <<
"/" << std::setprecision(0) << nhit[0] <<
"evt)";
1741 msg <<
"Too high hit-rate into ch " <<
i + 1 <<
" ("
1742 << std::fixed << std::setprecision(2) << nhitPmt[0][side][
i]
1743 <<
"/" << std::setprecision(0) << nhit[0] <<
"evt)";
1760 std::cout <<
"ch7(S8) : Ignore hit rate of laser" << std::endl;
1764 msg <<
"Lack of laser's hit into ch " <<
i + 1 <<
" ("
1765 << std::fixed << std::setprecision(2) << nhitPmt[1][side][
i]
1766 <<
"/" << std::setprecision(0) << nhit[1] <<
"evt)";
1775 msg <<
"Lack of laser's hit into ch " <<
i + 1 <<
" ("
1776 << std::fixed << std::setprecision(2) << nhitPmt[1][side][
i]
1777 <<
"/" << std::setprecision(0) << nhit[1] <<
"evt)";
1808 for (
int side = 0; side <
nSIDE; side++)
1827 double *peakpos =
tspec->GetPositionX();
1828 float centerpeak = peakpos[0];
1830 if (peakpos[2] > peakpos[1])
1832 sidepeak[0] = peakpos[1];
1833 sidepeak[1] = peakpos[2];
1837 sidepeak[1] = peakpos[1];
1838 sidepeak[0] = peakpos[2];
1840 rangemin = centerpeak - (centerpeak - sidepeak[0]) / 2.;
1841 rangemax = centerpeak + (sidepeak[1] - centerpeak) / 2.;
1844 FitHitTime[side]->SetRange(rangemin, rangemax);
1847 float height =
HitTime[side]->GetMaximum();
1867 Zvtx->Fit(
"FitZvtx",
"QN0L");
1870 Zvtx->Fit(
"FitZvtx",
"QRL");
1873 float height =
Zvtx->GetMaximum();
1971 TH1 *bbcmon_hist1 = cl->
getHisto(
"BBCMON_0",
"bbc_zvertex");
1972 TH2 *bbcmon_hist2 = (TH2*)cl->
getHisto(
"BBCMON_0",
"bbc_tzero_zvtx");
1974 if (!gROOT->FindObject(
"BbcMon1"))
1978 TC[0]->SetEditable(1);
1983 bbcmon_hist1->DrawCopy();
1988 TC[0]->SetEditable(0);
1995 bbcmon_hist2->DrawCopy();
1998 PrintRun.SetTextFont(62);
1999 PrintRun.SetTextSize(0.04);
2001 PrintRun.SetTextAlign(23);
2002 std::ostringstream runnostream;
2004 time_t evttime = cl->
EventTime(
"CURRENT");
2007 <<
", Time: " << ctime(&evttime);
2008 runstring = runnostream.str();
2010 PrintRun.DrawText(0.5, 1., runstring.c_str());
2013 TC[0]->SetEditable(0);
2022 TH1 *bbcmon_hist1 = cl->
getHisto(
"BBCMON_0",
"bbc_zvertex");
2023 TH2 *bbcmon_hist2 = (TH2*)cl->
getHisto(
"BBCMON_0",
"bbc_tzero_zvtx");
2024 if (!gROOT->FindObject(
"BbcMon2"))
2028 TC[1]->SetEditable(1);
2033 bbcmon_hist1->DrawCopy();
2038 TC[1]->SetEditable(0);
2044 bbcmon_hist2->DrawCopy();
2047 PrintRun.SetTextFont(62);
2048 PrintRun.SetTextSize(0.04);
2050 PrintRun.SetTextAlign(23);
2051 std::ostringstream runnostream;
2053 time_t evttime = cl->
EventTime(
"CURRENT");
2057 <<
", Time: " << ctime(&evttime);
2058 runstring = runnostream.str();
2060 PrintRun.DrawText(0.5, 1., runstring.c_str());
2063 TC[1]->SetEditable(0);
2071 int iret =
Draw(what);
2077 for (TCanvas *canvas :
TC)
2079 if (canvas ==
nullptr)
2093 int iret =
Draw(what);
2102 for (TCanvas *canvas :
TC)
2104 if (canvas ==
nullptr)
2138 std::vector<float> var;
2139 std::vector<float> varerr;
2154 if (!gROOT->FindObject(
"BbcMon3"))
2159 float *
x =
new float[var.size()];
2160 float *
y =
new float[var.size()];
2161 float *ex =
new float[var.size()];
2162 float *ey =
new float[var.size()];
2164 for (
unsigned int i = 0;
i < var.size();
i++)
2210 x =
new float[var.size()];
2211 y =
new float[var.size()];
2212 ex =
new float[var.size()];
2213 ey =
new float[var.size()];
2215 for (
unsigned int i = 0;
i < var.size();
i++)
2259 transparent_pad->cd();
2261 FatalMsg.SetTextFont(62);
2262 FatalMsg.SetTextSize(0.1);
2263 FatalMsg.SetTextColor(4);
2265 FatalMsg.SetTextAlign(23);
2266 FatalMsg.DrawText(0.5, 0.9,
"BBCMONITOR");
2267 FatalMsg.SetTextAlign(22);
2268 FatalMsg.DrawText(0.5, 0.5,
"SERVER");
2269 FatalMsg.SetTextAlign(21);
2270 FatalMsg.DrawText(0.5, 0.1,
"DEAD");
2271 transparent_pad->Update();