Belle II Software  release-05-02-19
StorageSerializer.h
1 //+
2 // File : storageoutput.h
3 // Description : Sequential ROOT I/O output module for DAQ
4 //
5 // Author : Ryosuke Itoh, IPNS, KEK
6 // Date : 13 - Aug - 2010
7 // 9 - Dec - 2013 ; update for DAQ
8 //-
9 
10 #ifndef STORAGE_OUTPUT_H
11 #define STORAGE_OUTPUT_H
12 
13 #include <framework/core/Module.h>
14 #include <framework/pcore/MsgHandler.h>
15 #include <framework/pcore/DataStoreStreamer.h>
16 
17 #include <daq/storage/SharedEventBuffer.h>
18 
19 #include <string>
20 
21 namespace Belle2 {
29 
30  // Public functions
31  public:
32 
35  virtual ~StorageSerializerModule();
36 
38  virtual void initialize();
39 
41  virtual void beginRun();
42  virtual void event();
43  virtual void endRun();
44  virtual void terminate();
45 
46  // Data members
47  private:
50 
53 
56 
58  std::string m_obuf_name;
59  int m_obuf_size;
60  SharedEventBuffer m_obuf;
61 
63  unsigned int m_count;
64  unsigned int m_count_0;
65  int m_expno;
66  int m_runno;
67  unsigned long long m_nbyte;
68  double m_ctime;
69  int m_nodeid;
70 
71  private:
72  int writeStreamerInfos();
73 
74  };
76 } // end namespace Belle2
77 
78 #endif
Belle2::StorageSerializerModule::m_obuf_name
std::string m_obuf_name
Ring Buffer to dump sampled output stream.
Definition: StorageSerializer.h:58
Belle2::StorageSerializerModule::initialize
virtual void initialize()
Module functions to be called from main process.
Definition: StorageSerializer.cc:49
Belle2::SharedEventBuffer
Definition: SharedEventBuffer.h:14
Belle2::StorageSerializerModule::m_streamer
DataStoreStreamer * m_streamer
DataStoreStreamer.
Definition: StorageSerializer.h:52
Belle2::StorageSerializerModule::m_count
unsigned int m_count
Exp number, Run number.
Definition: StorageSerializer.h:63
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::StorageSerializerModule::terminate
virtual void terminate()
This method is called at the end of the event processing.
Definition: StorageSerializer.cc:155
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StorageSerializerModule::m_compressionLevel
int m_compressionLevel
Compression level.
Definition: StorageSerializer.h:49
Belle2::StorageSerializerModule::m_msghandler
MsgHandler * m_msghandler
Messaage handler.
Definition: StorageSerializer.h:55
Belle2::StorageSerializerModule::event
virtual void event()
This method is the core of the module.
Definition: StorageSerializer.cc:102
Belle2::StorageSerializerModule
Class definition for the output module of Sequential ROOT I/O.
Definition: StorageSerializer.h:28
Belle2::StorageSerializerModule::beginRun
virtual void beginRun()
Module functions to be called from event process.
Definition: StorageSerializer.cc:65
Belle2::StorageSerializerModule::endRun
virtual void endRun()
This method is called if the current run ends.
Definition: StorageSerializer.cc:149
Belle2::StorageSerializerModule::StorageSerializerModule
StorageSerializerModule()
Constructor / Destructor.
Definition: StorageSerializer.cc:33
Belle2::DataStoreStreamer
Stream/restore DataStore objects to/from EvtMessage.
Definition: DataStoreStreamer.h:33
Belle2::MsgHandler
A class to encode/decode an EvtMessage.
Definition: MsgHandler.h:104