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 {
29 class ERecoEventSampler : public RFServerBase {
30 public:
31 explicit ERecoEventSampler(const std::string& conffile);
32 ~ERecoEventSampler();
34 ERecoEventSampler(const ERecoEventSampler&) = delete;
35
37 ERecoEventSampler& operator=(const ERecoEventSampler&) = 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 Stop(NSMmsg*, NSMcontext*) override;
44
45 // Server function
46 void server();
47
48 private:
49 RFConf* m_conf;
50 std::string m_conffile;
51 RFProcessManager* m_proc;
52 RFLogManager* m_log;
53 RingBuffer* m_rbufout;
54
55 int m_pid_sampler;
56 int m_pid_server = 0;
57
58 };
59
61}
62#endif
ERecoEventSampler(const ERecoEventSampler &)=delete
Copy constructor (disabled).
ERecoEventSampler & operator=(const ERecoEventSampler &)=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