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