9 #include <daq/expreco/modules/Ds2SampleModule.h>
10 #include <framework/datastore/DataStore.h>
29 setDescription(
"Encode DataStore into RingBuffer");
31 addParam(
"RingBufferName", m_rbufname,
"Name of RingBuffer",
32 string(
"OutputRbuf"));
33 addParam(
"CompressionLevel", m_compressionLevel,
"Compression level",
35 vector<string> emptyvector;
36 addParam(
"saveObjs", m_saveObjs,
"List of objects/arrays to be saved", emptyvector);
40 m_compressionLevel = 0;
43 B2INFO(
"Ds2Sample: Constructor done.");
47 Ds2SampleModule::~Ds2SampleModule()
51 void Ds2SampleModule::initialize()
57 m_streamer->setStreamingObjects(m_saveObjs);
59 B2INFO(
"Ds2Sample initialized.");
63 void Ds2SampleModule::beginRun()
65 B2INFO(
"Ds2Sample: beginRun called.");
69 void Ds2SampleModule::event()
72 EvtMessage* msg = m_streamer->streamDataStore(DataStore::c_Event);
77 B2INFO(
"Ds2Sample: objs sent in buffer. Size = " << msg->
size());
87 void Ds2SampleModule::endRun()
91 printf(
"Ds2Sample: endRun called.....\n");
92 B2INFO(
"Ds2Sample: endRun done.");
96 void Ds2SampleModule::terminate()
102 B2INFO(
"Ds2Sample: terminate called");
Stream/restore DataStore objects to/from EvtMessage.
A class definition of an input module for Sequential ROOT I/O.
Class to manage streamed object.
int paddedSize() const
Same as size(), but as size of an integer array.
char * buffer()
Get buffer address.
int size() const
Get size of message including headers.
Class to manage a Ring Buffer placed in an IPC shared memory.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.