Belle II Software development
GetEventFromSocket.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 GET_EVENT_FROM_SOCKET_MODULE_H
10#define GET_EVENT_FROM_SOCKET_MODULE_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
19namespace Belle2 {
24
26
28
29 // Public functions
30 public:
31
34 virtual ~GetEventFromSocketModule() override;
35
37 virtual void initialize() override;
38
40 virtual void beginRun() override;
41 virtual void event() override;
42 virtual void endRun() override;
43 virtual void terminate() override;
44
45 private:
46 EvtMessage* receive();
47
48 // Data members
49 private:
50
52 std::vector<std::string> m_hosts;
53 std::vector<int> m_ports;
54
56 std::vector<EvtSocketSend*> m_socks;
57
60
63
66
67 };
68
70} // end namespace Belle2
71
72#endif // MODULEHELLO_H
Stream/restore DataStore objects to/from EvtMessage.
Class to manage streamed object.
Definition EvtMessage.h:59
DataStoreStreamer * m_streamer
DataStoreStreamer.
virtual void initialize() override
Module functions to be called from main process.
GetEventFromSocketModule()
Constructor / Destructor.
virtual void event() override
This method is the core of the module.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
std::vector< EvtSocketSend * > m_socks
Reciever Socket.
virtual void beginRun() override
Module functions to be called from event process.
int m_compressionLevel
Compression Level.
std::vector< std::string > m_hosts
Receiver Port.
Module()
Constructor.
Definition Module.cc:30
Abstract base class for different kinds of events.