9#include <daq/rawdata/modules/DeSerializerPXD.h>
27 setDescription(
"Receives PXD-Data from ONSEN (or a simulator) and stores it as RawPXD in Data Store");
37 B2DEBUG(0,
"DeSerializerPXDModule: Constructor done.");
41DeSerializerPXDModule::~DeSerializerPXDModule()
49 B2ERROR(
"DeSerializerPXDModule: Parameter error. Hosts and Ports need the same number of entries!");
55 for (
int i = 0; i < (int)(
m_hosts.size()); i++) {
60 m_eventMetaDataPtr.registerInDataStore();
63 rawpxdary.registerInDataStore();
65 B2DEBUG(0,
"DeSerializerPXDModule: initialized.");
70 B2DEBUG(0,
"beginRun called.");
80 stat = it->recv_pxd_buffer((
char*)
m_buffer);
82 B2INFO(
"DeserializerPXD Socket failed: stat = " << stat);
97 m_eventMetaDataPtr.create();
98 m_eventMetaDataPtr->setExperiment(1);
99 m_eventMetaDataPtr->setRun(1);
111 B2DEBUG(0,
"endRun done.");
117 B2INFO(
"terminate called");
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.
DeSerializerPXDModule()
Constructor / Destructor.
void beginRun() override
Module functions to be called from event process.
std::vector< int > m_ports
Receiver Port.
int m_compressionLevel
Compression Level.
std::vector< EvtSocketSend * > m_recvs
Receiver Sockets.
std::vector< std::string > m_hosts
Sender Names.
int m_nEvents
No. of rcvd events.
void setDescription(const std::string &description)
Sets the description of the module.
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.