Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:54

0001 #include "CommonFuncs.C"
0002 
0003 #include <onlmon/OnlMonClient.h>
0004 #include <onlmon/intt/InttMonDraw.h>
0005 
0006 // cppcheck-suppress unknownMacro
0007 R__LOAD_LIBRARY(libonlinttmon_client.so)
0008 
0009 void inttDrawInit(const int online = 0)
0010 {
0011   OnlMonClient *cl = OnlMonClient::instance();
0012   // register histos we want with monitor name
0013   OnlMonDraw *inttmon = new InttMonDraw("INTTMONDRAW");    // create Drawing Object
0014 
0015   for (int serverid = 0; serverid < 8; serverid++)
0016   {
0017     std::string servername = "INTTMON_" + std::to_string(serverid);
0018     inttmon->AddServer(servername);
0019 
0020     cl->registerHisto("InttEvtHist",servername);
0021     cl->registerHisto("InttHitHist",servername);
0022     cl->registerHisto("InttBcoHist",servername);
0023     cl->registerHisto("InttLogHist",servername);
0024     //...
0025   }
0026 
0027   // for local host, just call inttDrawInit(2)
0028   CreateSubsysHostlist("intt_hosts.list", online);
0029 
0030   // get my histos from server, the second parameter = 1
0031   // says I know they are all on the same node
0032    for (auto iter = inttmon->ServerBegin(); iter != inttmon->ServerEnd(); ++iter)
0033   {
0034     cl->requestHistoBySubSystem(iter->c_str(), 1);
0035   }
0036   cl->registerDrawer(inttmon);              // register with client framework
0037 }
0038 
0039 void inttDraw(const char *what="ALL")
0040 {
0041   OnlMonClient *cl = OnlMonClient::instance();      // get pointer to framewrk
0042   OnlMonDraw *inttmon = cl->GetDrawer("INTTMONDRAW");  // get pointer to this drawer
0043   for (auto iter = inttmon->ServerBegin(); iter != inttmon->ServerEnd(); ++iter)
0044   {
0045     cl->requestHistoBySubSystem(iter->c_str(), 1);
0046   }
0047   cl->Draw("INTTMONDRAW",what);             // Draw Histos of registered Drawers
0048 }
0049 
0050 void inttSavePlot()
0051 {
0052   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0053   cl->SavePlot("INTTMONDRAW");                          // Save Plots
0054   return;
0055 }
0056 
0057 void inttHtml()
0058 {
0059   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0060   cl->MakeHtml("INTTMONDRAW");                        // Create html output
0061   return;
0062 }