11#include <pxd/dataobjects/PXDErrorFlags.h>
13#include <boost/endian/arithmetic.hpp>
37 using Belle2::PXD::PXDError::PXDErrorFlags;
55 return (
data & 0x7800) >> 11;
60 return (
data & 0x8000) >> 15;
68 void print(
void)
const;
116 void print(
void)
const;
140 return (
exp_run & 0xFFC0) >> 6;
194 void print(
void)
const;
252 void print(
void)
const;
337 return ((
trigtag1 & 0x003FFF00) >> 8);
342 return (
trigtag1 & 0xFFC00000) >> 22;
352 return ((
trigtag2 & 0x003FFF00) >> 8);
357 return (
trigtag2 & 0xFFC00000) >> 22;
360 void print(
void)
const;
364 PXDErrorFlags& errormask,
365 bool ignore_datcon_flag =
false,
366 bool ignore_hltroi_magic_flag =
false,
367 bool ignore_merger_mm_flag =
false
378 return (
magic1 & 0x8000) != 0;
383 return (
magic1 & 0x2000) != 0;
388 return (
magic1 & 0x4000) != 0;
410 PXDErrorFlags& errormask,
412 bool ignore_inv_size_flag =
false
415 void print(
void)
const;
444 void print(
void)
const;
484 void print(
void)
const;
521 void print(
void)
const;
587 void set(
const void* d,
unsigned int t)
598 void set(
const void* d,
unsigned int t,
unsigned int l)
621 void check_crc(PXDErrorFlags& errormask,
bool ignore_crc_flag =
false);
const dhc_ghost_frame * data_ghost_frame
data_ghost_frame
void set(const void *d, unsigned int t, unsigned int l)
set data, type and length
const dhc_direct_readout_frame_zsd * data_direct_readout_frame_zsd
data_direct_readout_frame_zsd
unsigned int getEventNrLo(void) const
get event nr lo (from data)
const dhc_end_frame * data_dhc_end_frame
data_dhc_end_frame
void set(const void *d)
set data (get type from dhc_frame_header_word0 and set length to 0)
unsigned int getFixedSize(void)
get fixed size
int getFrameType(void)
get type of frame
const dhc_dhe_start_frame * data_dhe_start_frame
data_dhe_start_frame
void set(const void *d, unsigned int t)
set data and type (and length to 0)
const dhc_start_frame * data_dhc_start_frame
data_dhc_start_frame
const dhc_direct_readout_frame * data_direct_readout_frame
data_direct_readout_frame
const dhc_dhe_end_frame * data_dhe_end_frame
data_dhe_end_frame
void check_padding(PXDErrorFlags &errormask)
check padding and return it
const dhc_onsen_roi_frame * data_onsen_roi_frame
data_onsen_roi_frame
const dhc_direct_readout_frame_raw * data_direct_readout_frame_raw
data_direct_readout_frame_raw
const dhc_commode_frame * data_commode_frame
data_commode_frame
void check_crc(PXDErrorFlags &errormask, bool ignore_crc_flag=false)
check crc and return it
unsigned int datasize
datasize
dhc_frames(void)
set default values
const dhc_onsen_trigger_frame * data_onsen_trigger_frame
data_onsen_trigger_frame
boost::endian::little_uint16_t ulittle16_t
define alias ulittle16_t
boost::endian::big_uint32_t ubig32_t
define alias ubig32_t
boost::endian::little_uint32_t ulittle32_t
define alias ulittle32_t
boost::endian::big_uint16_t ubig16_t
define alias ubig16_t
Abstract base class for different kinds of events.
DHH common mode frame data struct.
const dhc_frame_header_word0 word0
word0
unsigned int getFixedSize(void) const
100 words
const unsigned int crc32
crc32
const ubig16_t trigger_nr_lo
trigger_nr_lo
unsigned int getDHEId(void) const
get DHE Id (from word0)
unsigned short getEventNrLo(void) const
get trigger_nr_lo
const ubig16_t data[96]
data
DHE End frame data struct.
void print(void) const
print
const dhc_frame_header_word0 word0
word0
unsigned int getFixedSize(void) const
get fixed size
const unsigned int crc32
crc32
unsigned int get_words(void) const
get words
const ubig16_t trigger_nr_lo
trigger_nr_lo
unsigned int getDHEId(void) const
get DHE Id
unsigned int getErrorStateMachineStartDHP(int dhpid) const
get error state machine start DHP
const ubig16_t wordsineventhi
wordsineventhi
unsigned int getErrorStateMachineDHP(int dhpid) const
get error state machine DHP
const ubig16_t wordsineventlo
words swapped... because of DHE 16 bit handling
unsigned int getErrorInfo(void) const
get error info
unsigned int getErrorStateMachineEndDHP(int dhpid) const
get error state machine end DHP
const ubig32_t errorinfo
not well defined yet
DHH start frame data struct.
const ubig16_t dhe_time_tag_hi
dhe_time_tag_hi
void print(void) const
print
const ubig16_t trigger_nr_hi
trigger_nr_hi
const dhc_frame_header_word0 word0
word0
const ubig16_t dhe_time_tag_lo
dhe_time_tag_lo
unsigned int getFixedSize(void) const
8 words
const unsigned int crc32
crc32
const ubig16_t trigger_nr_lo
trigger_nr_lo
unsigned int getDHEId(void) const
get DHE Id (from word0)
unsigned short getEventNrLo(void) const
get trigger_nr_lo
const ubig16_t sfnr_offset
sfnr_offset
unsigned short getTriggerGate(void) const
trigger gate (updated to 8 bit, before 10!)
unsigned short getStartFrameNr(void) const
last DHP frame before trigger
unsigned short getEventNrHi(void) const
get trigger_nr_hi
unsigned int getActiveDHPMask(void) const
get Active DHP Mask (from word0)
DHC RAW direct readout frame data struct.
DHC Zero supressed direct readout frame data struct.
DHC direct readout frame data struct.
void print(void) const
print
const dhc_frame_header_word0 word0
word0
const ubig16_t trigger_nr_lo
trigger_nr_lo
unsigned short getEventNrLo(void) const
get trigger_nr_lo
bool getDataReformattedFlag(void) const
get DataReformattedFlag (from word0)
unsigned short getDHEId(void) const
get DHE Id (from word0)
unsigned short getDHPPort(void) const
get DHP Port (from word0)
DHC End frame data struct.
void print(void) const
print
const dhc_frame_header_word0 word0
word0
unsigned int getFixedSize(void) const
get fixed size
const unsigned int crc32
crc32
unsigned int get_words(void) const
get words
const ubig16_t trigger_nr_lo
trigger_nr_lo
bool isFakedData(void) const
is faked data
unsigned int get_dhc_id(void) const
get dhc id (from word0)
unsigned int getErrorInfo(void) const
get error info
const ubig32_t wordsinevent
wordsinevent
const ubig32_t errorinfo
errorinfo
DHC Ghost frame data struct.
void print(void) const
print
const dhc_frame_header_word0 word0
word0
unsigned int getFixedSize(void) const
fixed length
const unsigned int crc32
crc32
const ubig16_t trigger_nr_lo
trigger_nr_lo
unsigned short getErrorBits(void) const
get Error Bits
unsigned short getDHEId(void) const
get DHE Id (from word0)
unsigned short getDHPPort(void) const
get DDHP port (from word0)
ONSEN (debug) ROI frame data struct.
void print(void) const
print
const dhc_frame_header_word0 word0
mainly empty
const ubig16_t trignr0
trignr0
unsigned short get_trig_nr0(void) const
get trignr0
unsigned int check_inner_crc(PXDErrorFlags &, unsigned int) const
check inner crc (currently not implemented/needed)
void check_error(PXDErrorFlags &errormask, int length, bool ignore_inv_size_flag=false) const
check error and return error mask
int getMinSize(void) const
4 byte header, ROIS (n*8), 4 byte copy of inner CRC, 4 byte outer CRC
ONSEN Trigger frame data struct.
void print(void) const
print
unsigned short get_subrun1(void) const
get subrun1 (from trigtag1)
const dhc_frame_header_word0 word0
word0
unsigned int getFixedSize(void) const
8*4 bytes might still be changed
unsigned int get_trig_nr1(void) const
get trignr1
bool is_SendUnfiltered(void) const
is sendUnfiltered
const ubig32_t trignr2
redundant, DATCON Trigger/Tag part 1
const unsigned int crc32
crc32
const ubig32_t magic1
CAFExxxx , redundant.
const ubig32_t trigtag2
redundant, DATCON Trigger/Tag part 2
const ubig16_t trignr0
trignr0
bool is_SendROIs(void) const
is sendROIs
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
const ubig32_t trignr1
HLT Trigger/Tag part 1.
unsigned int get_trig_tag2(void) const
get trigtag2
unsigned int get_trig_tag1(void) const
get trigtag1
unsigned short get_run2(void) const
get run2 (from trigtag2)
bool is_fake_datcon(void) const
is fake datcon
const ubig32_t magic2
CAFExxxx, redundant.
unsigned short get_experiment1(void) const
get experiment1 (from trigtag1)
unsigned int get_trig_nr2(void) const
get trignr2
unsigned short get_experiment2(void) const
get experiment2
unsigned short get_trig_nr0(void) const
get trignr0
unsigned short get_subrun2(void) const
get subrun2 (from trigtag2)
bool is_Accepted(void) const
is accepted
unsigned short get_run1(void) const
get run1 (from trigtag1)
const ubig32_t trigtag1
HLT Trigger/Tag part 2.
DHC start frame data struct.
void print(void) const
print
const ubig16_t trigger_nr_hi
trigger_nr_hi
const dhc_frame_header_word0 word0
word0
unsigned int getFixedSize(void) const
get fixed size (byte)
const ubig16_t exp_run
exp_run
const unsigned int crc32
crc32
unsigned short get_gated_isher(void) const
get gated_isher (from word0)
const ubig16_t trigger_nr_lo
trigger_nr_lo
unsigned short get_subrun(void) const
get subrun (from run_subrun)
unsigned short getRunSubrun(void) const
get run_subrun
unsigned short get_run(void) const
get run (from run_subrun)
unsigned short get_dhc_id(void) const
get dhc_id (from word0)
const ubig16_t time_tag_hi
time_tag_hi
const ubig16_t time_tag_mid
time_tag_mid
bool isFakedData(void) const
isFakedData
unsigned short getEventNrLo(void) const
get trigger_nr_lo
unsigned short getExpRun(void) const
get exp_run
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_active_dhe_mask(void) const
get active_dhe_mask (from word0)
const ubig16_t run_subrun
run_subrun
const ubig16_t time_tag_lo_and_type
time_tag_lo_and_type
unsigned short getEventNrHi(void) const
get trigger_nr_hi