Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_cemc_client.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run_cemc_client.C
1 #include "CommonFuncs.C"
2 
3 #include <onlmon/cemc/CemcMonDraw.h>
4 
5 #include <onlmon/OnlMonClient.h>
6 
7 // cppcheck-suppress unknownMacro
8 R__LOAD_LIBRARY(libonlcemcmon_client.so)
9 //int nserver = 0;
10 void cemcDrawInit(const int online = 0)
11 {
13  cl -> Verbosity(0);
14  // register histos we want with monitor name
15  for (int serverid = 0; serverid <= 7; serverid++)
16  {
17  cl->registerHisto("h2_cemc_rm", Form("CEMCMON_%d",serverid));
18  cl->registerHisto("h2_cemc_mean", Form("CEMCMON_%d",serverid));
19  cl->registerHisto("h1_event", Form("CEMCMON_%d",serverid));
20  cl->registerHisto("h2_waveform_twrAvg", Form("CEMCMON_%d",serverid));
21  cl->registerHisto("h1_waveform_time", Form("CEMCMON_%d",serverid));
22  cl->registerHisto("h1_waveform_pedestal", Form("CEMCMON_%d",serverid));
23  cl->registerHisto("h1_fitting_sigDiff",Form("CEMCMON_%d",serverid));
24  cl->registerHisto("h1_fitting_pedDiff",Form("CEMCMON_%d",serverid));
25  cl->registerHisto("h1_fitting_timeDiff",Form("CEMCMON_%d",serverid));
26  cl->registerHisto("h1_packet_number",Form("CEMCMON_%d",serverid));
27  cl->registerHisto("h1_packet_length",Form("CEMCMON_%d",serverid));
28  cl->registerHisto("h1_packet_chans",Form("CEMCMON_%d",serverid));
29  cl->registerHisto("h1_cemc_adc",Form("CEMCMON_%d",serverid));
30 
31  for (int ih=0; ih<32; ih++){
32  cl->registerHisto(Form("h1_rm_sectorAvg_s%d",ih), Form("CEMCMON_%d",serverid));
33  }
34  }
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(Form("CEMCMON_%d",serverid), 1);
39  for(int i = 0; i <= 7; i++)
40  {
41  cl->requestHistoBySubSystem(Form("CEMCMON_%d",i), 1);
42  }
43  CemcMonDraw *cemcmon = new CemcMonDraw("CEMCMONDRAW"); // create Drawing Object
44  cemcmon -> setSave(0);
45  cl->registerDrawer(cemcmon); // register with client framework
46 }
47 
48 void cemcDraw(const char *what = "ALL")
49 {
50  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
51  for(int i = 0; i <= 7; i++)
52  {
53  cl->requestHistoBySubSystem(Form("CEMCMON_%d",i), 1);
54  }
55  cl->Draw("CEMCMONDRAW", what); // Draw Histos of registered Drawers
56 }
57 
59 {
60  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
61  cl->SavePlot("CEMCMONDRAW"); // Save Plots
62  return;
63 }
64 
65 void cemcHtml()
66 {
67  OnlMonClient *cl = OnlMonClient::instance(); // get pointer to framewrk
68  cl->MakeHtml("CEMCMONDRAW"); // Create html output
69  return;
70 }