Belle II Software development
dhc_onsen_trigger_frame Struct Reference

ONSEN Trigger frame data struct. More...

#include <PXDRawDataStructs.h>

Public Member Functions

unsigned int getFixedSize (void) const
 8*4 bytes might still be changed
 
unsigned short get_trig_nr0 (void) const
 get trignr0
 
unsigned int get_trig_nr1 (void) const
 get trignr1
 
unsigned int get_trig_nr2 (void) const
 get trignr2
 
unsigned int get_trig_tag1 (void) const
 get trigtag1
 
unsigned int get_trig_tag2 (void) const
 get trigtag2
 
unsigned short get_subrun1 (void) const
 get subrun1 (from trigtag1)
 
unsigned short get_run1 (void) const
 get run1 (from trigtag1)
 
unsigned short get_experiment1 (void) const
 get experiment1 (from trigtag1)
 
unsigned short get_subrun2 (void) const
 get subrun2 (from trigtag2)
 
unsigned short get_run2 (void) const
 get run2 (from trigtag2)
 
unsigned short get_experiment2 (void) const
 get experiment2
 
void print (void) const
 print
 
void check_error (PXDErrorFlags &errormask, bool ignore_datcon_flag=false, bool ignore_hltroi_magic_flag=false, bool ignore_merger_mm_flag=false) const
 check error and return error mask
 
bool is_fake_datcon (void) const
 is fake datcon
 
bool is_Accepted (void) const
 is accepted
 
bool is_SendROIs (void) const
 is sendROIs
 
bool is_SendUnfiltered (void) const
 is sendUnfiltered
 

Public Attributes

const dhc_frame_header_word0 word0
 word0
 
const ubig16_t trignr0
 trignr0
 
const ubig32_t magic1
 CAFExxxx , redundant.
 
const ubig32_t trignr1
 HLT Trigger/Tag part 1.
 
const ubig32_t trigtag1
 HLT Trigger/Tag part 2.
 
const ubig32_t magic2
 CAFExxxx, redundant.
 
const ubig32_t trignr2
 redundant, DATCON Trigger/Tag part 1
 
const ubig32_t trigtag2
 redundant, DATCON Trigger/Tag part 2
 
const unsigned int crc32
 crc32
 

Detailed Description

ONSEN Trigger 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 288 of file PXDRawDataStructs.h.

Member Function Documentation

◆ check_error()

void check_error ( PXDErrorFlags &  errormask,
bool  ignore_datcon_flag = false,
bool  ignore_hltroi_magic_flag = false,
bool  ignore_merger_mm_flag = false 
) const

check error and return error mask

Definition at line 112 of file PXDRawDataStructs.cc.

115 {
116 if ((magic1 & 0xFFFF0000) != 0xCAFE0000) {
117 if (!ignore_hltroi_magic_flag) B2WARNING("ONSEN Trigger Magic 1 error $" << std::hex << magic1);
118 errorMask[c_nrHLTROI_MAGIC] = true;
119 }
120 if ((magic2 & 0xFFFF0000) != 0xCAFE0000) {
121 if (!ignore_hltroi_magic_flag) B2WARNING("ONSEN Trigger Magic 2 error $" << std::hex << magic2);
122 errorMask[c_nrHLTROI_MAGIC] = true;
123 }
124 if (is_fake_datcon()) {
125 if (!ignore_datcon_flag) B2INFO("ONSEN Trigger Frame: No DATCON data $" << std::hex << trignr1 << "!=$" << trignr2);
126 errorMask[c_nrNO_DATCON] = true;
127 } else {
128 if (trignr1 != trignr2) {
129 if (!ignore_merger_mm_flag) B2WARNING("ONSEN Trigger Frame Trigger Nr Mismatch $" << std::hex << trignr1 << "!=$" << trignr2);
130 errorMask[c_nrMERGER_TRIGNR] = true;
131 }
132 }
133 };
const ubig32_t trignr2
redundant, DATCON Trigger/Tag part 1
const ubig32_t magic1
CAFExxxx , redundant.
const ubig32_t trignr1
HLT Trigger/Tag part 1.
bool is_fake_datcon(void) const
is fake datcon
const ubig32_t magic2
CAFExxxx, redundant.

◆ get_experiment1()

unsigned short get_experiment1 ( void  ) const
inline

get experiment1 (from trigtag1)

Definition at line 340 of file PXDRawDataStructs.h.

341 {
342 return (trigtag1 & 0xFFC00000) >> 22;
343 };
const ubig32_t trigtag1
HLT Trigger/Tag part 2.

◆ get_experiment2()

unsigned short get_experiment2 ( void  ) const
inline

get experiment2

Definition at line 355 of file PXDRawDataStructs.h.

356 {
357 return (trigtag2 & 0xFFC00000) >> 22;
358 };
const ubig32_t trigtag2
redundant, DATCON Trigger/Tag part 2

