File indexing completed on 2026-04-05 08:16:02
0001 #include "CommonFuncs.C"
0002
0003 #include <onlmon/localpol/LocalPolMonDraw.h>
0004
0005 #include <onlmon/OnlMonClient.h>
0006 #include <TString.h>
0007
0008 R__LOAD_LIBRARY(libonllocalpolmon_client.so)
0009
0010 void localpolDrawInit(const int online = 0)
0011 {
0012
0013 OnlMonClient *cl = OnlMonClient::instance();
0014
0015
0016
0017 TString BeamName[2]={"Blue","Yell"};
0018 TString MethodName[2]={"Arithmetic","Geometric"};
0019 TString Orientation[2]={"LR","UD"};
0020 for(int beam=0; beam<2; beam++){
0021 for(int method=0; method<2; method++){
0022 for(int orient=0; orient<2; orient++){
0023 cl->registerHisto(Form("h_Asym%s%s%s",BeamName[beam].Data(),MethodName[method].Data(),Orientation[orient].Data()),"LOCALPOLMON_0");
0024 cl->registerHisto(Form("h_AsymScramble%s%s%s",BeamName[beam].Data(),MethodName[method].Data(),Orientation[orient].Data()),"LOCALPOLMON_0");
0025 }
0026 }
0027 }
0028 for(int i=0; i<16;i++){
0029 cl->registerHisto(Form("h_trigger%d",i),"LOCALPOLMON_0");
0030 }
0031 cl->registerHisto("h_BlueCountsUD","LOCALPOLMON_0");
0032 cl->registerHisto("h_BlueCountsLR","LOCALPOLMON_0");
0033 cl->registerHisto("h_YellCountsUD","LOCALPOLMON_0");
0034 cl->registerHisto("h_YellCountsLR","LOCALPOLMON_0");
0035
0036 cl->registerHisto("h_BlueCountsScrambleUD","LOCALPOLMON_0");
0037 cl->registerHisto("h_BlueCountsScrambleLR","LOCALPOLMON_0");
0038 cl->registerHisto("h_YellCountsScrambleUD","LOCALPOLMON_0");
0039 cl->registerHisto("h_YellCountsScrambleLR","LOCALPOLMON_0");
0040
0041 cl->registerHisto("h_events","LOCALPOLMON_0");
0042 cl->registerHisto("h_times","LOCALPOLMON_0");
0043
0044
0045 cl->registerHisto("hmultiplicitySMD_NH","LOCALPOLMON_0");
0046 cl->registerHisto("hmultiplicitySMD_NV","LOCALPOLMON_0");
0047 cl->registerHisto("hmultiplicitySMD_SH","LOCALPOLMON_0");
0048 cl->registerHisto("hmultiplicitySMD_SV","LOCALPOLMON_0");
0049
0050 cl->registerHisto("hpositionSMD_NH_up","LOCALPOLMON_0");
0051 cl->registerHisto("hpositionSMD_NV_up","LOCALPOLMON_0");
0052 cl->registerHisto("hpositionSMD_SH_up","LOCALPOLMON_0");
0053 cl->registerHisto("hpositionSMD_SV_up","LOCALPOLMON_0");
0054 cl->registerHisto("hpositionSMD_NH_dn","LOCALPOLMON_0");
0055 cl->registerHisto("hpositionSMD_NV_dn","LOCALPOLMON_0");
0056 cl->registerHisto("hpositionSMD_SH_dn","LOCALPOLMON_0");
0057 cl->registerHisto("hpositionSMD_SV_dn","LOCALPOLMON_0");
0058
0059 cl->registerHisto("hadcsumSMD_NH","LOCALPOLMON_0");
0060 cl->registerHisto("hadcsumSMD_NV","LOCALPOLMON_0");
0061 cl->registerHisto("hadcsumSMD_SH","LOCALPOLMON_0");
0062 cl->registerHisto("hadcsumSMD_SV","LOCALPOLMON_0");
0063
0064 cl->registerHisto("hspinpattern","LOCALPOLMON_0");
0065
0066 for(int i=0; i<6; i++){
0067 cl->registerHisto(Form("hwaveform%d",i),"LOCALPOLMON_0");
0068 }
0069
0070
0071 cl->registerHisto("hsyncfrac","LOCALPOLMON_0");
0072
0073 cl->registerHisto("Bluespace","LOCALPOLMON_0");
0074 cl->registerHisto("Yellowspace","LOCALPOLMON_0");
0075
0076 cl->registerHisto("hclocks","LOCALPOLMON_0");
0077
0078 cl->registerHisto("hevolsync","LOCALPOLMON_0");
0079 cl->registerHisto("hshiftevol","LOCALPOLMON_0");
0080
0081
0082
0083 CreateSubsysHostlist("localpol_hosts.list", online);
0084
0085
0086 cl->requestHistoBySubSystem("LOCALPOLMON_0", 1);
0087
0088 OnlMonDraw *localpolmon = new LocalPolMonDraw("LOCALPOLMONDRAW");
0089 cl->registerDrawer(localpolmon);
0090 }
0091
0092 void localpolDraw(const char *what="ALL")
0093 {
0094
0095 OnlMonClient *cl = OnlMonClient::instance();
0096 cl->requestHistoBySubSystem("LOCALPOLMON_0",1);
0097 cl->Draw("LOCALPOLMONDRAW",what);
0098
0099 }
0100
0101 void localpolSavePlot()
0102 {
0103 OnlMonClient *cl = OnlMonClient::instance();
0104 cl->SavePlot("LOCALPOLMONDRAW");
0105 return;
0106 }
0107
0108 void localpolHtml()
0109 {
0110 OnlMonClient *cl = OnlMonClient::instance();
0111 cl->MakeHtml("LOCALPOLMONDRAW");
0112 return;
0113 }