Belle II Software development
rf_dqmserver.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#include "daq/rfarm/manager/RFDqmServer.h"
9#include "daq/rfarm/manager/RFNSM.h"
10
11#include <csignal>
12
13using namespace std;
14using namespace Belle2;
15
16static RFDqmServer* dqm = NULL;
17
18extern "C" void sighandler(int /*sig*/)
19{
20 printf("SIGTERM handler here\n");
21 dqm->cleanup();
22}
23
24int main(int argc, char** argv)
25{
26 if (argc < 2) return 1;
27
28 RFConf conf(argv[1]);
29
30 // RFDqmServer* dqm = new RFDqmServer(argv[1]);
31 dqm = new RFDqmServer(argv[1]);
32
33 signal(SIGINT, sighandler);
34 signal(SIGTERM, sighandler);
35
36 RFNSM nsm(conf.getconf("dqmserver", "nodename"), dqm);
37 nsm.AllocMem(conf.getconf("system", "nsmdata"));
38 dqm->SetNodeInfo(nsm.GetNodeInfo());
39
40 dqm->server();
41
42}
Abstract base class for different kinds of events.
STL namespace.