9#include <rawdata/dataobjects/RawFTSWFormat_latest.h>
49 tv->tv_usec = (int)(((
double)
GetTTCtime(n)) / 127.216);
57 ts->tv_nsec = (long)(((
double)
GetTTCtime(n)) / 0.127216);
99 int ret = (buffer[ POS_INJECTION_INFO ] & INJ_HER_LER_MASK) >> INJ_HER_LER_SHIFT;
106 unsigned int* buffer = (
unsigned int*)
GetBuffer(n);
107 unsigned int ret = (buffer[ POS_INJECTION_INFO ] & INJ_TIME_MASK) >> INJ_TIME_SHIFT;
113 unsigned int* buffer = (
unsigned int*)
GetBuffer(n);
114 unsigned int ret = buffer[ POS_TIME_SINCE_PREV_TRG ];
120 unsigned int* buffer = (
unsigned int*)
GetBuffer(n);
121 unsigned int ret = (buffer[ POS_BUNCH_NUM ] & INJ_BUNCH_MASK) >> INJ_BUNCH_SHIFT;
127 unsigned int* buffer = (
unsigned int*)
GetBuffer(n);
128 unsigned int ret = buffer[ POS_FRAME_COUNT ];
134 unsigned int prev_evenum,
unsigned int* cur_evenum,
135 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no)
144 if (prev_exprunsubrun_no == *cur_exprunsubrun_no) {
145 if ((
unsigned int)(prev_evenum + 1) != *cur_evenum) {
146 sprintf(err_buf,
"[FATAL] ERROR_EVENT : Event # jump : i %d prev 0x%x cur 0x%x : Exiting...\n %s %s %d\n",
147 n, prev_evenum, *cur_evenum, __FILE__, __PRETTY_FUNCTION__, __LINE__);
148 printf(
"%s", err_buf);
155 sprintf(err_buf,
"[FATAL] ERROR_EVENT : invalid FTSW packet length : block %d nwords %d must be %d : Exiting...\n %s %s %d\n",
156 n,
GetBlockNwords(n), SIZE_FTSW_PACKET, __FILE__, __PRETTY_FUNCTION__, __LINE__);
157 printf(
"%s", err_buf);
162 sprintf(err_buf,
"[FATAL] ERROR_EVENT : invalid magic word : block %d magic word 0x%x must be 0x%x : Exiting...\n %s %s %d\n",
163 n,
GetMagicTrailer(n), FTSW_MAGIC_TRAILER, __FILE__, __PRETTY_FUNCTION__, __LINE__);
164 printf(
"%s", err_buf); fflush(stdout);
169 printf(
"[DEBUG] ========== dump a data block : block # %d==========\n", n);
173 if (k % 10 == 9) printf(
"\n[DEBUG] ");
unsigned int GetExpRunSubrun(int n) OVERRIDE_CPP17
Exp# (10bit) run# (14bit) restart # (8bit)
Abstract base class for different kinds of events.