9 #include <daq/dataflow/modules/RxSocketModule.h>
32 setDescription(
"Encode DataStore into RingBuffer");
35 addParam(
"Port", m_port,
"Receiver Port", 1111);
37 m_compressionLevel = 0;
40 B2INFO(
"Rx: Constructor done.");
44 RxSocketModule::~RxSocketModule()
48 void RxSocketModule::initialize()
51 gSystem->Load(
"libdataobjects");
64 m_streamer->restoreDataStore(msg);
71 B2INFO(
"Rx initialized.");
75 void RxSocketModule::beginRun()
77 B2INFO(
"beginRun called.");
81 void RxSocketModule::event()
85 if (m_nrecv == 0)
return;
92 B2INFO(
"Rx: got an event from Socket, size=" << msg->
size());
94 if (msg->
type() == MSG_TERMINATE) {
95 B2INFO(
"Rx: got termination message. Exitting....");
102 m_streamer->restoreDataStore(msg);
103 B2INFO(
"Rx: DataStore Restored!!");
111 void RxSocketModule::endRun()
115 B2INFO(
"endRun done.");
119 void RxSocketModule::terminate()
121 B2INFO(
"terminate called");
Stream/restore DataStore objects to/from EvtMessage.
Class to manage streamed object.
ERecordType type() const
Get record type.
int size() const
Get size of message including headers.
A class definition of an input module for Sequential ROOT I/O.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.