Project
Loading...
Searching...
No Matches
o2::tpc::rawreader::RawReaderCRUEventSync Class Reference

#include <RawReaderCRU.h>

Classes

struct  CRUInfo
 summary information of on CRU More...
 
struct  EventInfo
 helper to store event information More...
 
struct  LinkInfo
 helper to store link information in an event More...
 

Public Types

using LinkInfoArray_t = std::vector< LinkInfo >
 
using CRUInfoArray_t = std::vector< CRUInfo >
 
using EventInfoVector = std::vector< EventInfo >
 

Public Member Functions

 RawReaderCRUEventSync ()
 default ctor
 
LinkInfogetLinkInfo (const RDH &rdh, DataType dataType)
 get link information for a specific event and cru
 
const LinkInfoArray_tgetLinkInfoArrayForEvent (size_t eventNumber, int cru) const
 get array with all link informaiton for a specific event number and cru
 
size_t getNumberOfEvents () const
 get number of all events
 
size_t getNumberOfCompleteEvents () const
 get number of complete events
 
size_t getNumberOfEvents (CRU) const
 
bool isEventComplete (size_t eventNumber) const
 check if eent is complete
 
void sortEvents ()
 sort events ascending in heartbeatOrbit number
 
EventInfocreateEvent (const uint32_t heartbeatOrbit, DataType dataType)
 create a new event or return the one with the given HB orbit
 
void analyse (RAWDataType rawDataType=RAWDataType::GBT)
 analyse events and mark complete events
 
const EventInfoVectorgetEventInfoVector () const
 all event information
 
const EventInfogetEventInfo (size_t eventNumber) const
 information of specific event
 
void streamTo (std::ostream &output) const
 write data to ostream
 
void setLinksSeen (const CRU cru, const std::bitset< MaxNumberOfLinks > &links)
 set links that were seen for a CRU
 
void setCRUSeen (const CRU cru, const uint16_t reader=0)
 set a cru as seen
 
const auto & getCRUSeen () const
 return CRU seen information
 
uint32_t getReaderNumber (uint32_t cru)
 get the reader associated to the CRU
 
void reset ()
 reset all information
 

Static Public Attributes

static constexpr size_t ExpectedNumberOfPacketsPerHBFrame {8}
 expected number of packets in one HB frame per link for HB scaling mode
 
static constexpr size_t ExpectedPayloadSize {64000}
 expected payload size in case of triggered mode (4000 GBT Frames of 16byte)
 

Friends

std::ostream & operator<< (std::ostream &output, const RawReaderCRUEventSync &eventSync)
 overloading output stream operator
 

Detailed Description

Definition at line 326 of file RawReaderCRU.h.

Member Typedef Documentation

◆ CRUInfoArray_t

Definition at line 407 of file RawReaderCRU.h.

◆ EventInfoVector

◆ LinkInfoArray_t

Constructor & Destructor Documentation

◆ RawReaderCRUEventSync()

o2::tpc::rawreader::RawReaderCRUEventSync::RawReaderCRUEventSync ( )
inline

default ctor

Definition at line 333 of file RawReaderCRU.h.

Member Function Documentation

◆ analyse()

void RawReaderCRUEventSync::analyse ( RAWDataType  rawDataType = RAWDataType::GBT)

analyse events and mark complete events

Definition at line 75 of file RawReaderCRU.cxx.

◆ createEvent()

RawReaderCRUEventSync::EventInfo & RawReaderCRUEventSync::createEvent ( const uint32_t  heartbeatOrbit,
DataType  dataType 
)

create a new event or return the one with the given HB orbit

Definition at line 50 of file RawReaderCRU.cxx.

◆ getCRUSeen()

const auto & o2::tpc::rawreader::RawReaderCRUEventSync::getCRUSeen ( ) const
inline

return CRU seen information

Definition at line 507 of file RawReaderCRU.h.

◆ getEventInfo()

const EventInfo & o2::tpc::rawreader::RawReaderCRUEventSync::getEventInfo ( size_t  eventNumber) const
inline

information of specific event

