MiniballSort
Loading...
Searching...
No Matches
MBS Class Reference

#include <MbsFormat.hh>

Public Member Functions

 MBS ()
 
 ~MBS ()
 
void OpenLmdFile (std::string _filename)
 
void OpenMedFile (std::string _filename)
 
int OpenEventServer (std::string _server, unsigned short _port)
 
void CloseFile ()
 
void CloseEventServer ()
 
void SetBufferSize (unsigned int size)
 
UInt_t GetNBuffers () const
 
UInt_t GetBufferCount ()
 
const UChar_t * GetBuffer (UInt_t i)
 
const UChar_t * GetNextBuffer ()
 
const UChar_t * GetBufferFromStream ()
 
const MBSEventGetNextLmdEvent ()
 
const MBSEventGetNextMedEvent ()
 
const MBSEventGetNextEventFromStream ()
 
int GetEventType ()
 
bool IsRunning ()
 
bool IsEof ()
 
void ConvertEventHeader ()
 
void ConvertSubEventHeader ()
 
void CheckSubEventType ()
 
void ConvertVmeHeader ()
 
std::vector< short > GetByteSwapShort (char *in, int count, int bo)
 
short GetByteSwapShort (char *in, int bo)
 
std::vector< int > GetByteSwapInt (char *in, int count, int bo)
 
int GetByteSwapInt (char *in, int bo)
 
std::string GetByteSwapString (char *in, int count, int bo)
 
void ShowFileHeader ()
 
void ResetHitCount ()
 

Private Attributes

std::string filename
 
std::string server
 
unsigned short port
 
FILE * fp
 
UInt_t socket_id
 
Int_t server_id
 
UInt_t current_buffer
 
UInt_t current_subevt
 
UInt_t pos
 
MBSEvent evt
 
s_filhefh
 
s_bufhebh
 
s_evheeh
 
s_vehevh
 
s_evhesh
 
s_veshevsh
 
UInt_t used
 
int evtsiz
 
long long start_ts = 0
 
long long buf_ts
 
bool running = false
 
bool eof = false
 
unsigned int trigger_id
 
MBSBufferElemcurrent_btype = nullptr
 
MBSBufferElemcurrent_etype = nullptr
 
MBSBufferElemcurrent_stype = nullptr
 
MBSBufferElemcurrent_trigger = nullptr
 
MBSBufferElemsevent_type_raw = nullptr
 
std::vector< MBSBufferElembuffer_types
 
std::vector< MBSBufferElemevent_types
 
std::vector< MBSBufferElemsevent_types
 
std::vector< MBSBufferElemtriggers
 
const UChar_t * ptr
 
size_t len
 
Int_t elen
 
Int_t slen
 
Int_t vlen
 
UInt_t etype
 
UInt_t stype
 
Int_t current
 
UInt_t bufsize
 
UChar_t byteorder
 
UChar_t control
 
UChar_t crateid
 
UShort_t procid
 

Detailed Description

Definition at line 344 of file MbsFormat.hh.

Constructor & Destructor Documentation

◆ MBS()

MBS::MBS ( )

Definition at line 4 of file MbsFormat.cc.

◆ ~MBS()

MBS::~MBS ( )
inline

Definition at line 405 of file MbsFormat.hh.

Member Function Documentation

◆ CheckSubEventType()

void MBS::CheckSubEventType ( )

Definition at line 553 of file MbsFormat.cc.

Referenced by GetNextMedEvent().

◆ CloseEventServer()

void MBS::CloseEventServer ( )

Definition at line 219 of file MbsFormat.cc.

Referenced by monitor_run().

◆ CloseFile()

void MBS::CloseFile ( )

◆ ConvertEventHeader()

void MBS::ConvertEventHeader ( )

Definition at line 543 of file MbsFormat.cc.

Referenced by GetNextMedEvent().

◆ ConvertSubEventHeader()

void MBS::ConvertSubEventHeader ( )

Definition at line 569 of file MbsFormat.cc.

Referenced by GetNextMedEvent().

◆ ConvertVmeHeader()

void MBS::ConvertVmeHeader ( )

Definition at line 581 of file MbsFormat.cc.

Referenced by GetNextMedEvent().

◆ GetBuffer()

const UChar_t * MBS::GetBuffer ( UInt_t i)

Definition at line 508 of file MbsFormat.cc.

Referenced by GetNextBuffer(), and OpenLmdFile().

◆ GetBufferCount()

UInt_t MBS::GetBufferCount ( )
inline

◆ GetBufferFromStream()

const UChar_t * MBS::GetBufferFromStream ( )

Definition at line 225 of file MbsFormat.cc.

◆ GetByteSwapInt() [1/2]

int MBS::GetByteSwapInt ( char * in,
int bo )
inline

Definition at line 460 of file MbsFormat.hh.

◆ GetByteSwapInt() [2/2]

std::vector< int > MBS::GetByteSwapInt ( char * in,
int count,
int bo )

◆ GetByteSwapShort() [1/2]

short MBS::GetByteSwapShort ( char * in,
int bo )
inline

