Belle II Software  release-05-02-19
Ds2RbufModule.h
1 //+
2 // File : Ds2RbufModule.h
3 // Description : Stream DataStore contents and place in in RingBuffer
4 //
5 // Author : Ryosuke Itoh, IPNS, KEK
6 // Date : 26 - Apr - 2012
7 //-
8 
9 #ifndef DS2RBUFMODULE_H
10 #define DS2RBUFMODULE_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/pcore/RingBuffer.h>
14 
15 #include <framework/pcore/DataStoreStreamer.h>
16 
17 #include <string>
18 
19 #define RBUFSIZE 100000000
20 
21 namespace Belle2 {
29  class Ds2RbufModule : public Module {
30 
31  // Public functions
32  public:
33 
35  Ds2RbufModule();
36  virtual ~Ds2RbufModule();
37 
39  virtual void initialize();
40 
42  virtual void beginRun();
43  virtual void event();
44  virtual void endRun();
45  virtual void terminate();
46 
47  // Data members
48  private:
49 
52 
54  std::string m_rbufname;
55  RingBuffer* m_rbuf;
56 
59 
61  int m_nsent;
62 
64  std::vector<std::string> m_saveobjs;
65 
66  };
67 
69 } // end namespace Belle2
70 
71 #endif // MODULEHELLO_H
Belle2::Ds2RbufModule::m_streamer
DataStoreStreamer * m_streamer
DataStore streamer.
Definition: Ds2RbufModule.h:58
Belle2::Ds2RbufModule::m_compressionLevel
int m_compressionLevel
Compression parameter.
Definition: Ds2RbufModule.h:51
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::RingBuffer
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:36
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Ds2RbufModule::endRun
virtual void endRun()
This method is called if the current run ends.
Definition: Ds2RbufModule.cc:97
Belle2::Ds2RbufModule::beginRun
virtual void beginRun()
Module functions to be called from event process.
Definition: Ds2RbufModule.cc:64
Belle2::Ds2RbufModule::event
virtual void event()
This method is the core of the module.
Definition: Ds2RbufModule.cc:70
Belle2::Ds2RbufModule
A class definition of an input module for Sequential ROOT I/O.
Definition: Ds2RbufModule.h:29
Belle2::Ds2RbufModule::Ds2RbufModule
Ds2RbufModule()
Constructor / Destructor.
Definition: Ds2RbufModule.cc:27
Belle2::Ds2RbufModule::m_rbufname
std::string m_rbufname
RingBuffer ID.
Definition: Ds2RbufModule.h:54
Belle2::Ds2RbufModule::terminate
virtual void terminate()
This method is called at the end of the event processing.
Definition: Ds2RbufModule.cc:106
Belle2::Ds2RbufModule::m_nsent
int m_nsent
No. of sent events.
Definition: Ds2RbufModule.h:61
Belle2::Ds2RbufModule::m_saveobjs
std::vector< std::string > m_saveobjs
List of objects to be transferred.
Definition: Ds2RbufModule.h:64
Belle2::DataStoreStreamer
Stream/restore DataStore objects to/from EvtMessage.
Definition: DataStoreStreamer.h:33
Belle2::Ds2RbufModule::initialize
virtual void initialize()
Module functions to be called from main process.
Definition: Ds2RbufModule.cc:52