 |
Belle II Software
release-05-01-25
|
9 #ifndef POSTRAWCOPPERFORMAT_LATEST_H
10 #define POSTRAWCOPPERFORMAT_LATEST_H
18 #include <rawdata/dataobjects/RawCOPPERFormat_latest.h>
19 #include <rawdata/CRCCalculator.h>
25 #define POST_RAWCOPPER_FORMAT_VER1 1
127 unsigned int prev_eve32,
unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
137 unsigned int prev_evenum,
unsigned int* cur_evenum,
138 unsigned int prev_copper_ctr,
unsigned int* cur_copper_ctr,
139 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
152 int* detector_buf_1st,
int nwords_1st,
153 int* detector_buf_2nd,
int nwords_2nd,
154 int* detector_buf_3rd,
int nwords_3rd,
155 int* detector_buf_4th,
int nwords_4th,
164 SIZE_COPPER_DRIVER_HEADER = 0,
165 SIZE_COPPER_DRIVER_TRAILER = 0
170 SIZE_COPPER_HEADER = 0
175 SIZE_COPPER_TRAILER = 0
180 POS_B2LHSLB_MAGIC = 0,
181 SIZE_B2LHSLB_HEADER = 1
188 SIZE_B2LFEE_HEADER = 1
193 POS_B2LFEE_ERRCNT_CRC16 = 0,
194 SIZE_B2LFEE_TRAILER = 1
201 SIZE_B2LHSLB_TRAILER = 0
220 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
221 CheckB2LFEEHeaderVersion(n);
232 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
233 CheckB2LFEEHeaderVersion(n);
244 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
245 CheckB2LFEEHeaderVersion(n);
256 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
257 CheckB2LFEEHeaderVersion(n);
280 -
tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
288 sprintf(err_buf,
"[FATAL] This data format does not have COPPER counter.(block %d) Exiting...\n %s %s %d\n",
289 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
290 printf(
"%s", err_buf);
291 std::string err_str = err_buf;
throw (err_str);
298 sprintf(err_buf,
"[FATAL] This function is not supported. (block %d) Exiting...\n %s %s %d\n",
299 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
300 printf(
"%s", err_buf);
301 std::string err_str = err_buf;
throw (err_str);
308 sprintf(err_buf,
"[FATAL] This function is not supported. (block %d) Exiting...\n %s %s %d\n",
309 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
310 printf(
"%s", err_buf);
311 std::string err_str = err_buf;
throw (err_str);
322 return (
unsigned int)(
m_buffer[ pos_nwords ]);
328 return (
unsigned int)(
m_buffer[ pos_nwords ]);
335 return (
unsigned int)(
m_buffer[ pos_nwords ]);
341 if (fin_nwords > 0) {
343 - ((SIZE_B2LFEE_TRAILER - POS_B2LFEE_ERRCNT_CRC16) + SIZE_B2LHSLB_TRAILER) ;
344 return (
int)(*buf & 0xffff);
struct to contain header information used by RawCOPPERFormat::Packer()
virtual int GetOffset3rdFINESSE(int n)
get # of offset words for FINESSE slot C buffer position
unsigned int GetMagicFPGATrailer(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA trailer
int * PackDetectorBuf(int *packed_buf_nwords, int *detector_buf_1st, int nwords_1st, int *detector_buf_2nd, int nwords_2nd, int *detector_buf_3rd, int nwords_3rd, int *detector_buf_4th, int nwords_4th, RawCOPPERPackerInfo rawcprpacker_info) OVERRIDE_CPP17
Pack data (format ver. = -1 -> Select the latest format version)
int CheckCRC16(int n, int finesse_num)
check magic words
int GetOffset1stFINESSE(int n) OVERRIDE_CPP17
get # of offset words for FINESSE slot A buffer position
int GetFINESSENwords(int n, int finesse) OVERRIDE_CPP17
get data size of FINESSE buffer
int Get1stFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot A buffer
bool CheckCOPPERMagic(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
void CheckData(int n, unsigned int prev_evenum, unsigned int *cur_evenum, unsigned int prev_copper_ctr, unsigned int *cur_copper_ctr, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no) OVERRIDE_CPP17
check data contents
The Raw COPPER class ver.1 ( the latest version since May, 2014 ) This class stores data received by ...
virtual unsigned int GetB2LFEE32bitEventNumber(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
virtual int GetOffset2ndFINESSE(int n)
get # of offset words for FINESSE slot B buffer position
int * Get2ndDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot B
virtual int * GetExpRunSubrunBuf(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17
read COPPER driver's checksum value
unsigned int CalcDriverChkSum(int n) OVERRIDE_CPP17
calc COPPER driver's checksum value
int GetDetectorNwords(int n, int finesse_num) OVERRIDE_CPP17
get Detector buffer length
int GetTrlNwords()
Set magic word.
int CheckB2LHSLBMagicWords(int *finesse_buf, int finesse_nwords)
check magic words
int GetEventCRC16Value(int n, int finesse_num) OVERRIDE_CPP17
Get CRC16 value for an event.
unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17
get magic word of COPPER driver header
PostRawCOPPERFormat_latest()
Default constructor.
virtual int GetOffset4thFINESSE(int n)
get # of offset words for FINESSE slot D buffer position
unsigned int GetMagicFPGAHeader(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA header
unsigned int GetTrailerChksum(int n) OVERRIDE_CPP17
Get checksum in RawTrailer.
Abstract base class for different kinds of events.
int * Get3rdDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot C
void CheckUtimeCtimeTRGType(int n) OVERRIDE_CPP17
check data contents
virtual ~PostRawCOPPERFormat_latest()
Constructor using existing pointer to raw data buffer.
int Get4thFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot D buffer
unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17
get magic word of COPPER driver trailer
int Get3rdFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot C buffer
int Get2ndFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot B buffer
int * Get4thDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot D
unsigned int GetCOPPERCounter(int n) OVERRIDE_CPP17
get posistion of COPPER block in unit of word
unsigned int FillTopBlockRawHeader(unsigned int m_node_id, unsigned int prev_eve32, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no) OVERRIDE_CPP17
should be called by DeSerializerCOPPER.cc and fill contents in RawHeader
int * Get1stDetectorBuffer(int n) OVERRIDE_CPP17
get Detector buffer of slot A