9 #include "daq/rawdata/modules/GenRawSend.h"
11 #include <framework/datastore/StoreObjPtr.h>
12 #include <framework/dataobjects/EventMetaData.h>
14 #define HEADER_SIZE 23
30 setDescription(
"GenRawSendModule module");
36 addParam(
"EventDataBufferWords", BUF_SIZE_WORD,
"DataBuffer words per event", 4800);
37 addParam(
"Size", m_size,
"Raw Data Size", 256);
38 addParam(
"MaxEvent", m_maxevt,
"Max Number of Event", 1000000);
39 addParam(
"DestHostName", m_dest,
"Destination host",
string(
"localhost"));
40 addParam(
"DestPort", m_port,
"Destination port", 1111);
47 GenRawSendModule::~GenRawSendModule()
55 void GenRawSendModule::initialize()
57 m_buffer =
new char[ BUF_SIZE_WORD ];
58 memset(m_buffer, 0, BUF_SIZE_WORD);
63 m_eventMetaDataPtr.registerInDataStore();
66 m_rawcopper.registerInDataStore();
73 void GenRawSendModule::beginRun()
78 void GenRawSendModule::event()
82 if (m_nevt > m_maxevt)
return;
85 m_eventMetaDataPtr.create();
86 m_eventMetaDataPtr->setExperiment(1);
87 m_eventMetaDataPtr->setRun(1);
88 m_eventMetaDataPtr->setEvent(m_nevt);
122 void GenRawSendModule::endRun()
128 void GenRawSendModule::terminate()
130 printf(
"GenRawSendModule : termination called\n");
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.