Belle II Software light-2406-ragdoll
ProcessedEventBackup Class Reference

Storage item for the event backup storing the event message, the time stamp and the event meta data. More...

#include <ProcessedEventBackup.h>

Collaboration diagram for ProcessedEventBackup:

Public Member Functions

 ProcessedEventBackup (std::unique_ptr< EvtMessage > evtMsg, const EventMetaData &evtMetaData, unsigned int workerId)
 Constructor setting the informations. Takes ownership of the evtMsg.
 
bool operator== (const EventMetaData &rhs)
 Compare operator needed in the backup list.
 
template<class AZMQClient >
void sendToSocket (const AZMQClient &socket)
 Publish this event backup directly to the given client.
 
const EventMetaDatagetEventMetaData () const
 Getter for the stored event meta data.
 
const TimeStampgetTimestamp () const
 Getter for the stored time stamp.
 
const unsigned int & getWorkerId () const
 Getter for the stored worker id.
 

Private Types

using TimeStamp = std::chrono::time_point< std::chrono::system_clock >
 Short for the class of the time stamp (it is a system clock time stamp)
 

Private Attributes

std::unique_ptr< EvtMessagem_eventMessage
 Stored event message.
 
EventMetaData m_eventMetaData
 Getter for the stored event meta data.
 
unsigned int m_workerId
 Getter for the stored worker id.
 
TimeStamp m_timestamp = std::chrono::system_clock::now()
 Getter for the stored time stamp.
 

Detailed Description

Storage item for the event backup storing the event message, the time stamp and the event meta data.

Definition at line 22 of file ProcessedEventBackup.h.

Member Typedef Documentation

◆ TimeStamp

using TimeStamp = std::chrono::time_point<std::chrono::system_clock>
private

Short for the class of the time stamp (it is a system clock time stamp)

Definition at line 24 of file ProcessedEventBackup.h.

Constructor & Destructor Documentation

◆ ProcessedEventBackup()

ProcessedEventBackup ( std::unique_ptr< EvtMessage evtMsg,
const EventMetaData evtMetaData,
unsigned int  workerId 
)

Constructor setting the informations. Takes ownership of the evtMsg.

Definition at line 12 of file ProcessedEventBackup.cc.

15 : m_eventMessage(std::move(evtMsg)), m_eventMetaData(evtMetaData), m_workerId(workerId)
16{
17}
unsigned int m_workerId
Getter for the stored worker id.
EventMetaData m_eventMetaData
Getter for the stored event meta data.
std::unique_ptr< EvtMessage > m_eventMessage
Stored event message.

Member Function Documentation

◆ getEventMetaData()

const EventMetaData & getEventMetaData ( ) const

Getter for the stored event meta data.

Definition at line 19 of file ProcessedEventBackup.cc.

20{
21 return m_eventMetaData;
22}

◆ getTimestamp()

const ProcessedEventBackup::TimeStamp & getTimestamp ( ) const

Getter for the stored time stamp.

Definition at line 24 of file ProcessedEventBackup.cc.

25{
26 return m_timestamp;
27}
TimeStamp m_timestamp
Getter for the stored time stamp.

◆ getWorkerId()

const unsigned int & getWorkerId ( ) const

Getter for the stored worker id.

Definition at line 29 of file ProcessedEventBackup.cc.

30{
31 return m_workerId;
32}

◆ operator==()

bool operator== ( const EventMetaData rhs)

Compare operator needed in the backup list.

Definition at line 34 of file ProcessedEventBackup.cc.

35{
36 return m_eventMetaData == rhs;
37}

Member Data Documentation

◆ m_eventMessage

std::unique_ptr<EvtMessage> m_eventMessage
private

Stored event message.

Definition at line 46 of file ProcessedEventBackup.h.

◆ m_eventMetaData

EventMetaData m_eventMetaData
private

Getter for the stored event meta data.

Definition at line 48 of file ProcessedEventBackup.h.

◆ m_timestamp

TimeStamp m_timestamp = std::chrono::system_clock::now()
private

Getter for the stored time stamp.

Definition at line 52 of file ProcessedEventBackup.h.

◆ m_workerId

unsigned int m_workerId
private

Getter for the stored worker id.

Definition at line 50 of file ProcessedEventBackup.h.


The documentation for this class was generated from the following files: