Belle II Software  release-05-01-25
rf_dqmserver.cc
1 //+
2 // File : RFEventServer.cc
3 // Description : Receive data from event builder 1 and distribute them to
4 // Processing nodes
5 //
6 // Author : Ryosuke Itoh, IPNS, KEK
7 // Date : 24 - June - 2013
8 //-
9 #include "daq/rfarm/manager/RFDqmServer.h"
10 #include "daq/rfarm/manager/RFNSM.h"
11 
12 #include <csignal>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 static RFDqmServer* dqm = NULL;
18 
19 extern "C" void sighandler(int sig)
20 {
21  printf("SIGTERM handler here\n");
22  dqm->cleanup();
23 }
24 
25 int main(int argc, char** argv)
26 {
27  RFConf conf(argv[1]);
28 
29  // RFDqmServer* dqm = new RFDqmServer(argv[1]);
30  dqm = new RFDqmServer(argv[1]);
31 
32  signal(SIGINT, sighandler);
33  signal(SIGTERM, sighandler);
34 
35  RFNSM nsm(conf.getconf("dqmserver", "nodename"), dqm);
36  nsm.AllocMem(conf.getconf("system", "nsmdata"));
37  dqm->SetNodeInfo(nsm.GetNodeInfo());
38 
39  dqm->server();
40 
41 }
main
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:77
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RFNSM
Definition: RFNSM.h:61
Belle2::RFConf
Definition: RFConf.h:24
Belle2::RFDqmServer
Definition: RFDqmServer.h:27