Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-05 08:16:02

0001 #include "CommonFuncs.C"
0002 
0003 #include <onlmon/ll1/LL1MonDraw.h>
0004 
0005 #include <onlmon/OnlMonClient.h>
0006 
0007 R__LOAD_LIBRARY(libonlll1mon_client.so)
0008 
0009 void ll1DrawInit(const int online = 0)
0010 {
0011   OnlMonClient *cl = OnlMonClient::instance();
0012   // register histos we want with monitor name
0013   cl->registerHisto("h_nhit_n1", "LL1MON_0");
0014   cl->registerHisto("h_nhit_n2", "LL1MON_0");
0015   cl->registerHisto("h_nhit_s1", "LL1MON_0");
0016   cl->registerHisto("h_nhit_s2", "LL1MON_0");
0017   cl->registerHisto("h_nhit_corr", "LL1MON_0");
0018   cl->registerHisto("h_line_up", "LL1MON_0");
0019   cl->registerHisto("h_line_up", "LL1MON_0");
0020   cl->registerHisto("h_8x8_sum_emcal", "LL1MON_0");
0021   cl->registerHisto("h_8x8_sum_emcal_above_threshold_0", "LL1MON_0");
0022   cl->registerHisto("h_8x8_sum_emcal_above_threshold_1", "LL1MON_0");
0023   cl->registerHisto("h_8x8_sum_emcal_above_threshold_2", "LL1MON_0");
0024   cl->registerHisto("h_8x8_sum_emcal_above_threshold_3", "LL1MON_0");
0025   cl->registerHisto("h_hit_format", "LL1MON_0");
0026   cl->registerHisto("h_jet_input", "LL1MON_0");
0027   cl->registerHisto("h_jet_output", "LL1MON_0");
0028   cl->registerHisto("h_jet_output_above_threshold_0", "LL1MON_0");
0029   cl->registerHisto("h_jet_output_above_threshold_1", "LL1MON_0");
0030   cl->registerHisto("h_jet_output_above_threshold_2", "LL1MON_0");
0031   cl->registerHisto("h_jet_output_above_threshold_3", "LL1MON_0");
0032   cl->registerHisto("h_sample_diff_emcal", "LL1MON_0");
0033   for (int i = 0; i < 16;i++)
0034     {
0035       std::string histname = "h_2x2_sum_emcal_"+std::to_string(i);
0036       cl->registerHisto(histname.c_str(), "LL1MON_0");
0037     }
0038   cl->registerHisto("h_sample_diff_jet_input", "LL1MON_0");
0039 
0040   // for local host, just call ll1DrawInit(2)
0041   CreateSubsysHostlist("ll1_hosts.list", online);
0042 
0043   // get my histos from server, the second parameter = 1
0044   // says I know they are all on the same node
0045   
0046 
0047   cl->requestHistoBySubSystem("LL1MON_0", 1);
0048   OnlMonDraw *ll1mon = new LL1MonDraw("LL1MONDRAW");  // create Drawing Object
0049   cl->registerDrawer(ll1mon);                // register with client framework
0050 }
0051 
0052 void ll1Draw(const char *what = "ALL")
0053 {
0054   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0055   cl->requestHistoBySubSystem("LL1MON_0",1);     // update histos
0056   cl->Draw("LL1MONDRAW", what);                  // Draw Histos of registered Drawers
0057 }
0058 
0059 void ll1SavePlot()
0060 {
0061   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0062   cl->SavePlot("LL1MONDRAW");                      // Save Plots
0063   return;
0064 }
0065 
0066 void ll1Html()
0067 {
0068   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0069   cl->MakeHtml("LL1MONDRAW");                    // Create html output
0070   return;
0071 }