Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_sepd_client.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run_sepd_client.C
1 #include "CommonFuncs.C"
2 
3 #include <onlmon/sepd/SepdMonDraw.h>
4 
5 #include <onlmon/OnlMonClient.h>
6 
7 // cppcheck-suppress unknownMacro
8 R__LOAD_LIBRARY(libonlsepdmon_client.so)
9 
10 void sepdDrawInit(const int online = 0)
11 {
13  // register histos we want with monitor name
14  cl->registerHisto("h_ADC0_s", "SEPDMON_0");
15  cl->registerHisto("h_hits0_s", "SEPDMON_0");
16  cl->registerHisto("h_ADC0_n", "SEPDMON_0");
17  cl->registerHisto("h_hits0_n", "SEPDMON_0");
18  cl->registerHisto("h_ADC_s", "SEPDMON_0");
19  cl->registerHisto("h_hits_s", "SEPDMON_0");
20  cl->registerHisto("h_ADC_n", "SEPDMON_0");
21  cl->registerHisto("h_hits_n", "SEPDMON_0");
22  cl->registerHisto("h_ADC_corr", "SEPDMON_0");
23  cl->registerHisto("h_hits_corr", "SEPDMON_0");
24  cl->registerHisto("h_event", "SEPDMON_0");
25  cl->registerHisto("h1_waveform_twrAvg", "SEPDMON_0");
26  cl->registerHisto("h1_waveform_time", "SEPDMON_0");
27  cl->registerHisto("h1_waveform_pedestal", "SEPDMON_0");
28  cl->registerHisto("h2_sepd_waveform", "SEPDMON_0");
29  cl->registerHisto("h1_packet_chans", "SEPDMON_0");
30  cl->registerHisto("h1_packet_length", "SEPDMON_0");
31  cl->registerHisto("h1_packet_number", "SEPDMON_0");
32  cl->registerHisto("h1_packet_event", "SEPDMON_0");
33 
34  cl->AddServerHost("localhost"); // check local host first
35  CreateHostList(online);
36  // get my histos from server, the second parameter = 1
37  // says I know they are all on the same node
38  cl->requestHistoBySubSystem("SEPDMON_0", 1);
39  OnlMonDraw *sepdmon = new SepdMonDraw("SEPDMONDRAW"); // create Drawing Object
40  cl->registerDrawer(sepdmon); // register with client framework
41 }
42 
43 void sepdDraw(const char *what = "ALL")
44 {
45  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
46  cl->requestHistoBySubSystem("SEPDMON_0", 1); // update histos
47  cl->Draw("SEPDMONDRAW", what); // Draw Histos of registered Drawers
48 }
49 
51 {
52  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
53  cl->SavePlot("SEPDMONDRAW"); // Save Plots
54  return;
55 }
56 
57 void sepdHtml()
58 {
59  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
60  cl->MakeHtml("SEPDMONDRAW"); // Create html output
61  return;
62 }