◆ get_run1()

unsigned short get_run1 ( void  ) const
inline

get run1 (from trigtag1)

Definition at line 335 of file PXDRawDataStructs.h.

336 {
337 return ((trigtag1 & 0x003FFF00) >> 8);
338 };

◆ get_run2()

unsigned short get_run2 ( void  ) const
inline

get run2 (from trigtag2)

Definition at line 350 of file PXDRawDataStructs.h.

351 {
352 return ((trigtag2 & 0x003FFF00) >> 8);
353 };

◆ get_subrun1()

unsigned short get_subrun1 ( void  ) const
inline

get subrun1 (from trigtag1)

Definition at line 330 of file PXDRawDataStructs.h.

331 {
332 return trigtag1 & 0xFF;
333 };

◆ get_subrun2()

unsigned short get_subrun2 ( void  ) const
inline

get subrun2 (from trigtag2)

Definition at line 345 of file PXDRawDataStructs.h.

346 {
347 return trigtag2 & 0xFF;
348 };

◆ get_trig_nr0()

unsigned short get_trig_nr0 ( void  ) const
inline

get trignr0

Definition at line 305 of file PXDRawDataStructs.h.

306 {
307 return trignr0;
308 };

◆ get_trig_nr1()

unsigned int get_trig_nr1 ( void  ) const
inline

get trignr1

Definition at line 310 of file PXDRawDataStructs.h.

311 {
312 return trignr1;
313 };

◆ get_trig_nr2()

unsigned int get_trig_nr2 ( void  ) const
inline

get trignr2

Definition at line 315 of file PXDRawDataStructs.h.

316 {
317 return trignr2;
318 };

◆ get_trig_tag1()

unsigned int get_trig_tag1 ( void  ) const
inline

get trigtag1

Definition at line 320 of file PXDRawDataStructs.h.

321 {
322 return trigtag1;
323 };

◆ get_trig_tag2()

unsigned int get_trig_tag2 ( void  ) const
inline

get trigtag2

Definition at line 325 of file PXDRawDataStructs.h.

326 {
327 return trigtag2;
328 };

◆ getFixedSize()

unsigned int getFixedSize ( void  ) const
inline

8*4 bytes might still be changed

Definition at line 300 of file PXDRawDataStructs.h.

301 {
302 return 32;
303 };

◆ is_Accepted()

bool is_Accepted ( void  ) const
inline

is accepted

Definition at line 376 of file PXDRawDataStructs.h.

377 {
378 return (magic1 & 0x8000) != 0;
379 };

◆ is_fake_datcon()

bool is_fake_datcon ( void  ) const
inline

is fake datcon

Definition at line 371 of file PXDRawDataStructs.h.

372 {
373 return (magic2 == 0xCAFE0000 && trignr2 == 0x00000000 && trigtag2 == 0x00000000);
374 };

◆ is_SendROIs()

bool is_SendROIs ( void  ) const
inline

is sendROIs

Definition at line 381 of file PXDRawDataStructs.h.

382 {
383 return (magic1 & 0x2000) != 0;
384 };

◆ is_SendUnfiltered()

bool is_SendUnfiltered ( void  ) const
inline

is sendUnfiltered

Definition at line 386 of file PXDRawDataStructs.h.

387 {
388 return (magic1 & 0x4000) != 0;
389 };

◆ print()

void print ( void  ) const

print

Definition at line 106 of file PXDRawDataStructs.cc.

107 {
108 word0.print();
109 B2DEBUG(99, "ONSEN Trigger Frame TNRLO $" << std::hex << trignr0);
110 };
const dhc_frame_header_word0 word0
word0

Member Data Documentation

◆ crc32

const unsigned int crc32

crc32

Definition at line 297 of file PXDRawDataStructs.h.

◆ magic1

const ubig32_t magic1

CAFExxxx , redundant.

Definition at line 291 of file PXDRawDataStructs.h.

◆ magic2

const ubig32_t magic2

CAFExxxx, redundant.

Definition at line 294 of file PXDRawDataStructs.h.

◆ trignr0

const ubig16_t trignr0

trignr0

Definition at line 290 of file PXDRawDataStructs.h.

◆ trignr1

const ubig32_t trignr1

HLT Trigger/Tag part 1.

Definition at line 292 of file PXDRawDataStructs.h.

◆ trignr2

const ubig32_t trignr2

redundant, DATCON Trigger/Tag part 1

Definition at line 295 of file PXDRawDataStructs.h.

◆ trigtag1

const ubig32_t trigtag1

HLT Trigger/Tag part 2.

Definition at line 293 of file PXDRawDataStructs.h.

◆ trigtag2

const ubig32_t trigtag2

redundant, DATCON Trigger/Tag part 2

Definition at line 296 of file PXDRawDataStructs.h.

◆ word0

word0

Definition at line 289 of file PXDRawDataStructs.h.


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