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_ohcal_client.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file run_ohcal_client.C
1
#include "
CommonFuncs.C
"
2
3
#include <onlmon/hcal/HcalMonDraw.h>
4
5
#include <onlmon/OnlMonClient.h>
6
7
// cppcheck-suppress unknownMacro
8
R__LOAD_LIBRARY(libonlhcalmon_client.so)
9
10
void
ohcalDrawInit
(const
int
online = 0)
11
{
12
OnlMonClient
*cl =
OnlMonClient::instance
();
13
// register histos we want with monitor name
14
char
HCALMON_STR[100];
15
for
(
int
i
= 0;
i
< 2;
i
++)
16
{
17
sprintf(HCALMON_STR,
"OHCALMON_%i"
,
i
);
18
cl->
registerHisto
(
"h2_hcal_hits"
, HCALMON_STR);
19
cl->
registerHisto
(
"h2_hcal_hits_trig"
, HCALMON_STR);
20
cl->
registerHisto
(
"h_hcal_trig"
, HCALMON_STR);
21
cl->
registerHisto
(
"h_caloPack_gl1_clock_diff"
, HCALMON_STR);
22
cl->
registerHisto
(
"h2_hcal_rm"
, HCALMON_STR);
23
cl->
registerHisto
(
"h2_hcal_mean"
, HCALMON_STR);
24
cl->
registerHisto
(
"h2_hcal_waveform"
, HCALMON_STR);
25
cl->
registerHisto
(
"h2_hcal_correlation"
, HCALMON_STR);
26
cl->
registerHisto
(
"h_event"
, HCALMON_STR);
27
cl->
registerHisto
(
"h_sectorAvg_total"
, HCALMON_STR);
28
cl->
registerHisto
(
"h_waveform_twrAvg"
, HCALMON_STR);
29
cl->
registerHisto
(
"h_waveform_time"
, HCALMON_STR);
30
cl->
registerHisto
(
"h_waveform_pedestal"
, HCALMON_STR);
31
cl->
registerHisto
(
"h_ntower"
, HCALMON_STR);
32
cl->
registerHisto
(
"h1_packet_chans"
, HCALMON_STR);
33
cl->
registerHisto
(
"h1_packet_length"
, HCALMON_STR);
34
cl->
registerHisto
(
"h1_packet_number"
, HCALMON_STR);
35
cl->
registerHisto
(
"h1_packet_event"
, HCALMON_STR);
36
37
for
(
int
ih = 0; ih < 32; ih++)
38
{
39
cl->
registerHisto
(Form(
"h_rm_sectorAvg_s%d"
, ih), HCALMON_STR);
40
}
41
for
(
int
ieta = 0; ieta < 24; ieta++)
42
{
43
for
(
int
iphi = 0; iphi < 64; iphi++)
44
{
45
cl->
registerHisto
(Form(
"h_rm_tower_%d_%d"
, ieta, iphi), HCALMON_STR);
46
}
47
}
48
}
49
cl->
AddServerHost
(
"localhost"
);
// check local host first
50
CreateHostList
(online);
51
// get my histos from server, the second parameter = 1
52
// says I know they are all on the same node
53
for
(
int
i
= 0;
i
< 2;
i
++)
54
{
55
sprintf(HCALMON_STR,
"OHCALMON_%i"
,
i
);
56
cl->
requestHistoBySubSystem
(HCALMON_STR, 1);
57
}
58
OnlMonDraw
*hcalmon =
new
HcalMonDraw
(
"OHCALMONDRAW"
);
// create Drawing Object
59
60
cl->
registerDrawer
(hcalmon);
// register with client framework
61
}
62
63
void
ohcalDraw
(
const
char
*what =
"ALL"
)
64
{
65
OnlMonClient
*cl =
OnlMonClient::instance
();
// get pointer to framewrk
66
char
HCALMON_STR[100];
67
for
(
int
i
= 0;
i
< 2;
i
++)
68
{
69
sprintf(HCALMON_STR,
"OHCALMON_%i"
,
i
);
70
cl->
requestHistoBySubSystem
(HCALMON_STR, 1);
71
}
72
cl->
Draw
(
"OHCALMONDRAW"
, what);
// Draw Histos of registered Drawers
73
}
74
75
void
ohcalSavePlot
()
76
{
77
OnlMonClient
*cl =
OnlMonClient::instance
();
// get pointer to framewrk
78
cl->
SavePlot
(
"OHCALMONDRAW"
);
// Save Plots
79
return
;
80
}
81
82
void
ohcalHtml
()
83
{
84
OnlMonClient
*cl =
OnlMonClient::instance
();
// get pointer to framewrk
85
cl->
MakeHtml
(
"OHCALMONDRAW"
);
// Create html output
86
return
;
87
}
OnlMon
blob
main
macros
run_ohcal_client.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:28
using
1.8.2 with
sPHENIX GitHub integration