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

#include <CbmDevBuildEvents.h>

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

Public Member Functions

 CbmDevBuildEvents ()
 
virtual ~CbmDevBuildEvents ()
 

Protected Member Functions

virtual void InitTask ()
 
bool HandleData (FairMQParts &, int)
 

Private Member Functions

bool IsChannelNameAllowed (std::string channelName)
 
bool SendEvents (const std::vector< CbmDigiEvent > &vEvents, const TimesliceMetaData *tsMetaData)
 
ECbmModuleId GetDetectorId (std::string detName)
 
void DumpTreeEntry ()
 
void Finish ()
 

Private Attributes

Bool_t fbFinishDone = false
 
std::string fsChannelNameDataInput = "trigger"
 Keep track of whether the Finish was already called.
 
std::string fsChannelNameDataOutput = "events"
 
std::vector< std::string > fsAllowedChannels = {fsChannelNameDataInput}
 List of MQ channels names.
 
uint64_t fulNumMessages = 0
 Statistics & first TS rejection.
 
std::unique_ptr< cbm::algo::evbuild::EventBuilderfEvbuildAlgo
 Processing algos.
 
std::string fsOutputFileName = ""
 Data storage.
 
FairRunOnline * fpRun = nullptr
 
FairRootManager * fpFairRootMgr = nullptr
 
std::vector< CbmDigiEvent > * fEventsSelOut = nullptr
 
TClonesArray * fTimeSliceMetaDataArrayOut = nullptr
 

Detailed Description

Definition at line 34 of file CbmDevBuildEvents.h.

Constructor & Destructor Documentation

◆ CbmDevBuildEvents()

CbmDevBuildEvents::CbmDevBuildEvents ( )

Definition at line 37 of file CbmDevBuildEvents.cxx.

◆ ~CbmDevBuildEvents()

CbmDevBuildEvents::~CbmDevBuildEvents ( )
virtual

Close things properly if not alredy done

Definition at line 303 of file CbmDevBuildEvents.cxx.

References fbFinishDone, fEventsSelOut, Finish(), fpRun, and fTimeSliceMetaDataArrayOut.

Member Function Documentation

◆ DumpTreeEntry()

void CbmDevBuildEvents::DumpTreeEntry ( )
private

FairRunOnline style

Definition at line 253 of file CbmDevBuildEvents.cxx.

References fpFairRootMgr.

Referenced by HandleData().

◆ Finish()

void CbmDevBuildEvents::Finish ( )
private

Definition at line 293 of file CbmDevBuildEvents.cxx.

References fbFinishDone, fpFairRootMgr, and fsOutputFileName.

Referenced by ~CbmDevBuildEvents().

◆ GetDetectorId()

ECbmModuleId CbmDevBuildEvents::GetDetectorId ( std::string detName)
private

FIXME: Disable clang formatting for now as it corrupts all alignment

FIXME: Re-enable clang formatting after formatted lines

Definition at line 139 of file CbmDevBuildEvents.cxx.

References kBmon, kFsd, kMuch, kNotExist, kPsd, kRich, kSts, kTof, kTrd, and kTrd2d.

Referenced by InitTask().

◆ HandleData()

bool CbmDevBuildEvents::HandleData ( FairMQParts & parts,
int  )
protected

Extract unpacked data from input message

TS

TS metadata

Triggers

First message received (do TS metadata stuff here)

Create events

Send output message

Write events to file

with FairMq messages ownership and memory managment

Definition at line 177 of file CbmDevBuildEvents.cxx.

References DumpTreeEntry(), CbmDigiData::fBmon, CbmDigiTimeslice::fData, CbmBmonDigiData::fDigis, CbmFsdDigiData::fDigis, CbmMuchDigiData::fDigis, CbmPsdDigiData::fDigis, CbmRichDigiData::fDigis, CbmStsDigiData::fDigis, CbmTofDigiData::fDigis, CbmTrdDigiData::fDigis, fEventsSelOut, CbmDigiData::fFsd, first, CbmDigiData::fMuch, CbmDigiData::fPsd, CbmDigiData::fRich, fsOutputFileName, CbmDigiData::fSts, fTimeSliceMetaDataArrayOut, CbmDigiData::fTof, CbmDigiData::fTrd, fulNumMessages, and SendEvents().

