 |
Belle II Software
release-05-02-19
|
9 #include <framework/pcore/RxModule.h>
10 #include <framework/pcore/EvtMessage.h>
11 #include <framework/pcore/DataStoreStreamer.h>
12 #include <framework/core/RandomNumbers.h>
30 B2DEBUG(32,
"Rx: Constructor with RingBuffer done.");
36 RxModule::~RxModule() =
default;
50 B2DEBUG(35,
"Rx: got an event from RingBuffer, size=" << size);
69 gSystem->Load(
"libdataobjects");
97 B2DEBUG(32,
"Rx: terminate called");
bool isDead() const
If True, the ring buffer is empty and has no attached Tx modules (i.e.
virtual void beginRun() override
Called when entering a new run.
RingBuffer * m_rbuf
attached RingBuffer.
const static unsigned int c_MaxEventSize
maximal EvtMessage size, in bytes (200MB).
void setDescription(const std::string &description)
Sets the description of the module.
virtual void event() override
This method is the core of the module.
virtual void initialize() override
Module functions to be called from main process.
bool m_handleMergeable
Whether to handle Mergeable objects.
Class to manage streamed object.
int m_nrecv
Current event number.
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
int restoreDataStore(EvtMessage *msg)
Restore DataStore objects from EvtMessage.
virtual void terminate() override
This method is called at the end of the event processing.
Class to manage a Ring Buffer placed in an IPC shared memory.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
int m_compressionLevel
Compression Level.
Abstract base class for different kinds of events.
DataStoreStreamer * m_streamer
Used for serialization.
void setType(const std::string &type)
Set the module type.
void initStreamer()
initialize m_streamer.
static RandomGenerator & getEventRandomGenerator()
return reference to the event dependent random generator
StoreObjPtr< RandomGenerator > m_randomgenerator
Random Generator object to receive from TxModule.
virtual void endRun() override
This method is called if the current run ends.
@ c_Input
This module is an input module (reads data).
int remq(int *buf)
Pick up a buffer from the RingBuffer.
int shmid() const
Return ID of the shared memory.
void setName(const std::string &name)
Set the name of the module.
Stream/restore DataStore objects to/from EvtMessage.
void readEvent()
Gets data from m_rbuf and puts it into the data store.