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/cemc/CemcMonDraw.h>
0004 
0005 #include <onlmon/OnlMonClient.h>
0006 
0007 // cppcheck-suppress unknownMacro
0008 R__LOAD_LIBRARY(libonlcemcmon_client.so)
0009 
0010 std::string monitorname("CEMCMON");
0011 
0012 void cemcDrawInit(const int online = 0)
0013 {
0014   OnlMonClient *cl = OnlMonClient::instance();
0015   cl->AddServerHost("localhost");  // stand-in for SEB00
0016   cl->AddServerHost("rcas2068");   //  stand-in for SEB01
0017   // CreateHostList(online);
0018   // register histos we want with monitor name
0019   for (unsigned int i = 0; i < 2; i++)
0020   {
0021   std::string monitor = monitorname + string("_") + to_string(i);
0022   cl->registerHisto("cemc_occupancy", monitor);
0023   cl->registerHisto("cemc_runningmean", monitor);
0024   cl->requestHistoBySubSystem(monitor, 1);
0025   }
0026   //  get my histos from server, the second parameter = 1
0027   //  says I know they are all on the same node
0028   OnlMonDraw *cemcmon = new CemcMonDraw("CEMCMONDRAW");  // create Drawing Object
0029   cl->registerDrawer(cemcmon);              // register with client framework
0030 }
0031 
0032 void cemcDraw(const char *what = "Standard")
0033 {
0034   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0035   for (unsigned int i = 0; i < 2; i++)
0036   {
0037   std::string monitor = monitorname + string("_") + to_string(i);
0038   cl->requestHistoBySubSystem(monitor);       // update histos
0039   }
0040   cl->Draw("CEMCMONDRAW", what);                    // Draw Histos of registered Drawers
0041 }
0042 
0043 void cemcPS()
0044 {
0045   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0046   cl->MakePS("CEMCMONDRAW");                        // Create PS files
0047   return;
0048 }
0049 
0050 void cemcHtml()
0051 {
0052   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0053   cl->MakeHtml("CEMCMONDRAW");                      // Create html output
0054   return;
0055 }