Definition at line 495 of file RawReaderCRU.h.

◆ getEventInfoVector()

const EventInfoVector & o2::tpc::rawreader::RawReaderCRUEventSync::getEventInfoVector ( ) const
inline

all event information

Definition at line 492 of file RawReaderCRU.h.

◆ getLinkInfo()

LinkInfo & o2::tpc::rawreader::RawReaderCRUEventSync::getLinkInfo ( const RDH rdh,
DataType  dataType 
)
inline

get link information for a specific event and cru

Definition at line 433 of file RawReaderCRU.h.

◆ getLinkInfoArrayForEvent()

const LinkInfoArray_t & o2::tpc::rawreader::RawReaderCRUEventSync::getLinkInfoArrayForEvent ( size_t  eventNumber,
int  cru 
) const
inline

get array with all link informaiton for a specific event number and cru

Definition at line 454 of file RawReaderCRU.h.

◆ getNumberOfCompleteEvents()

size_t o2::tpc::rawreader::RawReaderCRUEventSync::getNumberOfCompleteEvents ( ) const
inline

get number of complete events

Definition at line 460 of file RawReaderCRU.h.

◆ getNumberOfEvents() [1/2]

size_t o2::tpc::rawreader::RawReaderCRUEventSync::getNumberOfEvents ( ) const
inline

get number of all events

Definition at line 457 of file RawReaderCRU.h.

◆ getNumberOfEvents() [2/2]

size_t o2::tpc::rawreader::RawReaderCRUEventSync::getNumberOfEvents ( CRU  ) const
inline

get number of events for a certain CRU

Todo:
extract correct number

Definition at line 471 of file RawReaderCRU.h.

◆ getReaderNumber()

uint32_t o2::tpc::rawreader::RawReaderCRUEventSync::getReaderNumber ( uint32_t  cru)
inline

get the reader associated to the CRU

Definition at line 510 of file RawReaderCRU.h.

◆ isEventComplete()

bool o2::tpc::rawreader::RawReaderCRUEventSync::isEventComplete ( size_t  eventNumber) const
inline

check if eent is complete

Definition at line 474 of file RawReaderCRU.h.

◆ reset()

void o2::tpc::rawreader::RawReaderCRUEventSync::reset ( )
inline

reset all information

Definition at line 513 of file RawReaderCRU.h.

◆ setCRUSeen()

void o2::tpc::rawreader::RawReaderCRUEventSync::setCRUSeen ( const CRU  cru,
const uint16_t  reader = 0 
)
inline

set a cru as seen

Definition at line 504 of file RawReaderCRU.h.

◆ setLinksSeen()

void RawReaderCRUEventSync::setLinksSeen ( const CRU  cru,
const std::bitset< MaxNumberOfLinks > &  links 
)

set links that were seen for a CRU

Definition at line 115 of file RawReaderCRU.cxx.

◆ sortEvents()

void o2::tpc::rawreader::RawReaderCRUEventSync::sortEvents ( )
inline

sort events ascending in heartbeatOrbit number

Definition at line 483 of file RawReaderCRU.h.

◆ streamTo()

void RawReaderCRUEventSync::streamTo ( std::ostream &  output) const

write data to ostream

Definition at line 126 of file RawReaderCRU.cxx.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  output,
const RawReaderCRUEventSync eventSync 
)
friend

overloading output stream operator

Definition at line 520 of file RawReaderCRU.h.

Member Data Documentation

◆ ExpectedNumberOfPacketsPerHBFrame

constexpr size_t o2::tpc::rawreader::RawReaderCRUEventSync::ExpectedNumberOfPacketsPerHBFrame {8}
staticconstexpr

expected number of packets in one HB frame per link for HB scaling mode

Definition at line 329 of file RawReaderCRU.h.

◆ ExpectedPayloadSize

constexpr size_t o2::tpc::rawreader::RawReaderCRUEventSync::ExpectedPayloadSize {64000}
staticconstexpr

expected payload size in case of triggered mode (4000 GBT Frames of 16byte)

Definition at line 330 of file RawReaderCRU.h.


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