Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_daq_client.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run_daq_client.C
1 #include "CommonFuncs.C"
2 
3 #include <onlmon/daq/DaqMonDraw.h>
4 
5 #include <onlmon/OnlMonClient.h>
6 
7 // cppcheck-suppress unknownMacro
8 R__LOAD_LIBRARY(libonldaqmon_client.so)
9 
10 void daqDrawInit(const int online = 0)
11 {
13  // register histos we want with monitor name
14  cl->registerHisto("daqmon_hist1", "DAQMON_0");
15  cl->registerHisto("daqmon_hist2", "DAQMON_0");
16  cl->AddServerHost("localhost"); // check local host first
17  CreateHostList(online);
18  // get my histos from server, the second parameter = 1
19  // says I know they are all on the same node
20  cl->requestHistoBySubSystem("DAQMON_0", 1);
21  OnlMonDraw *daqmon = new DaqMonDraw("DAQMONDRAW"); // create Drawing Object
22  cl->registerDrawer(daqmon); // register with client framework
23 }
24 
25 void daqDraw(const char *what = "ALL")
26 {
27  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
28  cl->requestHistoBySubSystem("DAQMON_0",1); // update histos
29  cl->Draw("DAQMONDRAW", what); // Draw Histos of registered Drawers
30 }
31 
33 {
34  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
35  cl->SavePlot("DAQMONDRAW"); // Save Plots
36  return;
37 }
38 
39 void daqHtml()
40 {
41  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
42  cl->MakeHtml("DAQMONDRAW"); // Create html output
43  return;
44 }