Belle II Software  release-06-01-15
Ds2SampleModule.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 DS2SAMPLEMODULE_H
10 #define DS2SAMPLEMODULE_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 {
32  class Ds2SampleModule : public Module {
33 
34  // Public functions
35  public:
36 
39  virtual ~Ds2SampleModule();
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 
55 
57  std::string m_rbufname;
58  RingBuffer* m_rbuf;
59 
62 
64  int m_nsent;
65 
67  std::vector<std::string> m_saveObjs;
68 
69  };
70 
72 } // end namespace Belle2
73 
74 #endif // MODULEHELLO_H
Stream/restore DataStore objects to/from EvtMessage.
A class definition of an input module for Sequential ROOT I/O.
virtual void event()
This method is the core of the module.
DataStoreStreamer * m_streamer
DataStore streamer.
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.
Ds2SampleModule()
Constructor / Destructor.
int m_nsent
No. of sent events.
std::vector< std::string > m_saveObjs
List of objects to be saved.
int m_compressionLevel
Compression parameter.
std::string m_rbufname
RingBuffer ID.
Base class for Modules.
Definition: Module.h:72
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
Abstract base class for different kinds of events.