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/localpol/LocalPolMonDraw.h>
0004 
0005 #include <onlmon/OnlMonClient.h>
0006 #include <TString.h>
0007 
0008 // cppcheck-suppress unknownMacro
0009 R__LOAD_LIBRARY(libonllocalpolmon_client.so)
0010 
0011 void localpolDrawInit(const int online = 0)
0012 {
0013 
0014   OnlMonClient *cl = OnlMonClient::instance();
0015   //cl->Verbosity(3);
0016   // register histos we want with monitor name
0017 
0018   TString BeamName[2]={"Blue","Yell"};
0019   TString MethodName[2]={"Arithmetic","Geometric"};
0020   TString Orientation[2]={"LR","UD"};
0021   for(int beam=0; beam<2; beam++){
0022     for(int method=0; method<2; method++){
0023       for(int orient=0; orient<2; orient++){
0024     cl->registerHisto(Form("h_Asym%s%s%s",BeamName[beam].Data(),MethodName[method].Data(),Orientation[orient].Data()),"LOCALPOLMON_0");
0025     cl->registerHisto(Form("h_AsymScramble%s%s%s",BeamName[beam].Data(),MethodName[method].Data(),Orientation[orient].Data()),"LOCALPOLMON_0");
0026       }
0027     }
0028   }
0029   for(int i=0; i<16;i++){
0030     cl->registerHisto(Form("h_trigger%d",i),"LOCALPOLMON_0");
0031   }
0032   cl->registerHisto("h_BlueCountsUD","LOCALPOLMON_0");
0033   cl->registerHisto("h_BlueCountsLR","LOCALPOLMON_0");
0034   cl->registerHisto("h_YellCountsUD","LOCALPOLMON_0");
0035   cl->registerHisto("h_YellCountsLR","LOCALPOLMON_0");
0036 
0037   cl->registerHisto("h_BlueCountsScrambleUD","LOCALPOLMON_0");
0038   cl->registerHisto("h_BlueCountsScrambleLR","LOCALPOLMON_0");
0039   cl->registerHisto("h_YellCountsScrambleUD","LOCALPOLMON_0");
0040   cl->registerHisto("h_YellCountsScrambleLR","LOCALPOLMON_0");
0041 
0042   cl->registerHisto("h_events","LOCALPOLMON_0");
0043   cl->registerHisto("h_times","LOCALPOLMON_0");
0044 
0045 
0046   cl->registerHisto("hmultiplicitySMD_NH","LOCALPOLMON_0");
0047   cl->registerHisto("hmultiplicitySMD_NV","LOCALPOLMON_0");
0048   cl->registerHisto("hmultiplicitySMD_SH","LOCALPOLMON_0");
0049   cl->registerHisto("hmultiplicitySMD_SV","LOCALPOLMON_0");
0050 
0051   cl->registerHisto("hpositionSMD_NH_up","LOCALPOLMON_0");
0052   cl->registerHisto("hpositionSMD_NV_up","LOCALPOLMON_0");
0053   cl->registerHisto("hpositionSMD_SH_up","LOCALPOLMON_0");
0054   cl->registerHisto("hpositionSMD_SV_up","LOCALPOLMON_0");
0055   cl->registerHisto("hpositionSMD_NH_dn","LOCALPOLMON_0");
0056   cl->registerHisto("hpositionSMD_NV_dn","LOCALPOLMON_0");
0057   cl->registerHisto("hpositionSMD_SH_dn","LOCALPOLMON_0");
0058   cl->registerHisto("hpositionSMD_SV_dn","LOCALPOLMON_0");
0059 
0060   cl->registerHisto("hadcsumSMD_NH","LOCALPOLMON_0");
0061   cl->registerHisto("hadcsumSMD_NV","LOCALPOLMON_0");
0062   cl->registerHisto("hadcsumSMD_SH","LOCALPOLMON_0");
0063   cl->registerHisto("hadcsumSMD_SV","LOCALPOLMON_0");
0064 
0065   cl->registerHisto("hspinpattern","LOCALPOLMON_0");
0066 
0067   for(int i=0; i<6; i++){
0068     cl->registerHisto(Form("hwaveform%d",i),"LOCALPOLMON_0");
0069   }
0070   
0071   //cl->registerHisto("htimesync","LOCALPOLMON_0");
0072   cl->registerHisto("hsyncfrac","LOCALPOLMON_0");
0073   
0074   cl->registerHisto("Bluespace","LOCALPOLMON_0");
0075   cl->registerHisto("Yellowspace","LOCALPOLMON_0");
0076 
0077   cl->registerHisto("hclocks","LOCALPOLMON_0");
0078 
0079   cl->registerHisto("hevolsync","LOCALPOLMON_0");
0080   cl->registerHisto("hshiftevol","LOCALPOLMON_0");
0081 
0082   // for local host, just call localpolDrawInit(2)
0083   //cl->AddServerHost("localhost");  // check local host first
0084   CreateSubsysHostlist("localpol_hosts.list", online);
0085 
0086 // says I know they are all on the same node
0087   cl->requestHistoBySubSystem("LOCALPOLMON_0", 1);
0088 
0089   OnlMonDraw *localpolmon = new LocalPolMonDraw("LOCALPOLMONDRAW");    // create Drawing Object
0090   cl->registerDrawer(localpolmon);              // register with client framework
0091 }
0092 
0093 void localpolDraw(const char *what="ALL")
0094 {
0095 
0096   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0097   cl->requestHistoBySubSystem("LOCALPOLMON_0",1);      // update histos
0098   cl->Draw("LOCALPOLMONDRAW",what);                      // Draw Histos of registered Drawers
0099 
0100 }
0101 
0102 void localpolSavePlot()
0103 {
0104     OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0105     cl->SavePlot("LOCALPOLMONDRAW");                  // Save Plots
0106     return;
0107 }
0108 
0109 void localpolHtml()
0110 {
0111   OnlMonClient *cl = OnlMonClient::instance();  // get pointer to framewrk
0112   cl->MakeHtml("LOCALPOLMONDRAW");                       // create html output
0113   return;
0114 }