 |
Belle II Software
release-05-02-19
|
9 #ifndef POSTRAWCOPPERFORMAT_LATEST_H
10 #define POSTRAWCOPPERFORMAT_LATEST_H
18 #include <rawdata/dataobjects/RawCOPPERFormat_latest.h>
19 #include <rawdata/CRCCalculator.h>
107 unsigned int prev_eve32,
unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
117 unsigned int prev_evenum,
unsigned int* cur_evenum,
118 unsigned int prev_copper_ctr,
unsigned int* cur_copper_ctr,
119 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
132 int* detector_buf_1st,
int nwords_1st,
133 int* detector_buf_2nd,
int nwords_2nd,
134 int* detector_buf_3rd,
int nwords_3rd,
135 int* detector_buf_4th,
int nwords_4th,
141 int*
const(&detector_buf_ch)[MAX_PCIE40_CH],
142 int const(&nwords_ch)[MAX_PCIE40_CH],
151 POS_B2LHSLB_MAGIC = 0,
152 SIZE_B2LHSLB_HEADER = 1
159 SIZE_B2LFEE_HEADER = 1
164 POS_B2LFEE_ERRCNT_CRC16 = 0,
165 SIZE_B2LFEE_TRAILER = 1
172 POS_B2LHSLB_TRL_MAGIC = 0,
173 SIZE_B2LHSLB_TRAILER = 1
198 -
tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
206 sprintf(err_buf,
"[FATAL] This data format does not have COPPER counter.(block %d) Exiting...\n %s %s %d\n",
207 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
208 printf(
"%s", err_buf);
209 std::string err_str = err_buf;
throw (err_str);
216 sprintf(err_buf,
"[FATAL] This function is not supported. (block %d) Exiting...\n %s %s %d\n",
217 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
218 printf(
"%s", err_buf);
219 std::string err_str = err_buf;
throw (err_str);
226 sprintf(err_buf,
"[FATAL] This function is not supported. (block %d) Exiting...\n %s %s %d\n",
227 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
228 printf(
"%s", err_buf);
229 std::string err_str = err_buf;
throw (err_str);
240 return (
unsigned int)(
m_buffer[ pos_nwords ]);
246 return (
unsigned int)(
m_buffer[ pos_nwords ]);
253 return (
unsigned int)(
m_buffer[ pos_nwords ]);
259 if (fin_nwords > 0) {
261 - ((SIZE_B2LFEE_TRAILER - POS_B2LFEE_ERRCNT_CRC16) + SIZE_B2LHSLB_TRAILER) ;
262 return (
int)(*buf & 0xffff);
270 return (
GetFINESSEBuffer(n, finesse_num) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER);
281 - (SIZE_B2LHSLB_HEADER + SIZE_B2LHSLB_TRAILER + SIZE_B2LFEE_HEADER + SIZE_B2LFEE_TRAILER);
struct to contain header information used by RawCOPPERFormat::Packer()
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
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.
virtual unsigned int GetB2LFEE32bitEventNumber(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
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
int * GetFINESSEBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to a FINESSE buffer.
unsigned int CalcDriverChkSum(int n) OVERRIDE_CPP17
calc COPPER driver's checksum value
int GetTrlNwords()
Set magic word.
int * GetDetectorBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to detector buffer.
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
int GetFINESSENwords(int n, int finesse_num) OVERRIDE_CPP17
Get the size of a finesse buffer.
PostRawCOPPERFormat_latest()
Default constructor.
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 GetDetectorNwords(int n, int finesse_num) OVERRIDE_CPP17
get Detector buffer length
void CheckUtimeCtimeTRGType(int n) OVERRIDE_CPP17
check data contents
virtual ~PostRawCOPPERFormat_latest()
Constructor using existing pointer to raw data buffer.
unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17
get magic word of COPPER driver trailer
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