9#include <daq/expreco/modules/ReceiveEvent.h>
36 addParam(
"Port", m_port,
"Receiver Port", 7111);
41 B2INFO(
"Rx: Constructor done.");
45ReceiveEventModule::~ReceiveEventModule()
52 gSystem->Load(
"libdataobjects");
63 B2FATAL(
"Did not receive any data, stopping initialization.");
73 B2INFO(
"Rx initialized.");
79 B2INFO(
"beginRun called.");
92 printf(
"Connection is closed. Reconnecting.\n");
95 int rstat = (
m_recv->sock())->reconnect(nrepeat);
103 B2INFO(
"Rx: got an event from Socket, size=" << msg->
size());
105 if (msg->
type() == MSG_TERMINATE) {
106 B2INFO(
"Rx: got termination message. Exitting....");
114 B2INFO(
"Rx: DataStore Restored!!");
126 B2INFO(
"endRun done.");
132 B2INFO(
"terminate called");
Stream/restore DataStore objects to/from EvtMessage.
int restoreDataStore(EvtMessage *msg)
Restore DataStore objects from EvtMessage.
Class to manage streamed object.
ERecordType type() const
Get record type.
int size() const
Get size of message including headers.
void setDescription(const std::string &description)
Sets the description of the module.
DataStoreStreamer * m_streamer
DataStoreStreamer.
void initialize() override
Module functions to be called from main process.
void event() override
This method is the core of the module.
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
EvtSocketSend * m_recv
Reciever Socket.
std::string m_host
Receiver Port.
void beginRun() override
Module functions to be called from event process.
ReceiveEventModule()
Constructor / Destructor.
int m_nrecv
No. of sent events.
int m_compressionLevel
Compression Level.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.