Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mvtx::GBTLink Struct Reference

support for the GBT single link data More...

#include <online_distribution/blob/master/newbasic/mvtx_decoder/GBTLink.h>

+ Collaboration diagram for mvtx::GBTLink:

Public Types

enum  CollectedDataStatus : int8_t { None, AbortedOnError, StoppedOnEndOfData, DataSeen }
 

Public Member Functions

 GBTLink ()=default
 
 GBTLink (uint16_t _flx, uint16_t _fee)
 
void clear (bool resetStat=true, bool resetTFRaw=false)
 
CollectedDataStatus collectROFCableData ()
 
void cacheData (size_t start, size_t sz)
 
void clearCableData ()
 
int readFlxWord (GBTWord *gbtwords, uint16_t &w16)
 
int decode_lane (const uint8_t chipId, PayLoadCont &buffer)
 
void getRowCol (const uint8_t reg, const uint16_t addr, uint16_t &row, uint16_t &col)
 
void addHit (const uint8_t laneId, const uint8_t bc, uint8_t reg, const uint16_t addr)
 
void check_APE (const uint8_t &chipId, const uint8_t &dataC)
 
void AlpideByteError (const uint8_t &chipId, PayLoadCont &buffer)
 
void PrintFlxWord (std::ostream &os, uint8_t *pos)
 
void PrintBlock (std::ostream &os, uint8_t *pos, size_t n)
 

Public Attributes

CollectedDataStatus status = None
 
uint16_t flxId = 0
 
uint16_t feeId = 0
 
PayLoadCont data
 
std::array< PayLoadCont,
MaxCablesPerLink
cableData
 
uint32_t hbfEntry = 0
 
InteractionRecord ir = {}
 
GBTLinkDecodingStat statistics
 
bool hbf_found = false
 
uint32_t hbf_length = 0
 
uint32_t prev_pck_cnt = 0
 
uint32_t hbf_count = 0
 
PayLoadSG rawData
 
size_t dataOffset = 0
 
std::vector< InteractionRecordmL1TrgTime
 
std::vector< TRGDatamTrgData
 
std::vector< mvtx_hit * > hit_vector = {}
 

Static Public Attributes

static constexpr int RawBufferMargin = 5000000
 
static constexpr int RawBufferSize = 10000000 + 2 * RawBufferMargin
 
static constexpr uint8_t MaxCablesPerLink = 3
 

Detailed Description

support for the GBT single link data

Definition at line 72 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 72 of file GBTLink.h

Member Enumeration Documentation

Enumerator:
None 
AbortedOnError 
StoppedOnEndOfData 
DataSeen 

Definition at line 79 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 79 of file GBTLink.h

Constructor & Destructor Documentation

mvtx::GBTLink::GBTLink ( )
default
GBTLink::GBTLink ( uint16_t  _flx,
uint16_t  _fee 
)

======================================================================

GBT Link data decoding class


create link with given ids

Definition at line 21 of file GBTLink.cxx.

View newest version in sPHENIX GitHub at line 21 of file GBTLink.cxx

References data, mvtx::PayLoadCont::expand(), and RawBufferSize.

+ Here is the call graph for this function:

Member Function Documentation

void mvtx::GBTLink::addHit ( const uint8_t  laneId,
const uint8_t  bc,
uint8_t  reg,
const uint16_t  addr 
)
inline

Definition at line 149 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 149 of file GBTLink.h

void mvtx::GBTLink::AlpideByteError ( const uint8_t &  chipId,
PayLoadCont buffer 
)
inline

Definition at line 208 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 208 of file GBTLink.h

References mvtx::PayLoadCont::clear(), and mvtx::PayLoadCont::next().

+ Here is the call graph for this function:

void mvtx::GBTLink::cacheData ( size_t  start,
size_t  sz 
)
inline

Definition at line 127 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 127 of file GBTLink.h

References rawData.

void mvtx::GBTLink::check_APE ( const uint8_t &  chipId,
const uint8_t &  dataC 
)
inline

Definition at line 161 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 161 of file GBTLink.h

void GBTLink::clear ( bool  resetStat = true,
bool  resetTFRaw = false 
)

reset link

Definition at line 41 of file GBTLink.cxx.

View newest version in sPHENIX GitHub at line 41 of file GBTLink.cxx

References mvtx::PayLoadSG::clear(), mvtx::PayLoadCont::clear(), mvtx::GBTLinkDecodingStat::clear(), data, dataOffset, hbf_count, hbfEntry, hit_vector, mvtx::PayLoadCont::isEmpty(), mL1TrgTime, mvtx::PayLoadCont::moveUnusedToHead(), mTrgData, None, rawData, statistics, and status.

+ Here is the call graph for this function:

void mvtx::GBTLink::clearCableData ( )
inline

Definition at line 132 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 132 of file GBTLink.h

References configureMap::data.

GBTLink::CollectedDataStatus mvtx::GBTLink::collectROFCableData ( )
inline

collect cables data for single ROF, return number of real payload words seen, -1 in case of critical error

