Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_bbc_client.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run_bbc_client.C
1 #include "CommonFuncs.C"
2 
3 #include <onlmon/bbc/BbcMonDraw.h>
4 
5 #include <onlmon/OnlMonClient.h>
6 
7 // cppcheck-suppress unknownMacro
8 R__LOAD_LIBRARY(libonlbbcmon_client.so)
9 
10 void bbcDrawInit(const int online = 0)
11 {
13  // register histos we want with monitor name
14  cl->registerHisto("bbc_adc", "BBCMON_0");
15  cl->registerHisto("bbc_tdc", "BBCMON_0");
16  cl->registerHisto("bbc_tdc_overflow", "BBCMON_0");
17  cl->registerHisto("bbc_tdc_armhittime", "BBCMON_0");
18  cl->registerHisto("bbc_zvertex", "BBCMON_0");
19  cl->registerHisto("bbc_zvertex_bbll1", "BBCMON_0");
20  cl->registerHisto("bbc_nevent_counter", "BBCMON_0");
21  cl->registerHisto("bbc_tzero_zvtx", "BBCMON_0");
22  cl->registerHisto("bbc_prescale_hist", "BBCMON_0");
23  cl->registerHisto("bbc_avr_hittime", "BBCMON_0");
24  cl->registerHisto("bbc_north_hittime", "BBCMON_0");
25  cl->registerHisto("bbc_south_hittime", "BBCMON_0");
26  cl->registerHisto("bbc_north_chargesum", "BBCMON_0");
27  cl->registerHisto("bbc_south_chargesum", "BBCMON_0");
28  cl->registerHisto("bbc_time_wave", "BBCMON_0");
29  cl->registerHisto("bbc_charge_wave", "BBCMON_0");
30  cl->registerHisto("bbc_south_hitmap", "BBCMON_0");
31  cl->registerHisto("bbc_north_hitmap", "BBCMON_0");
32 
33  cl->AddServerHost("localhost"); // check local host first
34  CreateHostList(online);
35 
36  // get my histos from server, the second parameter = 1
37  // says I know they are all on the same node
38  cl->requestHistoBySubSystem("BBCMON_0", 1);
39  OnlMonDraw *bbcmon = new BbcMonDraw("BBCMONDRAW"); // create Drawing Object
40  cl->registerDrawer(bbcmon); // register with client framework
41 }
42 
43 void bbcDraw(const char *what = "ALL")
44 {
45  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
46  cl->requestHistoBySubSystem("BBCMON_0",1); // update histos
47  cl->Draw("BBCMONDRAW", what); // Draw Histos of registered Drawers
48 }
49 
51 {
52  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
53  cl->SavePlot("BBCMONDRAW"); // Save Plots
54  return;
55 }
56 
57 void bbcHtml()
58 {
59  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
60  cl->MakeHtml("BBCMONDRAW"); // Create html output
61  return;
62 }