Belle II Software development
dhc_start_frame Struct Reference

DHC start frame data struct. More...

#include <PXDRawDataStructs.h>

Public Member Functions

unsigned short getRunSubrun (void) const
 get run_subrun
 
unsigned short getExpRun (void) const
 get exp_run
 
unsigned short getEventNrLo (void) const
 get trigger_nr_lo
 
unsigned short getEventNrHi (void) const
 get trigger_nr_hi
 
bool isFakedData (void) const
 isFakedData
 
unsigned int getFixedSize (void) const
 get fixed size (byte)
 
void print (void) const
 print
 
unsigned short get_active_dhe_mask (void) const
 get active_dhe_mask (from word0)
 
unsigned short get_dhc_id (void) const
 get dhc_id (from word0)
 
unsigned short get_subrun (void) const
 get subrun (from run_subrun)
 
unsigned short get_run (void) const
 get run (from run_subrun)
 
unsigned short get_experiment (void) const
 get experiment (from exp_run)
 
unsigned short get_gated_flag (void) const
 get gated_flag (from word0)
 
unsigned short get_gated_isher (void) const
 get gated_isher (from word0)
 

Public Attributes

const dhc_frame_header_word0 word0
 word0
 
const ubig16_t trigger_nr_lo
 trigger_nr_lo
 
const ubig16_t trigger_nr_hi
 trigger_nr_hi
 
const ubig16_t time_tag_lo_and_type
 time_tag_lo_and_type
 
const ubig16_t time_tag_mid
 time_tag_mid
 
const ubig16_t time_tag_hi
 time_tag_hi
 
const ubig16_t run_subrun
 run_subrun
 
const ubig16_t exp_run
 exp_run
 
const unsigned int crc32
 crc32
 

Detailed Description

DHC start 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 75 of file PXDRawDataStructs.h.

Member Function Documentation

◆ get_active_dhe_mask()

unsigned short get_active_dhe_mask ( void  ) const
inline

get active_dhe_mask (from word0)

Definition at line 118 of file PXDRawDataStructs.h.

119 {
120 return word0.getMisc() & 0x1F;
121 };
unsigned short getMisc(void) const
get misc
const dhc_frame_header_word0 word0
word0

◆ get_dhc_id()

unsigned short get_dhc_id ( void  ) const
inline

get dhc_id (from word0)

Definition at line 123 of file PXDRawDataStructs.h.

124 {
125 return (word0.getMisc() >> 5) & 0xF;
126 };

◆ get_experiment()

unsigned short get_experiment ( void  ) const
inline

get experiment (from exp_run)

Definition at line 138 of file PXDRawDataStructs.h.

139 {
140 return (exp_run & 0xFFC0) >> 6;
141 };
const ubig16_t exp_run
exp_run

◆ get_gated_flag()

unsigned short get_gated_flag ( void  ) const
inline

get gated_flag (from word0)

Definition at line 143 of file PXDRawDataStructs.h.

144 {
145 return (word0.getMisc() & 0x200) != 0;
146 };

◆ get_gated_isher()

unsigned short get_gated_isher ( void  ) const
inline

get gated_isher (from word0)

Definition at line 148 of file PXDRawDataStructs.h.

149 {
150 return (word0.getMisc() & 0x400) != 0;
151 };

◆ get_run()

unsigned short get_run ( void  ) const
inline

get run (from run_subrun)

Definition at line 133 of file PXDRawDataStructs.h.

134 {
135 return (((run_subrun & 0xFF00) >> 8) | ((exp_run & 0x003F) << 8));
136 };
const ubig16_t run_subrun
run_subrun

◆ get_subrun()

unsigned short get_subrun ( void  ) const
inline

get subrun (from run_subrun)

Definition at line 128 of file PXDRawDataStructs.h.

129 {
130 return run_subrun & 0x00FF;
131 };

◆ getEventNrHi()

