Belle II Software  release-05-01-25
TxSocketModule.h
1 //+
2 // File : txsocket.h
3 // Description : Module to send DataStore via EvtSocket
4 //
5 // Author : Ryosuke Itoh, IPNS, KEK
6 // Date : 13 - Aug - 2010
7 //-
8 
9 #ifndef TXMODULE_H
10 #define TXMODULE_H
11 
12 #include <framework/core/Module.h>
13 #include <daq/dataflow/EvtSocket.h>
14 
15 #include <string>
16 
17 #include <framework/pcore/DataStoreStreamer.h>
18 
19 namespace Belle2 {
30  class TxSocketModule : public Module {
31 
32  // Public functions
33  public:
34 
37  virtual ~TxSocketModule();
38 
40  virtual void initialize();
41 
43  virtual void beginRun();
44  virtual void event();
45  virtual void endRun();
46  virtual void terminate();
47 
48  // Data members
49  private:
50 
53 
54  // Parameters for EvtSocket
55 
57  std::string m_dest;
58 
60  int m_port;
61 
64 
67 
69  int m_nsent;
70 
71  };
72 
74 } // end namespace Belle2
75 
76 #endif // MODULEHELLO_H
Belle2::EvtSocketSend
Definition: EvtSocket.h:26
Belle2::TxSocketModule::beginRun
virtual void beginRun()
Module functions to be called from event process.
Definition: TxSocketModule.cc:59
Belle2::TxSocketModule
A class definition of an input module for Sequential ROOT I/O.
Definition: TxSocketModule.h:30
Belle2::TxSocketModule::terminate
virtual void terminate()
This method is called at the end of the event processing.
Definition: TxSocketModule.cc:87
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::TxSocketModule::m_compressionLevel
int m_compressionLevel
Compression parameter.
Definition: TxSocketModule.h:52
Belle2::TxSocketModule::endRun
virtual void endRun()
This method is called if the current run ends.
Definition: TxSocketModule.cc:79
Belle2::TxSocketModule::m_sock
EvtSocketSend * m_sock
EvtSocket.
Definition: TxSocketModule.h:63
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TxSocketModule::initialize
virtual void initialize()
Module functions to be called from main process.
Definition: TxSocketModule.cc:48
Belle2::TxSocketModule::m_nsent
int m_nsent
No. of sent events.
Definition: TxSocketModule.h:69
Belle2::TxSocketModule::m_port
int m_port
Destination port.
Definition: TxSocketModule.h:60
Belle2::TxSocketModule::m_dest
std::string m_dest
Destination Host.
Definition: TxSocketModule.h:57
Belle2::TxSocketModule::m_streamer
DataStoreStreamer * m_streamer
DataStoreStreamer.
Definition: TxSocketModule.h:66
Belle2::TxSocketModule::TxSocketModule
TxSocketModule()
Constructor / Destructor.
Definition: TxSocketModule.cc:26
Belle2::TxSocketModule::event
virtual void event()
This method is the core of the module.
Definition: TxSocketModule.cc:65
Belle2::DataStoreStreamer
Stream/restore DataStore objects to/from EvtMessage.
Definition: DataStoreStreamer.h:33