Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
run_tpc_client.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file run_tpc_client.C
1
#include "
CommonFuncs.C
"
2
3
#include <onlmon/tpc/TpcMonDraw.h>
4
5
#include <onlmon/OnlMonClient.h>
6
7
// cppcheck-suppress unknownMacro
8
R__LOAD_LIBRARY(libonltpcmon_client.so)
9
10
void
tpcDrawInit
(const
int
online = 0)
11
{
12
OnlMonClient
*cl =
OnlMonClient::instance
();
13
// register histos we want with monitor name
14
cl->
registerHisto
(
"tpcmon_hist1"
,
"TPCMON_0"
);
15
cl->
registerHisto
(
"tpcmon_hist2"
,
"TPCMON_0"
);
16
17
char
TPCMON_STR[100];
18
// TPC ADC pie chart
19
for
(
int
i
=0;
i
<24;
i
++ )
20
//for( int i: {1,20} )
21
{
22
sprintf(TPCMON_STR,
"TPCMON_%i"
,
i
);
23
//std::cout<<"You registered the NSIDEADC/SSIDEADC "<<i<<" histo"<<std::endl;
24
25
cl->
registerHisto
(
"NorthSideADC"
, TPCMON_STR);
26
27
cl->
registerHisto
(
"NorthSideADC_clusterXY_R1"
, TPCMON_STR);
28
cl->
registerHisto
(
"NorthSideADC_clusterXY_R2"
, TPCMON_STR);
29
cl->
registerHisto
(
"NorthSideADC_clusterXY_R3"
, TPCMON_STR);
30
31
cl->
registerHisto
(
"NorthSideADC_clusterXY_R1_unw"
, TPCMON_STR);
32
cl->
registerHisto
(
"NorthSideADC_clusterXY_R2_unw"
, TPCMON_STR);
33
cl->
registerHisto
(
"NorthSideADC_clusterXY_R3_unw"
, TPCMON_STR);
34
35
cl->
registerHisto
(
"SouthSideADC"
, TPCMON_STR);
36
37
cl->
registerHisto
(
"SouthSideADC_clusterXY_R1"
, TPCMON_STR);
38
cl->
registerHisto
(
"SouthSideADC_clusterXY_R2"
, TPCMON_STR);
39
cl->
registerHisto
(
"SouthSideADC_clusterXY_R3"
, TPCMON_STR);
40
41
cl->
registerHisto
(
"SouthSideADC_clusterXY_R1_unw"
, TPCMON_STR);
42
cl->
registerHisto
(
"SouthSideADC_clusterXY_R2_unw"
, TPCMON_STR);
43
cl->
registerHisto
(
"SouthSideADC_clusterXY_R3_unw"
, TPCMON_STR);
44
45
cl->
registerHisto
(
"sample_size_hist"
,TPCMON_STR);
46
cl->
registerHisto
(
"Check_Sum_Error"
,TPCMON_STR);
47
cl->
registerHisto
(
"Check_Sums"
,TPCMON_STR);
48
cl->
registerHisto
(
"ADC_vs_SAMPLE"
,TPCMON_STR);
49
cl->
registerHisto
(
"ADC_vs_SAMPLE_large"
,TPCMON_STR);
50
cl->
registerHisto
(
"MAXADC"
,TPCMON_STR);
51
52
cl->
registerHisto
(
"RAWADC_1D_R1"
,TPCMON_STR);
53
cl->
registerHisto
(
"MAXADC_1D_R1"
,TPCMON_STR);
54
cl->
registerHisto
(
"PEDEST_SUB_1D_R1"
,TPCMON_STR);
55
cl->
registerHisto
(
"RAWADC_1D_R2"
,TPCMON_STR);
56
cl->
registerHisto
(
"MAXADC_1D_R2"
,TPCMON_STR);
57
cl->
registerHisto
(
"PEDEST_SUB_1D_R2"
,TPCMON_STR);
58
cl->
registerHisto
(
"RAWADC_1D_R3"
,TPCMON_STR);
59
cl->
registerHisto
(
"MAXADC_1D_R3"
,TPCMON_STR);
60
cl->
registerHisto
(
"PEDEST_SUB_1D_R3"
,TPCMON_STR);
61
62
cl->
registerHisto
(
"NorthSideADC_clusterZY"
, TPCMON_STR);
63
cl->
registerHisto
(
"SouthSideADC_clusterZY"
, TPCMON_STR);
64
65
cl->
registerHisto
(
"NorthSideADC_clusterZY_unw"
,TPCMON_STR);
66
cl->
registerHisto
(
"SouthSideADC_clusterZY_unw"
,TPCMON_STR);
67
68
cl->
registerHisto
(
"Layer_ChannelPhi_ADC_weighted"
,TPCMON_STR);
69
}
//
70
71
72
73
cl->
AddServerHost
(
"localhost"
);
// check local host first
74
CreateHostList
(online);
75
// get my histos from server, the second parameter = 1
76
// says I know they are all on the same node
77
78
for
(
int
i
=0;
i
<24;
i
++ )
79
//for( int i: {1,20} )
80
{
81
sprintf(TPCMON_STR,
"TPCMON_%i"
,
i
);
82
cl->
requestHistoBySubSystem
(TPCMON_STR, 1);
83
}
84
85
OnlMonDraw
*tpcmon =
new
TpcMonDraw
(
"TPCMONDRAW"
);
// create Drawing Object
86
cl->
registerDrawer
(tpcmon);
// register with client framework
87
}
88
89
void
tpcDraw
(
const
char
*what =
"ALL"
)
90
{
91
OnlMonClient
*cl =
OnlMonClient::instance
();
// get pointer to framewrk
92
93
char
TPCMON_STR[100];
94
95
for
(
int
i
=0;
i
<24;
i
++ )
96
//for( int i: {1,20} )
97
{
98
sprintf(TPCMON_STR,
"TPCMON_%i"
,
i
);
99
cl->
requestHistoBySubSystem
(TPCMON_STR, 1);
100
}
101
102
103
cl->
Draw
(
"TPCMONDRAW"
, what);
// Draw Histos of registered Drawers
104
}
105
106
void
tpcSavePlot
()
107
{
108
OnlMonClient
*cl =
OnlMonClient::instance
();
// get pointer to framewrk
109
cl->
SavePlot
(
"TPCMONDRAW"
);
// Save Plots
110
return
;
111
}
112
113
void
tpcHtml
()
114
{
115
OnlMonClient
*cl =
OnlMonClient::instance
();
// get pointer to framewrk
116
cl->
MakeHtml
(
"TPCMONDRAW"
);
// Create html output
117
return
;
118
}
OnlMon
blob
main
macros
run_tpc_client.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:28
using
1.8.2 with
sPHENIX GitHub integration