 |
Belle II Software
release-05-02-19
|
9 #ifndef RAWCOPPERFORMAT_LATEST_H
10 #define RAWCOPPERFORMAT_LATEST_H
13 #include <rawdata/dataobjects/RawCOPPERFormat.h>
14 #include <rawdata/dataobjects/RawHeader_latest.h>
15 #include <rawdata/dataobjects/RawTrailer_latest.h>
16 #include <rawdata/CRCCalculator.h>
102 unsigned int GetEveNo(
int n) OVERRIDE_CPP17;
112 void AddErrorBitFlag(
int n,
unsigned int error_bit_flag) OVERRIDE_CPP17;
121 unsigned int GetNodeID(
int n) OVERRIDE_CPP17;
168 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
169 void CheckB2LFEEHeaderVersion(
int n) OVERRIDE_CPP17;
177 unsigned int GetTTUtime(
int n) OVERRIDE_CPP17;
190 void GetTTTimeVal(
int n,
struct timeval* tv) OVERRIDE_CPP17;
207 std::vector<std::vector< unsigned int>>& summary_table) OVERRIDE_CPP17;
211 DATA_FORMAT_VERSION = 4
218 SIZE_COPPER_DRIVER_HEADER = 0,
219 SIZE_COPPER_DRIVER_TRAILER = 0
224 SIZE_COPPER_HEADER = 0
229 SIZE_COPPER_TRAILER = 0
369 return MAX_PCIE40_CH;
376 if (finesse_num < 0 || finesse_num >= MAX_PCIE40_CH) {
378 sprintf(err_buf,
"[FATAL] Invalid finesse # (=%d): %s %s %d\n", finesse_num,
379 __FILE__, __PRETTY_FUNCTION__, __LINE__);
380 printf(
"[DEBUG] %s\n", err_buf);
388 if (finesse_num == (MAX_PCIE40_CH - 1)) {
394 if (nwords < 0 || nwords > 1e6) {
396 sprintf(err_buf,
"[FATAL] ERROR_EVENT : # of words is strange. %d (ch=%d) : eve 0x%x exp %d run %d sub %d\n %s %s %d\n",
399 __FILE__, __PRETTY_FUNCTION__, __LINE__);
400 printf(
"[DEBUG] %s\n", err_buf);
408 if (finesse_num >= MAX_PCIE40_CH || finesse_num < 0) {
410 sprintf(err_buf,
"[FATAL] Invalid finesse # : %s %s %d\n",
411 __FILE__, __PRETTY_FUNCTION__, __LINE__);
412 printf(
"[DEBUG] %s\n", err_buf);
421 if (m_nwords <= 0 || cur_pos >=
m_nwords) {
423 sprintf(err_buf,
"[FATAL] The position of the buffer( block %d, ch %d) is out of bounds (m_nwords = %d) : %s %s %d\n",
425 __FILE__, __PRETTY_FUNCTION__, __LINE__);
426 printf(
"[DEBUG] %s\n", err_buf);
int GetTRGType(int n) OVERRIDE_CPP17
Get trgtype.
int GetPacketCRCError()
Get Packet CRC error flag.
int GetDataType()
get contents of header
int GetEventCRCError(int n) OVERRIDE_CPP17
check CRC event Error
int GetRunNo()
get contents of header
int GetExpNo()
get a run/exp number combined word
int * GetRawTrlBufPtr(int n) OVERRIDE_CPP17
get buffer pointer of rawcopper trailer
int GetTRGType()
get TRGType
void GetTTTimeVal(int n, struct timeval *tv) OVERRIDE_CPP17
Get timeval.
int GetTTCtime()
get contents of header
int GetMaxNumOfCh(int n) OVERRIDE_CPP17
Get the max number of channels in a readout board.
void GetTTTimeVal(struct timeval *tv)
get contents of header
unsigned int GetNodeID(int n) OVERRIDE_CPP17
get node-ID from data
unsigned int GetTTCtimeTRGType()
get contents of header
int * GetFINESSEBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to a FINESSE buffer.
int GetTruncMask()
get contents of header
int GetTrlNwords()
Set magic word.
int GetSubRunNo()
get run # (14bit)
int GetTruncMask(int n) OVERRIDE_CPP17
get contents of header
int GetFINESSENwords(int n, int finesse_num) OVERRIDE_CPP17
Get the size of a finesse buffer.
unsigned int GetExpRunSubrun(int n) OVERRIDE_CPP17
get Experimental # from header
Abstract base class for different kinds of events.
unsigned int GetTTCtimeTRGType(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
unsigned int GetEveNo()
get restart #(8bit)
int GetPacketCRCError(int n) OVERRIDE_CPP17
check CRC packet Error
int GetExpNo(int n) OVERRIDE_CPP17
get Experimental # from header
int GetRunNo(int n) OVERRIDE_CPP17
Exp# (10bit) run# (14bit) restart # (8bit)
unsigned int GetTTUtime()
get contents of header
int GetSubRunNo(int n) OVERRIDE_CPP17
get run # (14bit)
int GetTTCtime(int n) OVERRIDE_CPP17
Get ctime.
unsigned int GetEveNo(int n) OVERRIDE_CPP17
get subrun #(8bit)
void AddErrorBitFlag(unsigned int error_bit_flag)
Add Detected Error bitflag.
unsigned int GetTTUtime(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
void AddErrorBitFlag(int n, unsigned int error_bit_flag) OVERRIDE_CPP17
Add Detected Error bitflag.
unsigned int GetErrorBitFlag(int n) OVERRIDE_CPP17
get contents of header
unsigned int GetNodeID()
get contents of header
int GetDataType(int n) OVERRIDE_CPP17
get contents of header
unsigned int GetErrorBitFlag()
get contents of header
unsigned int GetExpRunSubrun()
get contents of header
The Raw Trailer class ver.1 ( the latest version since May, 2014 ) This class defines the format of t...
int GetEventCRCError()
Get Detected Error bitflag.