Belle II Software  release-06-01-15
Rbuf2RbufModule.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 RBUF2RBUFMODULE_H
10 #define RBUF2RBUFMODULE_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/pcore/RingBuffer.h>
14 
15 #include <string>
16 
17 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 
20 #define RBUFSIZE 100000000
21 #define MAXEVTSIZE 400000000
22 
23 
24 namespace Belle2 {
32  class Rbuf2RbufModule : public Module {
33 
34  // Public functions
35  public:
36 
39  virtual ~Rbuf2RbufModule();
40 
42  virtual void initialize();
43 
45  virtual void beginRun();
46  virtual void event();
47  virtual void endRun();
48  virtual void terminate();
49 
50  // Data members
51  private:
52 
54  std::string m_name_rbufin;
55  RingBuffer* m_rbufin;
56 
58  std::string m_name_rbufout;
59  RingBuffer* m_rbufout;
60 
62  int m_nrecv;
63 
65  };
66 
68 } // end namespace Belle2
69 
70 #endif // MODULEHELLO_H
Base class for Modules.
Definition: Module.h:72
A class definition of an input module for Sequential ROOT I/O.
virtual void event()
This method is the core of the module.
std::string m_name_rbufout
Output RingBuffer ID.
virtual void initialize()
Module functions to be called from main process.
virtual void beginRun()
Module functions to be called from event process.
Rbuf2RbufModule()
Constructor / Destructor.
StoreObjPtr< EventMetaData > m_eventMetaData
EventMetaData.
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.
std::string m_name_rbufin
Input RingBuffer ID.
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Abstract base class for different kinds of events.