9#include <framework/pcore/zmq/utils/StreamHelper.h>
10#include <framework/core/Environment.h>
11#include <framework/core/RandomNumbers.h>
12#include <framework/logging/Logger.h>
20 gSystem->Load(
"libdataobjects");
21 m_streamer = std::make_unique<DataStoreStreamer>(compressionLevel, handleMergeable);
25 B2INFO(
"Tx: Streaming objects limited : " << (
Environment::Instance().getStreamingObjects()).size() <<
" objects");
38 return std::unique_ptr<EvtMessage>(
m_streamer->streamDataStore(addPersistentDurability, streamTransientObjects));
static Environment & Instance()
Static method to get a reference to the Environment instance.
Class to manage streamed object.
static RandomGenerator & getEventRandomGenerator()
return reference to the event dependent random generator
std::unique_ptr< DataStoreStreamer > m_streamer
The data store streamer to use.
void read(std::unique_ptr< ZMQNoIdMessage > message)
Read in a ZMQ message and rebuilt the data store from it.
std::unique_ptr< EvtMessage > stream(bool addPersistentDurability=true, bool streamTransientObjects=true)
Stream the data store into an event message.
void initialize(int compressionLevel, bool handleMergeable)
Initialize this class. Call this e.g. in the first event.
StoreObjPtr< RandomGenerator > m_randomGenerator
The random generator object in the data store that we need to transport also.
static constexpr const unsigned int c_data
Where the data is stored.
Abstract base class for different kinds of events.