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