unsigned short getEventNrHi ( void  ) const
inline

get trigger_nr_hi

Definition at line 103 of file PXDRawDataStructs.h.

104 {
105 return trigger_nr_hi;
106 };
const ubig16_t trigger_nr_hi
trigger_nr_hi

◆ getEventNrLo()

unsigned short getEventNrLo ( void  ) const
inline

get trigger_nr_lo

Definition at line 98 of file PXDRawDataStructs.h.

99 {
100 return trigger_nr_lo;
101 };
const ubig16_t trigger_nr_lo
trigger_nr_lo

◆ getExpRun()

unsigned short getExpRun ( void  ) const
inline

get exp_run

Definition at line 93 of file PXDRawDataStructs.h.

94 {
95 return exp_run;
96 };

◆ getFixedSize()

unsigned int getFixedSize ( void  ) const
inline

get fixed size (byte)

Definition at line 111 of file PXDRawDataStructs.h.

112 {
113 return 20;
114 };

◆ getRunSubrun()

unsigned short getRunSubrun ( void  ) const
inline

get run_subrun

Definition at line 88 of file PXDRawDataStructs.h.

89 {
90 return run_subrun;
91 };

◆ isFakedData()

bool isFakedData ( void  ) const

isFakedData

Definition at line 60 of file PXDRawDataStructs.cc.

61 {
62 if (word0.data != 0x5800) return false;
63 if (trigger_nr_lo != 0) return false;
64 if (trigger_nr_hi != 0) return false;
65 if (time_tag_lo_and_type != 0) return false;
66 if (time_tag_mid != 0) return false;
67 if (time_tag_hi != 0) return false;
68 if (run_subrun != 0) return false;
69 if (exp_run != 0) return false;
70 if (crc32 != 0x4829214d) return false;
71 return true;
72 };
const unsigned int crc32
crc32
const ubig16_t time_tag_hi
time_tag_hi
const ubig16_t time_tag_mid
time_tag_mid
const ubig16_t time_tag_lo_and_type
time_tag_lo_and_type

◆ print()

void print ( void  ) const

print

Definition at line 74 of file PXDRawDataStructs.cc.

75 {
76 word0.print();
77 B2DEBUG(99, "DHC Start Frame TNRLO $" << std::hex << trigger_nr_lo << " TNRHI $" << std::hex << trigger_nr_hi << " TTLO $" <<
78 std::hex <<
80 << " TTMID $" << std::hex << time_tag_mid << " TTHI $" << std::hex << time_tag_hi << " Exp/Run/Subrun $" << std::hex << exp_run <<
81 " $" <<
83 << " CRC $" << std::hex << crc32);
84 };

Member Data Documentation

◆ crc32

const unsigned int crc32

crc32

Definition at line 84 of file PXDRawDataStructs.h.

◆ exp_run

const ubig16_t exp_run

exp_run

Definition at line 83 of file PXDRawDataStructs.h.

◆ run_subrun

const ubig16_t run_subrun

run_subrun

Definition at line 82 of file PXDRawDataStructs.h.

◆ time_tag_hi

const ubig16_t time_tag_hi

time_tag_hi

Definition at line 81 of file PXDRawDataStructs.h.

◆ time_tag_lo_and_type

const ubig16_t time_tag_lo_and_type

time_tag_lo_and_type

Definition at line 79 of file PXDRawDataStructs.h.

◆ time_tag_mid

const ubig16_t time_tag_mid

time_tag_mid

Definition at line 80 of file PXDRawDataStructs.h.

◆ trigger_nr_hi

const ubig16_t trigger_nr_hi

trigger_nr_hi

Definition at line 78 of file PXDRawDataStructs.h.

◆ trigger_nr_lo

const ubig16_t trigger_nr_lo

trigger_nr_lo

Definition at line 77 of file PXDRawDataStructs.h.

◆ word0

word0

Definition at line 76 of file PXDRawDataStructs.h.


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