BmnRoot 26.10.0-18-g4e3414f9
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)
 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 ()
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() [1/2]

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

Definition at line 3 of file BmnProfilometerSource.cxx.

References fAddrs, fArr, fArrTemp, fBoardIds, fFirstEvent, fPeriodId, fRunId, fVerbosity, iEventNumber, isReceiving, isSpillStart, and keepWorking.

Referenced by ReceiveSpill().

Here is the caller graph for this function:

◆ ~BmnProfilometerSource() [1/2]

BmnProfilometerSource::~BmnProfilometerSource ( )
virtual

Definition at line 18 of file BmnProfilometerSource.cxx.

References fBoardsMap.

◆ BmnProfilometerSource() [2/2]

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

◆ ~BmnProfilometerSource() [2/2]

virtual BmnProfilometerSource::~BmnProfilometerSource ( )
virtual

Member Function Documentation

◆ Close() [1/2]

void BmnProfilometerSource::Close ( )

Definition at line 63 of file BmnProfilometerSource.cxx.

References _ctx, and fRawSockets.

◆ Close() [2/2]

void BmnProfilometerSource::Close ( )

◆ FillEventHeader() [1/2]

void BmnProfilometerSource::FillEventHeader ( FairEventHeader * feh)

Definition at line 92 of file BmnProfilometerSource.cxx.

◆ FillEventHeader() [2/2]

void BmnProfilometerSource::FillEventHeader ( FairEventHeader * feh)

References DataHeader, and DataTrailer.

◆ Init() [1/2]

Bool_t BmnProfilometerSource::Init ( )

Definition at line 24 of file BmnProfilometerSource.cxx.

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

Here is the call graph for this function:

◆ Init() [2/2]

Bool_t BmnProfilometerSource::Init ( )

◆ ProcessBuffer() [1/2]

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:

◆ ProcessBuffer() [2/2]

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

◆ ReadEvent() [1/2]

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:

◆ ReadEvent() [2/2]

Int_t BmnProfilometerSource::ReadEvent ( UInt_t i = 0)

References i.

◆ ReceiveSpill() [1/2]

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:

◆ ReceiveSpill() [2/2]

BmnStatus BmnProfilometerSource::ReceiveSpill ( )
private

References BmnProfilometerSource(), _ctx, _rawSocket, fAddrs, fArr, fArrTemp, fBoardIds, fBoardsMap, fEventHead, fFirstEvent, fPeriodId, fRawSockets, fRunId, fVerbosity, iEventNumber, isReceiving, isSpillStart, and keepWorking.

Here is the call graph for this function:

Member Data Documentation

◆ _ctx

void * BmnProfilometerSource::_ctx
private

Definition at line 60 of file BmnProfilometerSource.h.

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

◆ _rawSocket

void * BmnProfilometerSource::_rawSocket
private

Definition at line 61 of file BmnProfilometerSource.h.

Referenced by ReceiveSpill().

◆ DataHeader

const string BmnProfilometerSource::DataHeader = "DAT"
private

Definition at line 55 of file BmnProfilometerSource.h.

Referenced by FillEventHeader(), and ReceiveSpill().

◆ DataTrailer

const string BmnProfilometerSource::DataTrailer = "SPILLEND"
private

Definition at line 56 of file BmnProfilometerSource.h.

Referenced by FillEventHeader(), and ReceiveSpill().

◆ fAddrs

vector< string > BmnProfilometerSource::fAddrs
private

Definition at line 79 of file BmnProfilometerSource.h.

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

◆ fArr

TClonesArray * BmnProfilometerSource::fArr
private

Definition at line 77 of file BmnProfilometerSource.h.

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

◆ fArrTemp

TClonesArray * BmnProfilometerSource::fArrTemp
private

◆ fBoardIds

vector< string > BmnProfilometerSource::fBoardIds
private

Definition at line 80 of file BmnProfilometerSource.h.

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

◆ 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(), ReadEvent(), and ReceiveSpill().

◆ fFirstEvent

Bool_t BmnProfilometerSource::fFirstEvent
private

Definition at line 64 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and ReceiveSpill().

◆ fPeriodId

Int_t BmnProfilometerSource::fPeriodId
private

Definition at line 70 of file BmnProfilometerSource.h.

Referenced by BmnProfilometerSource(), and ReceiveSpill().

◆ 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(), and ReceiveSpill().

◆ 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(), ReadEvent(), and ReceiveSpill().

◆ 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(), ReadEvent(), and ReceiveSpill().

◆ 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: