Belle II Software development
RFOutputServer.h
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#ifndef RFOUTPUTSERVER_H
9#define RFOUTPUTSERVER_H
10
11#include <string>
12
13#include "daq/rfarm/manager/RFConf.h"
14#include "daq/rfarm/manager/RFSharedMem.h"
15#include "daq/rfarm/manager/RFProcessManager.h"
16#include "daq/rfarm/manager/RFLogManager.h"
17#include "daq/rfarm/manager/RFFlowStat.h"
18
19#include "daq/rfarm/manager/RFServerBase.h"
20
21#define MAXNODES 256
22
23namespace Belle2 {
28
29 class RFOutputServer : public RFServerBase {
30 public:
31 explicit RFOutputServer(const std::string& conffile);
32 ~RFOutputServer();
34 RFOutputServer(const RFOutputServer&) = delete;
35
37 RFOutputServer& operator=(const RFOutputServer&) = delete;
38
39 // Functions to be hooked to NSM
40 int Configure(NSMmsg*, NSMcontext*) override;
41 int UnConfigure(NSMmsg*, NSMcontext*) override;
42 int Start(NSMmsg*, NSMcontext*) override;
43 int Restart(NSMmsg*, NSMcontext*) override;
44
45 // Server function
46 void server();
47
48 // Cleanup
49 void cleanup();
50
51 private:
52 RFConf* m_conf;
53 RFSharedMem* m_shm;
54 RFProcessManager* m_proc;
55 RFLogManager* m_log;
56 RFFlowStat* m_flow;
57 RingBuffer* m_rbufin;
58 RingBuffer* m_rbufout;
59
60 int m_pid_receiver[MAXNODES];
61 int m_pid_basf2;
62 int m_pid_sender;
63 // int m_pid_hrecv;
64 // int m_pid_hrelay;
65 int m_nnodes;
66
67 };
68
70}
71#endif
72
73
74
75
RFOutputServer(const RFOutputServer &)=delete
Copy constructor (disabled).
RFOutputServer & operator=(const RFOutputServer &)=delete
Operator = (disabled).
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition RingBuffer.h:39
Abstract base class for different kinds of events.
Definition nsm2.h:224