Belle II Software  release-05-02-19
dhc_frames Class Reference

DHC frame wrapper class. More...

#include <PXDRawDataStructs.h>

Collaboration diagram for dhc_frames:

Public Member Functions

int getFrameType (void)
 
void set (const void *d, unsigned int t)
 
void set (const void *d, unsigned int t, unsigned int l)
 
void set (const void *d)
 
unsigned int getEventNrLo (void) const
 
PXDError::PXDErrorFlags check_padding ()
 
PXDError::PXDErrorFlags check_crc (bool ignore_crc_flag=false)
 
unsigned int getFixedSize (void)
 

Public Attributes

union {
   const void *   data
 
   const dhc_onsen_trigger_frame *   data_onsen_trigger_frame
 no type
 
   const dhc_start_frame *   data_dhc_start_frame
 
   const dhc_end_frame *   data_dhc_end_frame
 
   const dhc_dhe_start_frame *   data_dhe_start_frame
 
   const dhc_dhe_end_frame *   data_dhe_end_frame
 
   const dhc_commode_frame *   data_commode_frame
 
   const dhc_direct_readout_frame *   data_direct_readout_frame
 
   const dhc_direct_readout_frame_raw *   data_direct_readout_frame_raw
 
   const dhc_direct_readout_frame_zsd *   data_direct_readout_frame_zsd
 
   const dhc_ghost_frame *   data_ghost_frame
 
   const dhc_onsen_roi_frame *   data_onsen_roi_frame
 
}; 
 
unsigned int datasize
 
int type
 
int 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 317 of file PXDRawDataStructs.h.

Member Function Documentation

◆ check_padding()

PXDError::PXDErrorFlags check_padding ( )

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

Definition at line 238 of file PXDRawDataStructs.cc.

240  {
241  dhc_crc_32_type bocrc;
242 
243  if (length > 65536 * 16) {
244  if (!ignore_crc_flag) B2WARNING("DHC Data Frame CRC not calculated because of too large packet (>1MB)!");
245  return PXDError::EPXDErrMask::c_NO_ERROR; // such large packets should trigger an error elsewhere
246  } else {
247  bocrc.process_bytes(data, length - 4);

◆ getFixedSize()

unsigned int getFixedSize ( void  )

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 279 of file PXDRawDataStructs.cc.


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