Definition at line 455 of file MbsFormat.hh.

◆ GetByteSwapShort() [2/2]

std::vector< short > MBS::GetByteSwapShort ( char * in,
int count,
int bo )

◆ GetByteSwapString()

std::string MBS::GetByteSwapString ( char * in,
int count,
int bo )

Definition at line 696 of file MbsFormat.cc.

◆ GetEventType()

int MBS::GetEventType ( )
inline

Definition at line 443 of file MbsFormat.hh.

◆ GetNBuffers()

UInt_t MBS::GetNBuffers ( ) const
inline

Definition at line 417 of file MbsFormat.hh.

Referenced by GetNextMedEvent().

◆ GetNextBuffer()

const UChar_t * MBS::GetNextBuffer ( )
inline

Definition at line 428 of file MbsFormat.hh.

Referenced by GetNextLmdEvent().

◆ GetNextEventFromStream()

const MBSEvent * MBS::GetNextEventFromStream ( )

Definition at line 495 of file MbsFormat.cc.

Referenced by monitor_run().

◆ GetNextLmdEvent()

const MBSEvent * MBS::GetNextLmdEvent ( )

Definition at line 235 of file MbsFormat.cc.

Referenced by MiniballMbsConverter::ConvertFile().

◆ GetNextMedEvent()

const MBSEvent * MBS::GetNextMedEvent ( )

Definition at line 300 of file MbsFormat.cc.

Referenced by MiniballMedConverter::ConvertFile().

◆ IsEof()

bool MBS::IsEof ( )
inline

Definition at line 447 of file MbsFormat.hh.

Referenced by MiniballMedConverter::ConvertFile().

◆ IsRunning()

bool MBS::IsRunning ( )
inline

Definition at line 446 of file MbsFormat.hh.

Referenced by MiniballMedConverter::ConvertFile().

◆ OpenEventServer()

int MBS::OpenEventServer ( std::string _server,
unsigned short _port )

Definition at line 181 of file MbsFormat.cc.

Referenced by monitor_run().

◆ OpenLmdFile()

void MBS::OpenLmdFile ( std::string _filename)

Definition at line 72 of file MbsFormat.cc.

Referenced by MiniballMbsConverter::ConvertFile().

◆ OpenMedFile()

void MBS::OpenMedFile ( std::string _filename)

Definition at line 113 of file MbsFormat.cc.

Referenced by MiniballMedConverter::ConvertFile().

◆ ResetHitCount()

void MBS::ResetHitCount ( )
inline

Definition at line 473 of file MbsFormat.hh.

Referenced by OpenMedFile().

◆ SetBufferSize()

void MBS::SetBufferSize ( unsigned int size)
inline

◆ ShowFileHeader()

void MBS::ShowFileHeader ( )
inline

Definition at line 466 of file MbsFormat.hh.

Member Data Documentation

◆ bh

s_bufhe* MBS::bh
private

Definition at line 359 of file MbsFormat.hh.

Referenced by GetBuffer().

◆ buf_ts

long long MBS::buf_ts
private

Definition at line 367 of file MbsFormat.hh.

Referenced by GetBuffer().

◆ buffer_types

std::vector<MBSBufferElem> MBS::buffer_types
private

Definition at line 380 of file MbsFormat.hh.

Referenced by GetBuffer(), MBS(), and ResetHitCount().

◆ bufsize

UInt_t MBS::bufsize
private

◆ byteorder

UChar_t MBS::byteorder
private

◆ control

UChar_t MBS::control
private

Definition at line 395 of file MbsFormat.hh.

Referenced by ConvertSubEventHeader(), and GetNextMedEvent().

◆ crateid

UChar_t MBS::crateid
private

Definition at line 396 of file MbsFormat.hh.

Referenced by ConvertSubEventHeader(), and GetNextMedEvent().

◆ current

Int_t MBS::current
private

Definition at line 392 of file MbsFormat.hh.

Referenced by MBS().

◆ current_btype

MBSBufferElem* MBS::current_btype = nullptr
private

Definition at line 373 of file MbsFormat.hh.

Referenced by GetBuffer().

◆ current_buffer

UInt_t MBS::current_buffer
private

◆ current_etype

MBSBufferElem* MBS::current_etype = nullptr
private

Definition at line 374 of file MbsFormat.hh.

Referenced by GetEventType(), and GetNextMedEvent().

◆ current_stype

MBSBufferElem* MBS::current_stype = nullptr
private

Definition at line 375 of file MbsFormat.hh.

Referenced by CheckSubEventType(), and GetNextMedEvent().

◆ current_subevt

UInt_t MBS::current_subevt
private

Definition at line 355 of file MbsFormat.hh.

Referenced by GetNextMedEvent().

◆ current_trigger

MBSBufferElem* MBS::current_trigger = nullptr
private

Definition at line 376 of file MbsFormat.hh.

Referenced by GetNextMedEvent().

◆ eh

s_evhe* MBS::eh
private

Definition at line 360 of file MbsFormat.hh.

Referenced by ConvertEventHeader(), and GetNextMedEvent().