Definition at line 247 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 247 of file GBTLink.h

References assert, configureMap::data, mvtx_utils::RdhExt_t::decode(), distance(), mvtx_utils::FLXWordLength, i, log_error, mvtx::GBTLinkDecodingStat::nBitMap, mvtx_utils::RdhExt_t::packetCounter, mvtx_utils::RdhExt_t::pageSize, rawData, utils::status, mvtx_utils::RdhExt_t::stopBit, and mvtx_utils::RdhExt_t::trgType.

+ Here is the call graph for this function:

int mvtx::GBTLink::decode_lane ( const uint8_t  chipId,
PayLoadCont buffer 
)
inline

Definition at line 456 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 456 of file GBTLink.h

References assert, mvtx::PayLoadCont::getOffset(), mvtx::PayLoadCont::getSize(), mvtx::PayLoadCont::getUnusedSize(), mvtx::PayLoadCont::isEmpty(), log_error, mvtx::PayLoadCont::next(), and true.

+ Here is the call graph for this function:

void mvtx::GBTLink::getRowCol ( const uint8_t  reg,
const uint16_t  addr,
uint16_t &  row,
uint16_t &  col 
)
inline

Definition at line 143 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 143 of file GBTLink.h

void mvtx::GBTLink::PrintBlock ( std::ostream &  os,
uint8_t *  pos,
size_t  n 
)
inline

Definition at line 233 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 233 of file GBTLink.h

References i, and n.

void mvtx::GBTLink::PrintFlxWord ( std::ostream &  os,
uint8_t *  pos 
)
inline

Definition at line 223 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 223 of file GBTLink.h

References i.

int GBTLink::readFlxWord ( GBTWord gbtwords,
uint16_t &  w16 
)

this function reads in 32 bytes = 3 GBT words and 2 bytes

Definition at line 77 of file GBTLink.cxx.

View newest version in sPHENIX GitHub at line 77 of file GBTLink.cxx

References data, dataOffset, mvtx::PayLoadCont::getPtr(), and k.

+ Here is the call graph for this function:

Member Data Documentation

std::array<PayLoadCont, MaxCablesPerLink> mvtx::GBTLink::cableData

Definition at line 100 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 100 of file GBTLink.h

PayLoadCont mvtx::GBTLink::data

Definition at line 99 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 99 of file GBTLink.h

Referenced by clear(), GBTLink(), and readFlxWord().

size_t mvtx::GBTLink::dataOffset = 0

Definition at line 114 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 114 of file GBTLink.h

Referenced by clear(), and readFlxWord().

uint16_t mvtx::GBTLink::feeId = 0

Definition at line 97 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 97 of file GBTLink.h

uint16_t mvtx::GBTLink::flxId = 0

Definition at line 96 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 96 of file GBTLink.h

uint32_t mvtx::GBTLink::hbf_count = 0

Definition at line 111 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 111 of file GBTLink.h

Referenced by clear().

bool mvtx::GBTLink::hbf_found = false

Definition at line 107 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 107 of file GBTLink.h

uint32_t mvtx::GBTLink::hbf_length = 0

Definition at line 109 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 109 of file GBTLink.h

uint32_t mvtx::GBTLink::hbfEntry = 0

Definition at line 103 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 103 of file GBTLink.h

Referenced by clear().

std::vector<mvtx_hit *> mvtx::GBTLink::hit_vector = {}

Definition at line 118 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 118 of file GBTLink.h

Referenced by clear().

InteractionRecord mvtx::GBTLink::ir = {}

Definition at line 104 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 104 of file GBTLink.h

constexpr uint8_t mvtx::GBTLink::MaxCablesPerLink = 3
static

Definition at line 92 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 92 of file GBTLink.h

std::vector<InteractionRecord> mvtx::GBTLink::mL1TrgTime

Definition at line 115 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 115 of file GBTLink.h

Referenced by clear().

std::vector<TRGData> mvtx::GBTLink::mTrgData

Definition at line 116 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 116 of file GBTLink.h

Referenced by clear().

uint32_t mvtx::GBTLink::prev_pck_cnt = 0

Definition at line 110 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 110 of file GBTLink.h

constexpr int mvtx::GBTLink::RawBufferMargin = 5000000
static

Definition at line 90 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 90 of file GBTLink.h

constexpr int mvtx::GBTLink::RawBufferSize = 10000000 + 2 * RawBufferMargin
static

Definition at line 91 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 91 of file GBTLink.h

Referenced by GBTLink().

PayLoadSG mvtx::GBTLink::rawData

Definition at line 113 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 113 of file GBTLink.h

Referenced by clear().

GBTLinkDecodingStat mvtx::GBTLink::statistics

Definition at line 106 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 106 of file GBTLink.h

Referenced by clear().

CollectedDataStatus mvtx::GBTLink::status = None

Definition at line 94 of file GBTLink.h.

View newest version in sPHENIX GitHub at line 94 of file GBTLink.h

Referenced by clear().


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