Belle II Software  release-06-01-15
StorageSerializer.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 STORAGE_OUTPUT_H
10 #define STORAGE_OUTPUT_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/pcore/MsgHandler.h>
14 #include <framework/pcore/DataStoreStreamer.h>
15 
16 #include <daq/storage/SharedEventBuffer.h>
17 
18 #include <string>
19 
20 namespace Belle2 {
28 
29  // Public functions
30  public:
31 
34  virtual ~StorageSerializerModule();
35 
37  virtual void initialize();
38 
40  virtual void beginRun();
41  virtual void event();
42  virtual void endRun();
43  virtual void terminate();
44 
45  // Data members
46  private:
49 
52 
55 
57  std::string m_obuf_name;
58  int m_obuf_size;
59  SharedEventBuffer m_obuf;
60 
62  unsigned int m_count;
63  unsigned int m_count_0;
64  int m_expno;
65  int m_runno;
66  unsigned long long m_nbyte;
67  double m_ctime;
68  int m_nodeid;
69 
70  private:
71  int writeStreamerInfos();
72 
73  };
75 } // end namespace Belle2
76 
77 #endif
Stream/restore DataStore objects to/from EvtMessage.
Base class for Modules.
Definition: Module.h:72
A class to encode/decode an EvtMessage.
Definition: MsgHandler.h:103
Class definition for the output module of Sequential ROOT I/O.
virtual void event()
This method is the core of the module.
DataStoreStreamer * m_streamer
DataStoreStreamer.
virtual void initialize()
Module functions to be called from main process.
std::string m_obuf_name
Ring Buffer to dump sampled output stream.
virtual void beginRun()
Module functions to be called from event process.
unsigned int m_count
Exp number, Run number.
StorageSerializerModule()
Constructor / Destructor.
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.
MsgHandler * m_msghandler
Messaage handler.
int m_compressionLevel
Compression level.
Abstract base class for different kinds of events.