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>
108 unsigned int GetEveNo(
int n) OVERRIDE_CPP17;
122 void AddErrorBitFlag(
int n,
unsigned int error_bit_flag) OVERRIDE_CPP17;
134 unsigned int GetNodeID(
int n) OVERRIDE_CPP17;
182#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
185 void CheckB2LFEEHeaderVersion(
int n) OVERRIDE_CPP17;
194 unsigned int GetTTUtime(
int n) OVERRIDE_CPP17;
210 void GetTTTimeVal(
int n,
struct timeval* tv) OVERRIDE_CPP17;
227 std::vector<std::vector< unsigned int>>& summary_table) OVERRIDE_CPP17;
231 DATA_FORMAT_VERSION = 4
238 SIZE_COPPER_DRIVER_HEADER = 0,
239 SIZE_COPPER_DRIVER_TRAILER = 0
244 SIZE_COPPER_HEADER = 0
249 SIZE_COPPER_TRAILER = 0
256 ONLINE_REMOVED_DATA = 15
396 return MAX_PCIE40_CH;
403 if (finesse_num < 0 || finesse_num >= MAX_PCIE40_CH) {
405 sprintf(err_buf,
"[FATAL] Invalid finesse # (=%d): %s %s %d\n", finesse_num,
406 __FILE__, __PRETTY_FUNCTION__, __LINE__);
407 printf(
"[DEBUG] %s\n", err_buf);
415 if (finesse_num == (MAX_PCIE40_CH - 1)) {
421 if (nwords < 0 || nwords > 1e6) {
423 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",
426 __FILE__, __PRETTY_FUNCTION__, __LINE__);
427 printf(
"[DEBUG] %s\n", err_buf);
435 if (finesse_num >= MAX_PCIE40_CH || finesse_num < 0) {
437 sprintf(err_buf,
"[FATAL] Invalid finesse # : %s %s %d\n",
438 __FILE__, __PRETTY_FUNCTION__, __LINE__);
439 printf(
"[DEBUG] %s\n", err_buf);
448 if (m_nwords <= 0 || cur_pos >=
m_nwords) {
450 sprintf(err_buf,
"[FATAL] The position of the buffer( block %d, ch %d) is out of bounds (m_nwords = %d) : %s %s %d\n",
452 __FILE__, __PRETTY_FUNCTION__, __LINE__);
453 printf(
"[DEBUG] %s\n", err_buf);
The Raw Trailer class ver.1 ( the latest version since May, 2014 ) This class defines the format of t...
int GetMaxNumOfCh(int n) OVERRIDE_CPP17
Get the max number of channels in a readout board.
int GetTTCtime(int n) OVERRIDE_CPP17
Get ctime.
int GetEventCRCError(int n) OVERRIDE_CPP17
check CRC event Error
unsigned int GetEveNo()
get restart #(8bit)
unsigned int GetEveNo(int n) OVERRIDE_CPP17
get subrun #(8bit)
int GetTruncMask(int n) OVERRIDE_CPP17
get contents of header
int GetPacketCRCError()
Get Packet CRC error flag.
unsigned int GetErrorBitFlag(int n) OVERRIDE_CPP17
get contents of header
int GetTRGType(int n) OVERRIDE_CPP17
Get trgtype.
void AddErrorBitFlag(unsigned int error_bit_flag)
Add Detected Error bitflag.
int GetTTCtime()
get contents of header
void GetTTTimeVal(struct timeval *tv)
get contents of header
void GetTTTimeVal(int n, struct timeval *tv) OVERRIDE_CPP17
Get timeval.
int GetSubRunNo()
get run # (14bit)
int GetTrlNwords()
Set magic word.
void AddErrorBitFlag(int n, unsigned int error_bit_flag) OVERRIDE_CPP17
Add Detected Error bitflag.
unsigned int GetExpRunSubrun(int n) OVERRIDE_CPP17
get Experimental # from header
int * GetFINESSEBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to a FINESSE buffer.
int GetExpNo(int n) OVERRIDE_CPP17
get Experimental # from header
int GetDataType()
get contents of header
unsigned int GetTTUtime()
get contents of header
int GetTRGType()
get TRGType
int GetRunNo(int n) OVERRIDE_CPP17
Exp# (10bit) run# (14bit) restart # (8bit)
int GetPacketCRCError(int n) OVERRIDE_CPP17
check CRC packet Error
unsigned int GetNodeID()
get contents of header
int GetRunNo()
get contents of header
unsigned int GetTTUtime(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
unsigned int GetNodeID(int n) OVERRIDE_CPP17
get node-ID from data
int GetDataType(int n) OVERRIDE_CPP17
get contents of header
int * GetRawTrlBufPtr(int n) OVERRIDE_CPP17
get buffer pointer of rawcopper trailer
int GetFINESSENwords(int n, int finesse_num) OVERRIDE_CPP17
Get the size of a finesse buffer.
int GetTruncMask()
get contents of header
unsigned int GetErrorBitFlag()
get contents of header
int GetEventCRCError()
Get Detected Error bitflag.
unsigned int GetTTCtimeTRGType()
get contents of header
unsigned int GetTTCtimeTRGType(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
unsigned int GetExpRunSubrun()
get contents of header
int GetExpNo()
get a run/exp number combined word
int GetSubRunNo(int n) OVERRIDE_CPP17
get run # (14bit)
Abstract base class for different kinds of events.