Belle II Software  release-06-02-00
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 
23 namespace Belle2 {
31  class Rbuf2DsModule : public Module {
32 
33  // Public functions
34  public:
35 
37  Rbuf2DsModule();
38  virtual ~Rbuf2DsModule();
39 
41  virtual void initialize();
42 
44  virtual void beginRun();
45  virtual void event();
46  virtual void endRun();
47  virtual void terminate();
48 
49  // Data members
50  private:
51 
53  std::string m_rbufname;
54  RingBuffer* m_rbuf;
55 
58 
61 
63  int m_nrecv;
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
virtual void event()
This method is the core of the module.
DataStoreStreamer * m_streamer
DataStore streamer.
Definition: Rbuf2DsModule.h:57
virtual void initialize()
Module functions to be called from main process.
virtual void beginRun()
Module functions to be called from event process.
virtual void terminate()
This method is called at the end of the event processing.
virtual void endRun()
This method is called if the current run ends.
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.