Belle II Software
release-08-01-10
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
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
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
Typedefs
Macros
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
if
(argc < 2)
return
1;
33
34
RFConf
conf(argv[1]);
35
36
// RFEventProcessor* evproc = new RFEventProcessor(argv[1]);
37
evproc =
new
RFEventProcessor
(argv[1]);
38
39
char
nodename[256 + 4];
40
strcpy(nodename,
"evp_"
);
41
#ifndef DESY
42
gethostname(&nodename[4],
sizeof
(nodename) - 4);
43
#else
44
// Special treatment for DESY test nodes!!
45
char
hostnamebuf[256];
46
gethostname(hostnamebuf,
sizeof
(hostnamebuf));
47
strcat(&nodename[4], &hostnamebuf[6]);
48
int
lend = strlen(nodename);
49
nodename[lend + 1] = (char)0;
50
nodename[lend] = nodename[lend - 1];
51
strncpy(&nodename[lend - 1],
"0"
, 1);
52
printf(
"DESY node name = %s\n"
, nodename);
53
// End of DESY special treatment
54
#endif
55
56
signal(SIGINT, sighandler);
57
signal(SIGTERM, sighandler);
58
59
RFNSM
nsm(nodename, evproc);
60
nsm.AllocMem(conf.getconf(
"system"
,
"nsmdata"
));
61
evproc->SetNodeInfo(nsm.GetNodeInfo());
62
63
evproc->server();
64
65
}
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:91
daq
rfarm
manager
tools
rf_eventprocessor.cc
Generated on Mon Sep 23 2024 14:01:18 for Belle II Software by
1.9.1