CbmRoot
Loading...
Searching...
No Matches
CbmDevEventSink Class Reference

#include <CbmDevEventSink.h>

Inheritance diagram for CbmDevEventSink:
[legend]
Collaboration diagram for CbmDevEventSink:
[legend]

Public Member Functions

 CbmDevEventSink ()
 Constructor.
 
virtual ~CbmDevEventSink ()
 Destructor.
 

Protected Member Functions

bool HandleCommand (FairMQMessagePtr &, int flag)
 Action on command messages.
 
bool HandleData (FairMQParts &parts, int flag)
 Action on data messages.
 
virtual void InitTask ()
 Initialization.
 

Private Member Functions

void Finish ()
 Finishing run.
 

Private Attributes

size_t fNumMessages = 0
 Number of received data messages.
 
size_t fNumTs = 0
 Number of processed timeslices.
 
uint64_t fPrevTsIndex = 0
 Index of last processed timeslice.
 
bool fFinishDone = false
 Keep track of whether the Finish method was already called.
 
TimesliceMetaDatafTsMetaData = nullptr
 Data output: TS meta data.
 
std::vector< CbmDigiEvent > * fEventVec = nullptr
 Data output: events.
 
FairRunOnline * fFairRun = nullptr
 FairRunOnline to instantiate FairRootManager.
 
FairRootManager * fFairRootMgr = nullptr
 FairRootManager used for ROOT file I/O.
 

Detailed Description

Definition at line 27 of file CbmDevEventSink.h.

Constructor & Destructor Documentation

◆ CbmDevEventSink()

CbmDevEventSink::CbmDevEventSink ( )
inline

Constructor.

Definition at line 30 of file CbmDevEventSink.h.

◆ ~CbmDevEventSink()

CbmDevEventSink::~CbmDevEventSink ( )
virtual

Destructor.

Definition at line 40 of file CbmDevEventSink.cxx.

References fEventVec, fFairRun, fFinishDone, Finish(), and fTsMetaData.

Member Function Documentation

◆ Finish()

void CbmDevEventSink::Finish ( )
private

Finishing run.

Definition at line 99 of file CbmDevEventSink.cxx.

References fFairRootMgr, fFinishDone, fNumMessages, fNumTs, and fPrevTsIndex.

Referenced by HandleCommand(), and ~CbmDevEventSink().

◆ HandleCommand()

bool CbmDevEventSink::HandleCommand ( FairMQMessagePtr & msg,
int flag )
protected

Action on command messages.

Parameters
partsMessage
flagNot used; ignored
Returns
Success

Definition at line 113 of file CbmDevEventSink.cxx.

References Finish().

Referenced by InitTask().

◆ HandleData()

bool CbmDevEventSink::HandleData ( FairMQParts & parts,
int flag )
protected

Action on data messages.

Parameters
partsMessage
flagNot used; ignored
Returns
Success

Definition at line 170 of file CbmDevEventSink.cxx.

References fEventVec, fFairRootMgr, fNumMessages, fTsMetaData, and TimesliceMetaData::GetIndex().

Referenced by InitTask().

◆ InitTask()

void CbmDevEventSink::InitTask ( )
protectedvirtual

Initialization.

Definition at line 58 of file CbmDevEventSink.cxx.

References fEventVec, fFairRootMgr, fFairRun, fTsMetaData, HandleCommand(), and HandleData().

Member Data Documentation

◆ fEventVec

std::vector<CbmDigiEvent>* CbmDevEventSink::fEventVec = nullptr
private

Data output: events.

Definition at line 67 of file CbmDevEventSink.h.

Referenced by HandleData(), InitTask(), and ~CbmDevEventSink().

◆ fFairRootMgr

FairRootManager* CbmDevEventSink::fFairRootMgr = nullptr
private

FairRootManager used for ROOT file I/O.

Definition at line 69 of file CbmDevEventSink.h.

Referenced by Finish(), HandleData(), and InitTask().

◆ fFairRun

FairRunOnline* CbmDevEventSink::fFairRun = nullptr
private

FairRunOnline to instantiate FairRootManager.

Definition at line 68 of file CbmDevEventSink.h.

Referenced by InitTask(), and ~CbmDevEventSink().

◆ fFinishDone

bool CbmDevEventSink::fFinishDone = false
private

Keep track of whether the Finish method was already called.

Definition at line 65 of file CbmDevEventSink.h.

Referenced by Finish(), and ~CbmDevEventSink().

◆ fNumMessages

size_t CbmDevEventSink::fNumMessages = 0
private

Number of received data messages.

Definition at line 62 of file CbmDevEventSink.h.

Referenced by Finish(), and HandleData().

◆ fNumTs

size_t CbmDevEventSink::fNumTs = 0
private

Number of processed timeslices.

Definition at line 63 of file CbmDevEventSink.h.

Referenced by Finish().

◆ fPrevTsIndex

uint64_t CbmDevEventSink::fPrevTsIndex = 0
private

Index of last processed timeslice.

Definition at line 64 of file CbmDevEventSink.h.

Referenced by Finish().

◆ fTsMetaData

TimesliceMetaData* CbmDevEventSink::fTsMetaData = nullptr
private

Data output: TS meta data.

Definition at line 66 of file CbmDevEventSink.h.

Referenced by HandleData(), InitTask(), and ~CbmDevEventSink().


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