Belle II Software development
ERecoEventSampler.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 ERECO_EVENT_SAMPLER_H
9#define ERECO_EVENT_SAMPLER_H
10
11#include <string>
12
13#include <daq/rfarm/manager/RFConf.h>
14#include <daq/rfarm/manager/RFProcessManager.h>
15#include <daq/rfarm/manager/RFLogManager.h>
16#include <daq/rfarm/manager/RFServerBase.h>
17
18#include <framework/pcore/RingBuffer.h>
19
20#include <nsm2/nsm2.h>
21
22#define MAXEVTSIZE 80000000
23
24namespace Belle2 {
30 public:
31 ERecoEventSampler(std::string conffile);
33
34 // Functions to be hooked to NSM
35 int Configure(NSMmsg*, NSMcontext*) override;
36 int UnConfigure(NSMmsg*, NSMcontext*) override;
37 int Start(NSMmsg*, NSMcontext*) override;
38 int Stop(NSMmsg*, NSMcontext*) override;
39 int Restart(NSMmsg*, NSMcontext*) override;
40
41 // Server function
42 void server();
43
44 private:
45 RFConf* m_conf;
46 std::string m_conffile;
47 RFProcessManager* m_proc;
48 RFLogManager* m_log;
49 RingBuffer* m_rbufout;
50
51 int m_pid_sampler;
52 int m_pid_server;
53
54 };
55
57}
58#endif
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