Belle II Software development
dhc_onsen_roi_frame Struct Reference

ONSEN (debug) ROI frame data struct. More...

#include <PXDRawDataStructs.h>

Public Member Functions

unsigned short get_trig_nr0 (void) const
 get trignr0
 
void check_error (PXDErrorFlags &errormask, int length, bool ignore_inv_size_flag=false) const
 check error and return error mask
 
void print (void) const
 print
 
int getMinSize (void) const
 4 byte header, ROIS (n*8), 4 byte copy of inner CRC, 4 byte outer CRC
 
unsigned int check_inner_crc (PXDErrorFlags &, unsigned int) const
 check inner crc (currently not implemented/needed)
 

Public Attributes

const dhc_frame_header_word0 word0
 mainly empty
 
const ubig16_t trignr0
 trignr0
 

Detailed Description

ONSEN (debug) ROI frame data struct.

Encapsules the access for different bits and data words See Data format definitions [BELLE2-NOTE-TE-2016-009] on https://docs.belle2.org/

Definition at line 396 of file PXDRawDataStructs.h.

Member Function Documentation

◆ check_error()

void check_error ( PXDErrorFlags &  errormask,
int  length,
bool  ignore_inv_size_flag = false 
) const

check error and return error mask

Definition at line 135 of file PXDRawDataStructs.cc.

136 {
137 // 4 byte header, ROIS (n*8), 4 byte copy of inner CRC, 4 byte outer CRC
138 if (length < getMinSize()) {
139 if (!ignore_inv_size_flag) B2WARNING("DHC ONSEN HLT/ROI Frame too small to hold any ROIs!");
140 errorMask[c_nrROI_PACKET_INV_SIZE] = true;
141 } else if ((length - getMinSize()) % 8 != 0) {
142 if (!ignore_inv_size_flag) B2WARNING("DHC ONSEN HLT/ROI Frame holds fractional ROIs, last ROI might not be saved!");
143 errorMask[c_nrROI_PACKET_INV_SIZE] = true;
144 }
145 };
int getMinSize(void) const
4 byte header, ROIS (n*8), 4 byte copy of inner CRC, 4 byte outer CRC

◆ check_inner_crc()

unsigned int check_inner_crc ( PXDErrorFlags &  ,
unsigned int   
) const
inline

check inner crc (currently not implemented/needed)

Definition at line 419 of file PXDRawDataStructs.h.

420 {
421 // Parts of the data are now in the ONSEN Trigger frame,
422 // therefore the inner CRC cannot be checked that easily!
423 // TODO can be re-implemented if needed
424 return 0;
425 };

◆ get_trig_nr0()

unsigned short get_trig_nr0 ( void  ) const
inline

get trignr0

Definition at line 404 of file PXDRawDataStructs.h.

405 {
406 return trignr0;
407 };

◆ getMinSize()

int getMinSize ( void  ) const
inline

4 byte header, ROIS (n*8), 4 byte copy of inner CRC, 4 byte outer CRC

Definition at line 417 of file PXDRawDataStructs.h.

417{return 4 + 4 + 4;};

◆ print()

void print ( void  ) const

print

Definition at line 146 of file PXDRawDataStructs.cc.

147 {
148 word0.print();
149 B2DEBUG(99, "DHC HLT/ROI Frame");
150 };
const dhc_frame_header_word0 word0
mainly empty

Member Data Documentation

◆ trignr0

const ubig16_t trignr0

trignr0

Definition at line 398 of file PXDRawDataStructs.h.

◆ word0

mainly empty

Definition at line 397 of file PXDRawDataStructs.h.


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