 |
Belle II Software
release-05-01-25
|
12 #include <framework/pcore/zmq/processModules/ProcessedEventBackup.h>
13 #include <framework/dataobjects/EventMetaData.h>
14 #include <framework/pcore/EvtMessage.h>
15 #include <framework/datastore/StoreObjPtr.h>
25 class ProcessedEventsBackupList {
28 using Duration = std::chrono::milliseconds;
32 void storeEvent(std::unique_ptr<EvtMessage> evtMsg,
const StoreObjPtr<EventMetaData>& evtMetaData,
const unsigned int workerId);
41 template <
class AZMQClient>
45 unsigned int size()
const;
52 template <
class AZMQClient>
56 if (it->getWorkerId() == worker) {
57 B2DEBUG(100,
"Delete event: " << it->getEventMetaData().getEvent());
58 it->sendToSocket(socket);
void removeEvent(const EventMetaData &evtMetaData)
Remove all backups with the given event meta data (on confirmation)
std::vector< ProcessedEventBackup > m_evtBackupVector
The vector where the event backups are stored.
int checkForTimeout(const Duration &timeout) const
Check the items for timeout. Returns -1 if no timeout happened and the worker id, if it did.
Abstract base class for different kinds of events.
void sendWorkerBackupEvents(unsigned int worker, const AZMQClient &socket)
Send all backups of a given worker directly to the multicast and delete them.
std::chrono::milliseconds Duration
Short for the class of a duration (always measured in milliseconds)
unsigned int size() const
Check the size.
void storeEvent(std::unique_ptr< EvtMessage > evtMsg, const StoreObjPtr< EventMetaData > &evtMetaData, const unsigned int workerId)
Add a new event backup with the given information. Takes ownership of the evt message.