◆ elen

Int_t MBS::elen
private

Definition at line 387 of file MbsFormat.hh.

Referenced by ConvertEventHeader(), GetNextLmdEvent(), and GetNextMedEvent().

◆ eof

bool MBS::eof = false
private

Definition at line 369 of file MbsFormat.hh.

Referenced by GetNextMedEvent(), and IsEof().

◆ etype

UInt_t MBS::etype
private

Definition at line 390 of file MbsFormat.hh.

Referenced by ConvertEventHeader(), and GetNextMedEvent().

◆ event_types

std::vector<MBSBufferElem> MBS::event_types
private

Definition at line 381 of file MbsFormat.hh.

Referenced by GetNextMedEvent(), MBS(), and ResetHitCount().

◆ evt

MBSEvent MBS::evt
private

◆ evtsiz

int MBS::evtsiz
private

Definition at line 365 of file MbsFormat.hh.

Referenced by GetNextLmdEvent(), and GetNextMedEvent().

◆ fh

s_filhe* MBS::fh
private

Definition at line 358 of file MbsFormat.hh.

Referenced by OpenLmdFile(), and ShowFileHeader().

◆ filename

std::string MBS::filename
private

Definition at line 348 of file MbsFormat.hh.

Referenced by OpenLmdFile(), and OpenMedFile().

◆ fp

FILE* MBS::fp
private

Definition at line 351 of file MbsFormat.hh.

Referenced by CloseFile(), MBS(), OpenLmdFile(), OpenMedFile(), and ShowFileHeader().

◆ len

size_t MBS::len
private

◆ port

unsigned short MBS::port
private

Definition at line 350 of file MbsFormat.hh.

Referenced by OpenEventServer().

◆ pos

UInt_t MBS::pos
private

Definition at line 356 of file MbsFormat.hh.

Referenced by GetBuffer(), GetNextLmdEvent(), GetNextMedEvent(), and OpenMedFile().

◆ procid

UShort_t MBS::procid
private

Definition at line 397 of file MbsFormat.hh.

Referenced by ConvertSubEventHeader(), and GetNextMedEvent().

◆ ptr

const UChar_t* MBS::ptr
private

◆ running

bool MBS::running = false
private

Definition at line 368 of file MbsFormat.hh.

Referenced by GetNextMedEvent(), and IsRunning().

◆ server

std::string MBS::server
private

Definition at line 349 of file MbsFormat.hh.

Referenced by OpenEventServer().

◆ server_id

Int_t MBS::server_id
private

Definition at line 353 of file MbsFormat.hh.

Referenced by CloseEventServer(), and OpenEventServer().

◆ sevent_type_raw

MBSBufferElem* MBS::sevent_type_raw = nullptr
private

Definition at line 377 of file MbsFormat.hh.

Referenced by OpenMedFile().

◆ sevent_types

std::vector<MBSBufferElem> MBS::sevent_types
private

Definition at line 382 of file MbsFormat.hh.

Referenced by CheckSubEventType(), MBS(), OpenMedFile(), and ResetHitCount().

◆ sh

s_evhe* MBS::sh
private

Definition at line 362 of file MbsFormat.hh.

Referenced by CheckSubEventType(), and GetNextMedEvent().

◆ slen

Int_t MBS::slen
private

Definition at line 388 of file MbsFormat.hh.

Referenced by ConvertSubEventHeader(), GetNextLmdEvent(), and GetNextMedEvent().

◆ socket_id

UInt_t MBS::socket_id
private

Definition at line 352 of file MbsFormat.hh.

Referenced by GetBufferFromStream(), and OpenEventServer().

◆ start_ts

long long MBS::start_ts = 0
private

Definition at line 366 of file MbsFormat.hh.

Referenced by GetBuffer().

◆ stype

UInt_t MBS::stype
private

Definition at line 391 of file MbsFormat.hh.

Referenced by CheckSubEventType(), and GetNextMedEvent().

◆ trigger_id

unsigned int MBS::trigger_id
private

Definition at line 370 of file MbsFormat.hh.

Referenced by ConvertVmeHeader(), and GetNextMedEvent().

◆ triggers

std::vector<MBSBufferElem> MBS::triggers
private

Definition at line 383 of file MbsFormat.hh.

Referenced by GetNextMedEvent(), MBS(), and ResetHitCount().

◆ used

UInt_t MBS::used
private

Definition at line 364 of file MbsFormat.hh.

Referenced by GetBuffer(), GetNextLmdEvent(), and GetNextMedEvent().

◆ vh

s_vehe* MBS::vh
private

Definition at line 361 of file MbsFormat.hh.

Referenced by ConvertVmeHeader(), GetNextLmdEvent(), and GetNextMedEvent().

◆ vlen

Int_t MBS::vlen
private

Definition at line 389 of file MbsFormat.hh.

Referenced by ConvertVmeHeader().

◆ vsh

s_veshe* MBS::vsh
private

Definition at line 363 of file MbsFormat.hh.

Referenced by ConvertSubEventHeader(), and GetNextMedEvent().


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