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