9#ifndef POSTRAWCOPPERFORMAT_V1_H
10#define POSTRAWCOPPERFORMAT_V1_H
16#include <rawdata/dataobjects/RawCOPPERFormat_v1.h>
17#include <rawdata/CRCCalculator.h>
133 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
146 unsigned int prev_evenum,
unsigned int* cur_evenum,
147 unsigned int prev_copper_ctr,
unsigned int* cur_copper_ctr,
148 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
163 int* detector_buf_1st,
int nwords_1st,
164 int* detector_buf_2nd,
int nwords_2nd,
165 int* detector_buf_3rd,
int nwords_3rd,
166 int* detector_buf_4th,
int nwords_4th,
175 SIZE_COPPER_DRIVER_HEADER = 0,
176 SIZE_COPPER_DRIVER_TRAILER = 0
181 SIZE_COPPER_HEADER = 0
186 SIZE_COPPER_TRAILER = 0
191 POS_B2LHSLB_MAGIC = 0,
192 SIZE_B2LHSLB_HEADER = 1
199 SIZE_B2LFEE_HEADER = 1
204 POS_B2LFEE_CRC16 = 0,
205 SIZE_B2LFEE_TRAILER = 1
212 SIZE_B2LHSLB_TRAILER = 0
231#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
232 CheckB2LFEEHeaderVersion(n);
243#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
244 CheckB2LFEEHeaderVersion(n);
255#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
256 CheckB2LFEEHeaderVersion(n);
267#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
268 CheckB2LFEEHeaderVersion(n);
291 -
tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
299 sprintf(err_buf,
"This data format does not have COPPER counter.(block %d) Exiting...\n %s %s %d\n",
300 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
301 std::string err_str = err_buf;
throw (err_str);
308 sprintf(err_buf,
"This function is not supported. (block %d) Exiting...\n %s %s %d\n",
309 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
310 std::string err_str = err_buf;
throw (err_str);
317 sprintf(err_buf,
"This function is not supported. (block %d) Exiting...\n %s %s %d\n",
318 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
319 std::string err_str = err_buf;
throw (err_str);
330 return (
unsigned int)(
m_buffer[ pos_nwords ]);
336 return (
unsigned int)(
m_buffer[ pos_nwords ]);
343 return (
unsigned int)(
m_buffer[ pos_nwords ]);
The Raw COPPER class ver.1 ( the latest version since May, 2014 ) This class stores data received by ...
int CheckB2LHSLBMagicWords(int *finesse_buf, int finesse_nwords)
check magic words
int CheckCRC16(int n, int finesse_num)
check magic words
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)
void CheckUtimeCtimeTRGType(int n) OVERRIDE_CPP17
check data contents
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
virtual unsigned int GetB2LFEE32bitEventNumber(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
virtual ~PostRawCOPPERFormat_v1()
Constructor using existing pointer to raw data buffer.
int GetDetectorNwords(int n, int finesse_num) OVERRIDE_CPP17
get Detector buffer length
bool CheckCOPPERMagic(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
unsigned int CalcDriverChkSum(int n) OVERRIDE_CPP17
calc COPPER driver's checksum value
PostRawCOPPERFormat_v1()
Default constructor.
int GetFINESSENwords(int n, int finesse) OVERRIDE_CPP17
get data size of FINESSE buffer
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
struct to contain header information used by RawCOPPERFormat::Packer()
int Get3rdFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot C buffer
unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17
read COPPER driver's checksum value
int GetOffset1stFINESSE(int n) OVERRIDE_CPP17
get # of offset words for FINESSE slot A buffer position
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
int Get1stFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot A buffer
unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17
get magic word of COPPER driver trailer
int * Get2ndDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot B
virtual int GetOffset2ndFINESSE(int n)
get # of offset words for FINESSE slot B buffer position
int GetTrlNwords()
Set magic word.
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.
int * Get4thDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot D
int Get4thFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot D buffer
virtual int GetOffset4thFINESSE(int n)
get # of offset words for FINESSE slot D buffer position
virtual int GetOffset3rdFINESSE(int n)
get # of offset words for FINESSE slot C buffer position
virtual int * GetExpRunSubrunBuf(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
int * Get3rdDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot C
unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17
get magic word of COPPER driver header
int * Get1stDetectorBuffer(int n) OVERRIDE_CPP17
get Detector buffer of slot A
int Get2ndFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot B buffer
Abstract base class for different kinds of events.