9#include <daq/rfarm/event/modules/Ds2RbufModule.h>
11#include <framework/datastore/DataStore.h>
32 vector<string> emptyvector;
34 string(
"OutputRbuf"));
44 B2INFO(
"Ds2Rbuf: Constructor done.");
48Ds2RbufModule::~Ds2RbufModule()
60 B2INFO(
"Ds2Rbuf initialized.");
66 B2INFO(
"Ds2Rbuf: beginRun called.");
76 B2INFO(
"Ds2Rbuf: msgsize = " << msg->
size());
87 B2INFO(
"Ds2Rbuf: objs sent in buffer. Size = " << msg->
size());
101 printf(
"Ds2Rbuf: endRun called.....\n");
102 B2INFO(
"Ds2Rbuf: endRun done.");
112 B2INFO(
"Ds2Rbuf: 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.
Ds2RbufModule()
Constructor / Destructor.
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.
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 transferred.
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.