Belle II Software development
dhc_dhe_end_frame Struct Reference

DHE End frame data struct. More...

#include <PXDRawDataStructs.h>

Public Member Functions

unsigned int get_words (void) const
 get words
 
void print (void) const
 print
 
unsigned int getDHEId (void) const
 get DHE Id
 
unsigned int getErrorInfo (void) const
 get error info
 
unsigned int getErrorStateMachineDHP (int dhpid) const
 get error state machine DHP
 
unsigned int getErrorStateMachineStartDHP (int dhpid) const
 get error state machine start DHP
 
unsigned int getErrorStateMachineEndDHP (int dhpid) const
 get error state machine end DHP
 

Static Public Member Functions

static unsigned int getFixedSize (void)
 get fixed size
 

Public Attributes

const dhc_frame_header_word0 word0
 word0
 
const ubig16_t trigger_nr_lo
 trigger_nr_lo
 
const ubig16_t wordsineventlo
 words swapped... because of DHE 16 bit handling
 
const ubig16_t wordsineventhi
 wordsineventhi
 
const ubig32_t errorinfo
 not well defined yet
 
const unsigned int crc32
 crc32
 

Detailed Description

DHE End 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 501 of file PXDRawDataStructs.h.

Member Function Documentation

◆ get_words()

unsigned int get_words ( void ) const
inline

get words

Definition at line 511 of file PXDRawDataStructs.h.

512 {
513 return wordsineventlo | ((unsigned int)wordsineventhi << 16);
514 }

◆ getDHEId()

unsigned int getDHEId ( void ) const
inline

get DHE Id

Definition at line 523 of file PXDRawDataStructs.h.

524 {
525 return (word0.getMisc() >> 4) & 0x3F;
526 };

◆ getErrorInfo()

unsigned int getErrorInfo ( void ) const
inline

get error info

Definition at line 528 of file PXDRawDataStructs.h.

529 {
530 return errorinfo;
531 };

◆ getErrorStateMachineDHP()

unsigned int getErrorStateMachineDHP ( int dhpid) const

get error state machine DHP

Definition at line 192 of file PXDRawDataStructs.cc.

193 {
194 switch (dhpid) {
195 case 0: return ((uint32_t)errorinfo >> 24) & 0xFF;
196 case 1: return ((uint32_t)errorinfo >> 16) & 0xFF;
197 case 2: return ((uint32_t)errorinfo >> 8) & 0xFF;
198 case 3: return errorinfo & 0xFF;
199 default: return 0;
200 }
201 };

◆ getErrorStateMachineEndDHP()

unsigned int getErrorStateMachineEndDHP ( int dhpid) const

get error state machine end DHP

Definition at line 214 of file PXDRawDataStructs.cc.

215 {
216 switch (dhpid) {
217 case 0: return ((uint32_t)errorinfo >> 28) & 0xF;
218 case 1: return ((uint32_t)errorinfo >> 20) & 0xF;
219 case 2: return ((uint32_t)errorinfo >> 12) & 0xF;
220 case 3: return ((uint32_t)errorinfo >> 4) & 0xF;
221 default: return 0;
222 }
223 };

◆ getErrorStateMachineStartDHP()

unsigned int getErrorStateMachineStartDHP ( int dhpid) const

get error state machine start DHP

Definition at line 203 of file PXDRawDataStructs.cc.

204 {
205 switch (dhpid) {
206 case 0: return ((uint32_t)errorinfo >> 24) & 0xF;
207 case 1: return ((uint32_t)errorinfo >> 16) & 0xF;
208 case 2: return ((uint32_t)errorinfo >> 8) & 0xF;
209 case 3: return errorinfo & 0xF;
210 default: return 0;
211 }
212 };

◆ getFixedSize()

static unsigned int getFixedSize ( void )
inlinestatic

get fixed size

Definition at line 516 of file PXDRawDataStructs.h.

517 {
518 return 16;
519 };

◆ print()

void print ( void ) const

print

Definition at line 185 of file PXDRawDataStructs.cc.

186 {
187 word0.print();
188 B2DEBUG(99, "DHC DHE End Frame TNRLO $" << std::hex << trigger_nr_lo << " WIEVT $" << std::hex << wordsineventhi << "." <<
189 wordsineventlo << " ERR $" << std::hex << errorinfo << " CRC " << std::hex << crc32);
190 };

Member Data Documentation

◆ crc32

const unsigned int crc32

crc32

Definition at line 507 of file PXDRawDataStructs.h.

◆ errorinfo

const ubig32_t errorinfo

not well defined yet

Definition at line 506 of file PXDRawDataStructs.h.

◆ trigger_nr_lo

const ubig16_t trigger_nr_lo

trigger_nr_lo

Definition at line 503 of file PXDRawDataStructs.h.

◆ word0

word0

Definition at line 502 of file PXDRawDataStructs.h.

◆ wordsineventhi

const ubig16_t wordsineventhi

wordsineventhi

Definition at line 505 of file PXDRawDataStructs.h.

◆ wordsineventlo

const ubig16_t wordsineventlo

words swapped... because of DHE 16 bit handling

Definition at line 504 of file PXDRawDataStructs.h.


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