Belle II Software
release-06-01-15
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
z
Typedefs
a
b
c
d
e
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
rf_eventprocessor.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
//#define DESY
10
11
#include "daq/rfarm/manager/RFEventProcessor.h"
12
#include "daq/rfarm/manager/RFNSM.h"
13
14
#include <unistd.h>
15
16
#include <csignal>
17
#include <cstring>
18
19
using namespace
std;
20
using namespace
Belle2
;
21
22
static
RFEventProcessor
* evproc = NULL;
23
24
extern
"C"
void
sighandler(
int
sig)
25
{
26
printf(
"SIGTERM handler here\n"
);
27
evproc->cleanup();
28
}
29
30
int
main
(
int
argc,
char
** argv)
31
{
32
RFConf
conf(argv[1]);
33
34
// RFEventProcessor* evproc = new RFEventProcessor(argv[1]);
35
evproc =
new
RFEventProcessor
(argv[1]);
36
37
char
nodename[256];
38
strcpy(nodename,
"evp_"
);
39
#ifndef DESY
40
gethostname(&nodename[4],
sizeof
(nodename));
41
#else
42
// Special treatment for DESY test nodes!!
43
char
hostnamebuf[256];
44
gethostname(hostnamebuf,
sizeof
(hostnamebuf));
45
strcat(&nodename[4], &hostnamebuf[6]);
46
int
lend = strlen(nodename);
47
nodename[lend + 1] = (char)0;
48
nodename[lend] = nodename[lend - 1];
49
strncpy(&nodename[lend - 1],
"0"
, 1);
50
printf(
"DESY node name = %s\n"
, nodename);
51
// End of DESY special treatment
52
#endif
53
54
signal(SIGINT, sighandler);
55
signal(SIGTERM, sighandler);
56
57
RFNSM
nsm(nodename, evproc);
58
nsm.AllocMem(conf.getconf(
"system"
,
"nsmdata"
));
59
evproc->SetNodeInfo(nsm.GetNodeInfo());
60
61
evproc->server();
62
63
}
Belle2::RFConf
Definition:
RFConf.h:24
Belle2::RFEventProcessor
Definition:
RFEventProcessor.h:31
Belle2::RFNSM
Definition:
RFNSM.h:61
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:75
daq
rfarm
manager
tools
rf_eventprocessor.cc
Generated on Fri Dec 8 2023 04:16:22 for Belle II Software by
1.9.1