Belle II Software development
Rbuf2DsModule.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
9#ifndef RBUF2DSMODULE_H
10#define RBUF2DSMODULE_H
11
12#include <framework/core/Module.h>
13#include <framework/pcore/RingBuffer.h>
14
15#include <string>
16
17#include <framework/pcore/DataStoreStreamer.h>
18
19#define RBUFSIZE 100000000
20#define MAXEVTSIZE 400000000
21
22
23namespace Belle2 {
31 class Rbuf2DsModule : public Module {
32
33 // Public functions
34 public:
35
38 virtual ~Rbuf2DsModule();
39
41 void initialize() override;
42
44 void beginRun() override;
45 void event() override;
46 void endRun() override;
47 void terminate() override;
48
49 // Data members
50 private:
51
53 std::string m_rbufname;
54 RingBuffer* m_rbuf;
55
58
61
64
65 };
66
68} // end namespace Belle2
69
70#endif // MODULEHELLO_H
Stream/restore DataStore objects to/from EvtMessage.
Base class for Modules.
Definition: Module.h:72
A class definition of an input module for Sequential ROOT I/O.
Definition: Rbuf2DsModule.h:31
DataStoreStreamer * m_streamer
DataStore streamer.
Definition: Rbuf2DsModule.h:57
void initialize() override
Module functions to be called from main process.
void event() override
This method is the core of the module.
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
void beginRun() override
Module functions to be called from event process.
int m_nrecv
No. of sent events.
Definition: Rbuf2DsModule.h:63
int m_compressionLevel
Compression Level.
Definition: Rbuf2DsModule.h:60
std::string m_rbufname
RingBuffer ID.
Definition: Rbuf2DsModule.h:53
Rbuf2DsModule()
Constructor / Destructor.
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
Abstract base class for different kinds of events.