Referenced by InitTask().

◆ InitTask()

void CbmDevBuildEvents::InitTask ( )
protectedvirtual

Read options from executable

Prepare root output

Create storage objects

Extract event builder window to add if any

Detector Enum Tag

Window beginning

Window end

Definition at line 39 of file CbmDevBuildEvents.cxx.

References fEvbuildAlgo, fEventsSelOut, fpFairRootMgr, fpRun, fsAllowedChannels, fsChannelNameDataInput, fsChannelNameDataOutput, fsOutputFileName, fTimeSliceMetaDataArrayOut, GetDetectorId(), HandleData(), IsChannelNameAllowed(), and kNotExist.

◆ IsChannelNameAllowed()

bool CbmDevBuildEvents::IsChannelNameAllowed ( std::string channelName)
private

Definition at line 158 of file CbmDevBuildEvents.cxx.

References fsAllowedChannels, and pos.

Referenced by InitTask().

◆ SendEvents()

bool CbmDevBuildEvents::SendEvents ( const std::vector< CbmDigiEvent > & vEvents,
const TimesliceMetaData * tsMetaData )
private

Definition at line 263 of file CbmDevBuildEvents.cxx.

References fsChannelNameDataOutput.

Referenced by HandleData().

Member Data Documentation

◆ fbFinishDone

Bool_t CbmDevBuildEvents::fbFinishDone = false
private

Definition at line 44 of file CbmDevBuildEvents.h.

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

◆ fEvbuildAlgo

std::unique_ptr<cbm::algo::evbuild::EventBuilder> CbmDevBuildEvents::fEvbuildAlgo
private

Processing algos.

Definition at line 59 of file CbmDevBuildEvents.h.

Referenced by InitTask().

◆ fEventsSelOut

std::vector<CbmDigiEvent>* CbmDevBuildEvents::fEventsSelOut = nullptr
private

Definition at line 65 of file CbmDevBuildEvents.h.

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

◆ fpFairRootMgr

FairRootManager* CbmDevBuildEvents::fpFairRootMgr = nullptr
private

Definition at line 64 of file CbmDevBuildEvents.h.

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

◆ fpRun

FairRunOnline* CbmDevBuildEvents::fpRun = nullptr
private

Definition at line 63 of file CbmDevBuildEvents.h.

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

◆ fsAllowedChannels

std::vector<std::string> CbmDevBuildEvents::fsAllowedChannels = {fsChannelNameDataInput}
private

List of MQ channels names.

Definition at line 52 of file CbmDevBuildEvents.h.

Referenced by InitTask(), and IsChannelNameAllowed().

◆ fsChannelNameDataInput

std::string CbmDevBuildEvents::fsChannelNameDataInput = "trigger"
private

Keep track of whether the Finish was already called.

User settings parameters message queues

Definition at line 48 of file CbmDevBuildEvents.h.

Referenced by InitTask().

◆ fsChannelNameDataOutput

std::string CbmDevBuildEvents::fsChannelNameDataOutput = "events"
private

Definition at line 49 of file CbmDevBuildEvents.h.

Referenced by InitTask(), and SendEvents().

◆ fsOutputFileName

std::string CbmDevBuildEvents::fsOutputFileName = ""
private

Data storage.

Definition at line 62 of file CbmDevBuildEvents.h.

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

◆ fTimeSliceMetaDataArrayOut

TClonesArray* CbmDevBuildEvents::fTimeSliceMetaDataArrayOut = nullptr
private

Definition at line 66 of file CbmDevBuildEvents.h.

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

◆ fulNumMessages

uint64_t CbmDevBuildEvents::fulNumMessages = 0
private

Statistics & first TS rejection.

Definition at line 55 of file CbmDevBuildEvents.h.

Referenced by HandleData().


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