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

#include <BmnProfilometerSource.h>

Inheritance diagram for BmnProfilometerSource:
Collaboration diagram for BmnProfilometerSource:

Public Member Functions

 BmnProfilometerSource (vector< string > addr={"tcp://159.93.49.126:5601", "tcp://159.93.49.126:5602"}, vector< string > boardIds={"board1", "board2"})
virtual ~BmnProfilometerSource ()
Bool_t Init ()
Int_t ReadEvent (UInt_t i=0)
void Close ()
void FillEventHeader (FairEventHeader *feh)

Private Member Functions

BmnStatus ProcessBuffer (uint32_t *word, size_t len, ProfBoard *board)
BmnStatus ReceiveSpill ()

Private Attributes

const string DataHeader = "DAT"
const string DataTrailer = "SPILLEND"
void * _ctx
void * _rawSocket
vector< void * > fRawSockets
Bool_t fFirstEvent
bool keepWorking = kTRUE
bool isReceiving = kTRUE
Int_t fRunId
Int_t fPeriodId
Int_t fVerbosity
Int_t iEventNumber
bool isSpillStart
BmnEventHeader * fEventHead
TClonesArray * fArr
TClonesArray * fArrTemp
vector< string > fAddrs
vector< string > fBoardIds
map< string, ProfBoard * > fBoardsMap

Detailed Description

Definition at line 41 of file BmnProfilometerSource.h.

Constructor & Destructor Documentation

◆ BmnProfilometerSource()

BmnProfilometerSource::BmnProfilometerSource ( vector< string > addr = {"tcp://159.93.49.126:5601", "tcp://159.93.49.126:5602"},
vector< string > boardIds = {"board1", "board2"} )

◆ ~BmnProfilometerSource()

BmnProfilometerSource::~BmnProfilometerSource ( )
virtual

Definition at line 18 of file BmnProfilometerSource.cxx.

References fBoardsMap.

Member Function Documentation

◆ Close()

void BmnProfilometerSource::Close ( )

Definition at line 63 of file BmnProfilometerSource.cxx.

References _ctx, and fRawSockets.

◆ FillEventHeader()

void BmnProfilometerSource::FillEventHeader ( FairEventHeader * feh)

Definition at line 92 of file BmnProfilometerSource.cxx.

◆ Init()

Bool_t BmnProfilometerSource::Init ( )

Definition at line 24 of file BmnProfilometerSource.cxx.

References _ctx, ProfBoard::board_id, TObject::Class(), fAddrs, fArr, fArrTemp, fBoardIds, fBoardsMap, fEventHead, fRawSockets, and TPRegexp::Substitute().

Here is the call graph for this function:

◆ ProcessBuffer()

BmnStatus BmnProfilometerSource::ProcessBuffer ( uint32_t * word,
size_t len,
ProfBoard * board )
private

Definition at line 97 of file BmnProfilometerSource.cxx.

References ProfBoard::adc1_word, ProfBoard::adc2_word, BmnProfRawTools::adc_num(), ProfBoard::board_id, BmnProfRawTools::ChannelDigitCnt(), BmnProfRawTools::data_or_trig(), fArrTemp, BmnProfRawTools::holdb_cntr(), i, and kBMNSUCCESS.

Referenced by ReceiveSpill().

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

◆ ReadEvent()

Int_t BmnProfilometerSource::ReadEvent ( UInt_t i = 0)

Definition at line 71 of file BmnProfilometerSource.cxx.

References fArr, fArrTemp, fEventHead, fVerbosity, i, iEventNumber, isSpillStart, and ReceiveSpill().

Here is the call graph for this function:

◆ ReceiveSpill()

BmnStatus BmnProfilometerSource::ReceiveSpill ( )
private

Definition at line 147 of file BmnProfilometerSource.cxx.

References DataHeader, DataTrailer, fBoardsMap, fRawSockets, fVerbosity, isReceiving, kBMNERROR, kBMNSUCCESS, keepWorking, and ProcessBuffer().

Referenced by ReadEvent().

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

Member Data Documentation

◆ _ctx

void* BmnProfilometerSource::_ctx
private

Definition at line 60 of file BmnProfilometerSource.h.

Referenced by Close(), and Init().

◆ _rawSocket

void* BmnProfilometerSource::_rawSocket
private

Definition at line 61 of file BmnProfilometerSource.h.

◆ DataHeader

const string BmnProfilometerSource::DataHeader = "DAT"
private

Definition at line 55 of file BmnProfilometerSource.h.

Referenced by ReceiveSpill().

◆ DataTrailer

const string BmnProfilometerSource::DataTrailer = "SPILLEND"
private

Definition at line 56 of file BmnProfilometerSource.h.

Referenced by ReceiveSpill().

◆ fAddrs

vector<string> BmnProfilometerSource::fAddrs
private

Definition at line 79 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and Init().

◆ fArr

TClonesArray* BmnProfilometerSource::fArr
private

Definition at line 77 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), Init(), and ReadEvent().

◆ fArrTemp

TClonesArray* BmnProfilometerSource::fArrTemp
private

Definition at line 78 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), Init(), ProcessBuffer(), and ReadEvent().

◆ fBoardIds

vector<string> BmnProfilometerSource::fBoardIds
private

Definition at line 80 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and Init().

◆ fBoardsMap

map<string, ProfBoard*> BmnProfilometerSource::fBoardsMap
private

Definition at line 82 of file BmnProfilometerSource.h.

Referenced by ~BmnProfilometerSource(), Init(), and ReceiveSpill().

◆ fEventHead

BmnEventHeader* BmnProfilometerSource::fEventHead
private

Definition at line 76 of file BmnProfilometerSource.h.

Referenced by Init(), and ReadEvent().

◆ fFirstEvent

Bool_t BmnProfilometerSource::fFirstEvent
private

Definition at line 64 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource().

◆ fPeriodId

Int_t BmnProfilometerSource::fPeriodId
private

Definition at line 70 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource().

◆ fRawSockets

vector<void*> BmnProfilometerSource::fRawSockets
private

Definition at line 62 of file BmnProfilometerSource.h.

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

◆ fRunId

Int_t BmnProfilometerSource::fRunId
private

Definition at line 69 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource().

◆ fVerbosity

Int_t BmnProfilometerSource::fVerbosity
private

Definition at line 72 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), ReadEvent(), and ReceiveSpill().

◆ iEventNumber

Int_t BmnProfilometerSource::iEventNumber
private

Definition at line 74 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and ReadEvent().

◆ isReceiving

bool BmnProfilometerSource::isReceiving = kTRUE
private

Definition at line 67 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and ReceiveSpill().

◆ isSpillStart

bool BmnProfilometerSource::isSpillStart
private

Definition at line 75 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and ReadEvent().

◆ keepWorking

bool BmnProfilometerSource::keepWorking = kTRUE
private

Definition at line 66 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and ReceiveSpill().


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