9#ifndef PRERAWCOPPERFORMAT_LATEST_H
10#define PRERAWCOPPERFORMAT_LATEST_H
13#include <rawdata/dataobjects/PostRawCOPPERFormat_latest.h>
14#include <rawdata/CRCCalculator.h>
109 unsigned int prev_eve32,
unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
122 unsigned int prev_evenum,
unsigned int* cur_evenum,
123 unsigned int prev_copper_ctr,
unsigned int* cur_copper_ctr,
124 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
138 void CopyReducedData(
int* bufin,
int nwords,
int num_events,
int num_nodes,
int* buf_to,
int* nwords_to);
153 int* detector_buf_1st,
int nwords_1st,
154 int* detector_buf_2nd,
int nwords_2nd,
155 int* detector_buf_3rd,
int nwords_3rd,
156 int* detector_buf_4th,
int nwords_4th,
162 int*
const(&detector_buf_ch)[MAX_PCIE40_CH],
163 int const(&nwords_ch)[MAX_PCIE40_CH],
179 POS_MAGIC_B2LHSLB = 0,
181 SIZE_B2LHSLB_HEADER = 1
187 POS_TT_CTIME_TYPE = 0,
192 SIZE_B2LFEE_HEADER = 5
200 POS_TT_CTIME_B2LFEE = 0,
201 POS_CHKSUM_B2LFEE = 1,
202 SIZE_B2LFEE_TRAILER = 2
210 POS_CHKSUM_B2LHSLB = 0,
211 SIZE_B2LHSLB_TRAILER = 1
218 B2LHSLB_HEADER_MAGIC = 0xFFAA0000,
219 B2LHSLB_TRAILER_MAGIC = 0xFF550000
234#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
235 CheckB2LFEEHeaderVersion(n);
246 sprintf(err_buf,
"[FATAL] This function is not supported. Exiting...: \n%s %s %d\n",
247 __FILE__, __PRETTY_FUNCTION__, __LINE__);
248 printf(
"[DEBUG] %s\n", err_buf);
256 sprintf(err_buf,
"[FATAL] This function is not supported. Exiting...: \n%s %s %d\n",
257 __FILE__, __PRETTY_FUNCTION__, __LINE__);
258 printf(
"[DEBUG] %s\n", err_buf);
269 return (
unsigned int)(
m_buffer[ pos_nwords ]);
275 return (
unsigned int)(
m_buffer[ pos_nwords ]);
282 -
tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
290 sprintf(err_buf,
"[FATAL] This function is not supported. Exiting...: \n%s %s %d\n",
291 __FILE__, __PRETTY_FUNCTION__, __LINE__);
292 printf(
"[DEBUG] %s\n", err_buf);
300 return (
unsigned int)(
m_buffer[ pos_nwords ]);
306 return (
GetFINESSEBuffer(n, finesse_num) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER);
316 - (
static_cast<int>(SIZE_B2LHSLB_HEADER) + SIZE_B2LHSLB_TRAILER + SIZE_B2LFEE_HEADER + SIZE_B2LFEE_TRAILER);
325 + (
GetFINESSENwords(n, finesse_num) - SIZE_B2LHSLB_TRAILER + POS_MAGIC_B2LHSLB);
326 if (*buf & (1 << ONLINE_REMOVED_DATA)) {
return true; }
The Raw COPPER class ver.
struct to contain header information used by RawCOPPERFormat::Packer()
unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17
read COPPER driver's checksum value
unsigned int GetCOPPERCounter(int n) OVERRIDE_CPP17
get posistion of COPPER block in unit of word
unsigned int GetMagicFPGATrailer(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA trailer
unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17
get magic word of COPPER driver trailer
int GetTrlNwords()
Set magic word.
int * GetDetectorBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to detector buffer.
unsigned int GetMagicFPGAHeader(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA header
int * GetFINESSEBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to a FINESSE buffer.
unsigned int GetTrailerChksum(int n) OVERRIDE_CPP17
get a checksum on trailer
virtual int * GetExpRunSubrunBuf(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
int GetDetectorNwords(int n, int finesse_num) OVERRIDE_CPP17
get Detector buffer length
int GetFINESSENwords(int n, int finesse_num) OVERRIDE_CPP17
Get the size of a finesse buffer.
unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17
get magic word of COPPER driver header
bool CheckOnlineRemovedDataBit(int n, int finesse_num) OVERRIDE_CPP17
check if this channel's data has been removed on a readout PC for CDC online "masking" True : data co...
Abstract base class for different kinds of events.