BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnOnlineSource Class Reference

#include <BmnOnlineSource.h>

Inheritance diagram for BmnOnlineSource:
Collaboration diagram for BmnOnlineSource:

Public Member Functions

 BmnOnlineSource (TString endpoint="tcp://localhost:5555")
virtual ~BmnOnlineSource ()
virtual Bool_t Init ()
virtual Int_t ReadEvent (UInt_t=0)
virtual void Close ()
 BmnOnlineSource (const BmnOnlineSource &)=delete
BmnOnlineSource & operator= (const BmnOnlineSource &)=delete

Static Public Member Functions

template<typename T>
static void DeserializeZmqMessage (zmq_msg_t *zmq_message, std::unique_ptr< T > &output)

Protected Member Functions

void RegisterBranches (std::unique_ptr< TTree > &tree)
void UploadDataToRegisteredBranches (std::unique_ptr< TTree > &tree)

Protected Attributes

TString fEndpoint
std::shared_ptr< void > fZmqContext
std::shared_ptr< void > fZmqSubSocket
std::unordered_map< std::string, std::unique_ptr< TClonesArray > > fRegisteredBranches

Private Attributes

Bool_t fAreBranchesRegistered

Detailed Description

Definition at line 21 of file BmnOnlineSource.h.

Constructor & Destructor Documentation

◆ BmnOnlineSource() [1/2]

BmnOnlineSource::BmnOnlineSource ( TString endpoint = "tcp://localhost:5555")

Definition at line 6 of file BmnOnlineSource.cxx.

References fAreBranchesRegistered, fEndpoint, fZmqContext, and fZmqSubSocket.

Referenced by BmnOnlineSource(), and operator=().

Here is the caller graph for this function:

◆ ~BmnOnlineSource()

BmnOnlineSource::~BmnOnlineSource ( )
virtual

Definition at line 13 of file BmnOnlineSource.cxx.

◆ BmnOnlineSource() [2/2]

BmnOnlineSource::BmnOnlineSource ( const BmnOnlineSource & )
delete

References BmnOnlineSource().

Here is the call graph for this function:

Member Function Documentation

◆ Close()

void BmnOnlineSource::Close ( )
virtual

Definition at line 67 of file BmnOnlineSource.cxx.

References fRegisteredBranches, fZmqContext, and fZmqSubSocket.

◆ DeserializeZmqMessage()

template<typename T>
void BmnOnlineSource::DeserializeZmqMessage ( zmq_msg_t * zmq_message,
std::unique_ptr< T > & output )
inlinestatic

Definition at line 35 of file BmnOnlineSource.h.

References TMessage::GetClass(), and TBufferFile::ReadObjectAny().

Referenced by ReadEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init()

Bool_t BmnOnlineSource::Init ( )
virtual

Definition at line 15 of file BmnOnlineSource.cxx.

References fEndpoint, fZmqContext, and fZmqSubSocket.

◆ operator=()

BmnOnlineSource & BmnOnlineSource::operator= ( const BmnOnlineSource & )
delete

References BmnOnlineSource().

Here is the call graph for this function:

◆ ReadEvent()

Int_t BmnOnlineSource::ReadEvent ( UInt_t = 0)
virtual

Definition at line 39 of file BmnOnlineSource.cxx.

References DeserializeZmqMessage(), fZmqSubSocket, RegisterBranches(), and UploadDataToRegisteredBranches().

Here is the call graph for this function:

◆ RegisterBranches()

void BmnOnlineSource::RegisterBranches ( std::unique_ptr< TTree > & tree)
protected

Definition at line 75 of file BmnOnlineSource.cxx.

References fAreBranchesRegistered, fRegisteredBranches, and TNamed::GetName().

Referenced by ReadEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UploadDataToRegisteredBranches()

void BmnOnlineSource::UploadDataToRegisteredBranches ( std::unique_ptr< TTree > & tree)
protected

Definition at line 102 of file BmnOnlineSource.cxx.

References fRegisteredBranches.

Referenced by ReadEvent().

Here is the caller graph for this function:

Member Data Documentation

◆ fAreBranchesRegistered

Bool_t BmnOnlineSource::fAreBranchesRegistered
private

Definition at line 54 of file BmnOnlineSource.h.

Referenced by BmnOnlineSource(), and RegisterBranches().

◆ fEndpoint

TString BmnOnlineSource::fEndpoint
protected

Definition at line 43 of file BmnOnlineSource.h.

Referenced by BmnOnlineSource(), and Init().

◆ fRegisteredBranches

std::unordered_map<std::string, std::unique_ptr<TClonesArray> > BmnOnlineSource::fRegisteredBranches
protected

Definition at line 48 of file BmnOnlineSource.h.

Referenced by Close(), RegisterBranches(), and UploadDataToRegisteredBranches().

◆ fZmqContext

std::shared_ptr<void> BmnOnlineSource::fZmqContext
protected

Definition at line 45 of file BmnOnlineSource.h.

Referenced by BmnOnlineSource(), Close(), and Init().

◆ fZmqSubSocket

std::shared_ptr<void> BmnOnlineSource::fZmqSubSocket
protected

Definition at line 46 of file BmnOnlineSource.h.

Referenced by BmnOnlineSource(), Close(), Init(), and ReadEvent().


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