9#include <daq/expreco/modules/Ds2SampleModule.h>
10#include <framework/datastore/DataStore.h>
32 string(
"OutputRbuf"));
35 vector<string> emptyvector;
43 B2INFO(
"Ds2Sample: Constructor done.");
47Ds2SampleModule::~Ds2SampleModule()
59 B2INFO(
"Ds2Sample initialized.");
65 B2INFO(
"Ds2Sample: beginRun called.");
77 B2INFO(
"Ds2Sample: objs sent in buffer. Size = " << msg->
size());
91 printf(
"Ds2Sample: endRun called.....\n");
92 B2INFO(
"Ds2Sample: endRun done.");
102 B2INFO(
"Ds2Sample: terminate called");
Stream/restore DataStore objects to/from EvtMessage.
EvtMessage * streamDataStore(bool addPersistentDurability, bool streamTransientObjects=false)
Store DataStore objects in EvtMessage.
void setStreamingObjects(const std::vector< std::string > &list)
Set names of objects to be streamed/destreamed.
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
DataStoreStreamer * m_streamer
DataStore streamer.
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.
Ds2SampleModule()
Constructor / Destructor.
void beginRun() override
Module functions to be called from event process.
int m_nsent
No. of sent events.
std::vector< std::string > m_saveObjs
List of objects to be saved.
int m_compressionLevel
Compression parameter.
std::string m_rbufname
RingBuffer ID.
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.
void setDescription(const std::string &description)
Sets the description of the module.
Class to manage a Ring Buffer placed in an IPC shared memory.
int insq(const int *buf, int size, bool checkTx=false)
Append a buffer to the RingBuffer.
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.