Belle II Software development
dhc_frame_header_word0 Struct Reference

DHC frame header word data struct. More...

#include <PXDRawDataStructs.h>

Public Member Functions

ubig16_t getData (void) const
 get the data
 
unsigned short getFrameType (void) const
 get type of frame
 
unsigned short getErrorFlag (void) const
 get error flag
 
unsigned short getMisc (void) const
 get misc
 
void print (void) const
 print
 

Public Attributes

const ubig16_t data
 the data
 

Detailed Description

DHC frame header word data struct.

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

Definition at line 43 of file PXDRawDataStructs.h.

Member Function Documentation

◆ getData()

ubig16_t getData ( void  ) const
inline

get the data

Definition at line 48 of file PXDRawDataStructs.h.

49 {
50 return data;
51 };

◆ getErrorFlag()

unsigned short getErrorFlag ( void  ) const
inline

get error flag

Definition at line 58 of file PXDRawDataStructs.h.

59 {
60 return (data & 0x8000) >> 15;
61 };

◆ getFrameType()

unsigned short getFrameType ( void  ) const
inline

get type of frame

Definition at line 53 of file PXDRawDataStructs.h.

54 {
55 return (data & 0x7800) >> 11;
56 };

◆ getMisc()

unsigned short getMisc ( void  ) const
inline

get misc

Definition at line 63 of file PXDRawDataStructs.h.

64 {
65 return data & 0x7FF;
66 };

◆ print()

void print ( void  ) const

print

Definition at line 36 of file PXDRawDataStructs.cc.

37 {
38 const char* dhc_type_name[16] = {
39 (const char*)"DHP_RAW",
40 (const char*)"FCE_RAW",
41 (const char*)"GHOST ",
42 (const char*)"H_START",
43 (const char*)"H_END ",
44 (const char*)"DHP_ZSD",
45 (const char*)"COMMODE",
46 (const char*)"undef ",
47 (const char*)"undef ",
48 (const char*)"ONS_FCE",
49 (const char*)"undef ",
50 (const char*)"C_START",
51 (const char*)"C_END ",
52 (const char*)"ONS_DHP",
53 (const char*)"ONS_TRG",
54 (const char*)"ONS_ROI"
55 };
56 B2DEBUG(99, "DHC FRAME TYP $" << std::hex << getFrameType() << " -> " << dhc_type_name[getFrameType()] << " (ERR " << getErrorFlag()
57 << ") data " << data);
58 };
unsigned short getFrameType(void) const
get type of frame
unsigned short getErrorFlag(void) const
get error flag

Member Data Documentation

◆ data

const ubig16_t data

the data

Definition at line 45 of file PXDRawDataStructs.h.


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