Belle II Software  release-08-01-10
dhc_frames Class Reference

DHC frame wrapper class. More...

#include <PXDRawDataStructs.h>

Collaboration diagram for dhc_frames:

Public Member Functions

 dhc_frames (void)
 set default values
 
int getFrameType (void)
 get type of frame
 
void set (const void *d, unsigned int t)
 set data and type (and length to 0) More...
 
void set (const void *d, unsigned int t, unsigned int l)
 set data, type and length More...
 
void set (const void *d)
 set data (get type from dhc_frame_header_word0 and set length to 0) More...
 
unsigned int getEventNrLo (void) const
 get event nr lo (from data)
 
void check_padding (PXDErrorFlags &errormask)
 check padding and return it More...
 
void check_crc (PXDErrorFlags &errormask, bool ignore_crc_flag=false)
 check crc and return it
 
unsigned int getFixedSize (void)
 get fixed size More...
 

Public Attributes

union {
   const void *   data
 no type
 
   const dhc_onsen_trigger_frame *   data_onsen_trigger_frame
 data_onsen_trigger_frame
 
   const dhc_start_frame *   data_dhc_start_frame
 data_dhc_start_frame
 
   const dhc_end_frame *   data_dhc_end_frame
 data_dhc_end_frame
 
   const dhc_dhe_start_frame *   data_dhe_start_frame
 data_dhe_start_frame
 
   const dhc_dhe_end_frame *   data_dhe_end_frame
 data_dhe_end_frame
 
   const dhc_commode_frame *   data_commode_frame
 data_commode_frame
 
   const dhc_direct_readout_frame *   data_direct_readout_frame
 data_direct_readout_frame
 
   const dhc_direct_readout_frame_raw *   data_direct_readout_frame_raw
 data_direct_readout_frame_raw
 
   const dhc_direct_readout_frame_zsd *   data_direct_readout_frame_zsd
 data_direct_readout_frame_zsd
 
   const dhc_ghost_frame *   data_ghost_frame
 data_ghost_frame
 
   const dhc_onsen_roi_frame *   data_onsen_roi_frame
 data_onsen_roi_frame
 
}; 
 
unsigned int datasize
 datasize
 
int type
 type
 
int length
 length
 

Detailed Description

DHC frame wrapper class.

Contains functions common for all type of frames (CRC etc) Provides a union pointer to the different struct types See Data format definitions [BELLE2-NOTE-TE-2016-009] on https://docs.belle2.org/

Definition at line 550 of file PXDRawDataStructs.h.

Member Function Documentation

◆ check_padding()

void check_padding ( PXDErrorFlags &  errormask)

check padding and return it

TODO many false positives, we should remove that check after we KNOW that it has been fixed in DHH Firmware

Definition at line 223 of file PXDRawDataStructs.cc.

224  {
225  unsigned int crc = *(ubig32_t*)(((unsigned char*)data) + length - 4);
226  if ((crc & 0xFFFF0000) == 0 || (crc & 0xFFFF) == 0) {
228  B2INFO("Suspicious Padding $" << std::hex << crc);
229  errorMask[c_nrSUSP_PADDING] = true;
230  }
231  };
const void * data
no type

◆ getFixedSize()

unsigned int getFixedSize ( void  )

get fixed size

size is not a fixed number

size is not a fixed number

size is not a fixed number

size is not a fixed number

Definition at line 262 of file PXDRawDataStructs.cc.

◆ set() [1/3]

void set ( const void *  d)
inline

set data (get type from dhc_frame_header_word0 and set length to 0)

Parameters
ddata

Definition at line 607 of file PXDRawDataStructs.h.

◆ set() [2/3]

void set ( const void *  d,
unsigned int  t 
)
inline

set data and type (and length to 0)

Parameters
ddata
ttype

Definition at line 587 of file PXDRawDataStructs.h.

◆ set() [3/3]

void set ( const void *  d,
unsigned int  t,
unsigned int  l 
)
inline

set data, type and length

Parameters
ddata
ttype
llength

Definition at line 598 of file PXDRawDataStructs.h.


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