Belle II Software development
|
The Raw COPPER class ver. More...
#include <PostRawCOPPERFormat_latest.h>
Public Types | |
enum | { POS_B2LHSLB_MAGIC = 0 , SIZE_B2LHSLB_HEADER = 1 } |
enum | { POS_B2L_CTIME = 0 , SIZE_B2LFEE_HEADER = 1 } |
enum | { POS_B2LFEE_ERRCNT_CRC16 = 0 , SIZE_B2LFEE_TRAILER = 1 } |
enum | { POS_B2LHSLB_TRL_MAGIC = 0 , SIZE_B2LHSLB_TRAILER = 1 } |
enum | { DATA_FORMAT_VERSION = 4 } |
Format version number. More... | |
enum | { SIZE_COPPER_DRIVER_HEADER = 0 , SIZE_COPPER_DRIVER_TRAILER = 0 } |
enum | { SIZE_COPPER_HEADER = 0 } |
enum | { SIZE_COPPER_TRAILER = 0 } |
enum | { ONLINE_REMOVED_DATA = 15 } |
enum | { POS_NWORDS = 0 , POS_NODE_ID = 6 } |
enum | { POS_FTSW_ID_OLD = 5 , TEMP_POS_NWORDS_HEADER = 1 , OLD_FTSW_NWORDS_HEADER = 6 } |
Public Member Functions | |
PostRawCOPPERFormat_latest () | |
Default constructor. | |
virtual | ~PostRawCOPPERFormat_latest () |
Constructor using existing pointer to raw data buffer. | |
int | GetDetectorNwords (int n, int finesse_num) OVERRIDE_CPP17 |
get Detector buffer length | |
unsigned int | GetCOPPERCounter (int n) OVERRIDE_CPP17 |
get posistion of COPPER block in unit of word | |
virtual int * | GetExpRunSubrunBuf (int n) OVERRIDE_CPP17 |
get b2l block from "FEE b2link header" | |
virtual unsigned int | GetB2LFEE32bitEventNumber (int n) OVERRIDE_CPP17 |
get b2l block from "FEE b2link header" | |
unsigned int | GetMagicDriverHeader (int n) OVERRIDE_CPP17 |
get magic word of COPPER driver header | |
unsigned int | GetMagicFPGAHeader (int n) OVERRIDE_CPP17 |
get magic word of COPPER FPGA header | |
unsigned int | GetMagicFPGATrailer (int n) OVERRIDE_CPP17 |
get magic word of COPPER FPGA trailer | |
unsigned int | GetMagicDriverTrailer (int n) OVERRIDE_CPP17 |
get magic word of COPPER driver trailer | |
unsigned int | GetTrailerChksum (int n) OVERRIDE_CPP17 |
Get checksum in RawTrailer. | |
int | GetEventCRC16Value (int n, int finesse_num) OVERRIDE_CPP17 |
Get CRC16 value for an event. | |
bool | CheckCOPPERMagic (int n) OVERRIDE_CPP17 |
Check if COPPER Magic words are correct. | |
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 | |
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 | |
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 | |
void | CheckUtimeCtimeTRGType (int n) OVERRIDE_CPP17 |
check data contents | |
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) | |
int * | PackDetectorBuf (int *packed_buf_nwords, int *const(&detector_buf_ch)[MAX_PCIE40_CH], int const(&nwords_ch)[MAX_PCIE40_CH], RawCOPPERPackerInfo rawcpr_info) OVERRIDE_CPP17 |
Pack data for PCIe40 data-format. | |
int * | GetDetectorBuffer (int n, int finesse_num) OVERRIDE_CPP17 |
Get a pointer to detector buffer. | |
bool | CheckOnlineRemovedDataBit (int n, int finesse_num) OVERRIDE_CPP17 |
check if this channel's data has been removed on a readout PC for CDC online "masking" True : data contents was removed on a readout PC | |
int | Get1stDetectorNwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector buffer length of slot A | |
int | Get2ndDetectorNwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector buffer length of slot B | |
int | Get3rdDetectorNwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector buffer length of slot C | |
int | Get4thDetectorNwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector buffer length of slot D | |
int * | Get1stDetectorBuffer (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector buffer of slot A | |
int * | Get2ndDetectorBuffer (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector Buffer of slot B | |
int * | Get3rdDetectorBuffer (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector Buffer of slot C | |
int * | Get4thDetectorBuffer (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get Detector Buffer of slot D | |
int * | GetRawTrlBufPtr (int n) OVERRIDE_CPP17 |
get buffer pointer of rawcopper trailer | |
int | GetExpNo (int n) OVERRIDE_CPP17 |
get Experimental # from header | |
unsigned int | GetExpRunSubrun (int n) OVERRIDE_CPP17 |
get Experimental # from header | |
int | GetRunNo (int n) OVERRIDE_CPP17 |
Exp# (10bit) run# (14bit) restart # (8bit) | |
int | GetSubRunNo (int n) OVERRIDE_CPP17 |
get run # (14bit) | |
unsigned int | GetEveNo (int n) OVERRIDE_CPP17 |
get subrun #(8bit) | |
int | GetDataType (int n) OVERRIDE_CPP17 |
get contents of header | |
int | GetTruncMask (int n) OVERRIDE_CPP17 |
get contents of header | |
unsigned int | GetErrorBitFlag (int n) OVERRIDE_CPP17 |
get contents of header | |
void | AddErrorBitFlag (int n, unsigned int error_bit_flag) OVERRIDE_CPP17 |
Add Detected Error bitflag. | |
int | GetPacketCRCError (int n) OVERRIDE_CPP17 |
check CRC packet Error | |
int | GetEventCRCError (int n) OVERRIDE_CPP17 |
check CRC event Error | |
unsigned int | GetNodeID (int n) OVERRIDE_CPP17 |
get node-ID from data | |
virtual int | GetNumFINESSEBlock (int n) OVERRIDE_CPP17 |
get # of FINNESEs which contains data | |
int | Get1stFINESSENwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get data size of FINESSE slot A buffer | |
int | Get2ndFINESSENwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get data size of FINESSE slot B buffer | |
int | Get3rdFINESSENwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get data size of FINESSE slot C buffer | |
int | Get4thFINESSENwords (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get data size of FINESSE slot D buffer | |
int | GetOffset1stFINESSE (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get # of offset words for FINESSE slot A buffer position | |
int | GetOffset2ndFINESSE (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get # of offset words for FINESSE slot B buffer position | |
int | GetOffset3rdFINESSE (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get # of offset words for FINESSE slot C buffer position | |
int | GetOffset4thFINESSE (int n) OVERRIDE_CPP17 FINAL_CPP17 |
get # of offset words for FINESSE slot D buffer position | |
unsigned int | GetTTCtimeTRGType (int n) OVERRIDE_CPP17 |
get b2l block from "FEE b2link header" | |
unsigned int | GetTTUtime (int n) OVERRIDE_CPP17 |
Check if COPPER Magic words are correct. | |
int | GetTTCtime (int n) OVERRIDE_CPP17 |
Get ctime. | |
int | GetTRGType (int n) OVERRIDE_CPP17 |
Get trgtype. | |
void | GetTTTimeVal (int n, struct timeval *tv) OVERRIDE_CPP17 |
Get timeval. | |
int | GetMaxNumOfCh (int n) OVERRIDE_CPP17 |
Get the max number of channels in a readout board. | |
int * | GetFINESSEBuffer (int n, int finesse_num) OVERRIDE_CPP17 |
Get a pointer to a FINESSE buffer. | |
int | GetFINESSENwords (int n, int finesse_num) OVERRIDE_CPP17 |
Get the size of a finesse buffer. | |
void | CompareHeaderValue (int n, const unsigned int(&input_val)[MAX_PCIE40_CH], std::vector< std::vector< unsigned int > > &summary_table) OVERRIDE_CPP17 |
Check header value of all channels. | |
virtual int * | GetRawHdrBufPtr (int n) |
get buffer pointer of rawcopper header(Currently same as GetBufferPos) | |
virtual int * | Get1stFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot A | |
virtual int * | Get2ndFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot B | |
virtual int * | Get3rdFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot C | |
virtual int * | Get4thFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot D | |
virtual int | GetOffsetFINESSE (int n, int finesse) |
get # of offset words | |
virtual unsigned int | CalcXORChecksum (int *buf, int nwords) |
calc XOR checksum | |
virtual void | GetNodeName (int n, char *node_name, int bufsize) |
Get hostname of a node from the RawCOPPER header. | |
virtual void | GetNodeName (char *node_name, unsigned int node_id, int bufsize) |
Get hostname of a node from an argument. | |
virtual void | SetBuffer (int *bufin, int nwords, int delete_flag, int num_events, int num_nodes) |
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer ) | |
virtual int | TotalBufNwords () |
Get total length of m_buffer. | |
virtual int | GetBufferPos (int n) |
get position of data block in word | |
virtual int * | GetBuffer (int n) |
get nth buffer pointer | |
virtual int * | GetWholeBuffer () |
get pointer to buffer(m_buffer) | |
virtual int | GetNumEntries () |
get # of data blocks = (# of nodes)*(# of events) | |
virtual int | GetNumNodes () |
get # of data sources(e.g. # of COPPER boards) in m_buffer | |
virtual int | GetNumEvents () |
get # of events in m_buffer | |
virtual int | GetPreAllocFlag () |
get malloc_flag | |
virtual int | GetBlockNwords (int n) |
get size of a data block | |
virtual int | CheckFTSWID (int n) |
get FTSW ID to check whether this data block is FTSW data or not | |
virtual int | CheckTLUID (int n) |
get FTSW ID to check whether this data block is FTSW data or not | |
virtual void | CopyBlock (int n, int *buf_to) |
Copy one datablock to buffer. | |
virtual void | PrintData (int *buf, int nwords) |
print data | |
Public Attributes | |
RawHeader_latest | tmp_header |
header ( not recorded ) | |
RawTrailer_latest | tmp_trailer |
trailer ( not recorded ) | |
Protected Attributes | |
int | m_nwords |
number of words of buffer | |
int | m_num_nodes |
number of nodes in this object | |
int | m_num_events |
number of events in this object | |
int * | m_buffer |
Buffer. | |
int | m_use_prealloc_buf |
not recorded | |
The Raw COPPER class ver.
4 (the 1st ver. for PCIe40 data format) This class stores data received by PCIe40 via belle2linkt Data from all detectors except PXD are stored in this class
Definition at line 37 of file PostRawCOPPERFormat_latest.h.
anonymous enum |
Definition at line 172 of file PostRawCOPPERFormat_latest.h.
anonymous enum |
Definition at line 179 of file PostRawCOPPERFormat_latest.h.
anonymous enum |
Definition at line 185 of file PostRawCOPPERFormat_latest.h.
anonymous enum |
Definition at line 193 of file PostRawCOPPERFormat_latest.h.
|
inherited |
Format version number.
Definition at line 230 of file RawCOPPERFormat_latest.h.
|
inherited |
Definition at line 237 of file RawCOPPERFormat_latest.h.
|
inherited |
Definition at line 243 of file RawCOPPERFormat_latest.h.
|
inherited |
Definition at line 248 of file RawCOPPERFormat_latest.h.
|
inherited |
Definition at line 255 of file RawCOPPERFormat_latest.h.
|
inherited |
Definition at line 75 of file RawDataBlockFormat.h.
|
inherited |
Definition at line 80 of file RawDataBlockFormat.h.
|
virtual |
Constructor using existing pointer to raw data buffer.
Destructor
Definition at line 23 of file PostRawCOPPERFormat_latest.cc.
|
virtual |
calc COPPER driver's checksum value
Implements RawCOPPERFormat.
Definition at line 27 of file PostRawCOPPERFormat_latest.cc.
|
virtualinherited |
calc XOR checksum
Definition at line 24 of file RawCOPPERFormat.cc.
int CheckB2LHSLBMagicWords | ( | int * | finesse_buf, |
int | finesse_nwords | ||
) |
check magic words
Definition at line 152 of file PostRawCOPPERFormat_latest.cc.
|
virtual |
Check if COPPER Magic words are correct.
Implements RawCOPPERFormat.
Definition at line 113 of file PostRawCOPPERFormat_latest.cc.
int CheckCRC16 | ( | int | n, |
int | finesse_num | ||
) |
check magic words
Definition at line 162 of file PostRawCOPPERFormat_latest.cc.
|
virtual |
check data contents
Implements RawCOPPERFormat.
Definition at line 59 of file PostRawCOPPERFormat_latest.cc.
|
virtualinherited |
get FTSW ID to check whether this data block is FTSW data or not
Definition at line 73 of file RawDataBlockFormat.cc.
|
virtualinherited |
get FTSW ID to check whether this data block is FTSW data or not
Definition at line 88 of file RawDataBlockFormat.cc.
|
virtual |
check data contents
Implements RawCOPPERFormat.
Definition at line 129 of file PostRawCOPPERFormat_latest.cc.
|
virtualinherited |
Check header value of all channels.
Reimplemented from RawCOPPERFormat.
Definition at line 256 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
Copy one datablock to buffer.
Definition at line 173 of file RawDataBlockFormat.cc.
|
virtual |
should be called by DeSerializerCOPPER.cc and fill contents in RawHeader
Implements RawCOPPERFormat.
Definition at line 138 of file PostRawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector buffer of slot A
Implements RawCOPPERFormat.
Definition at line 174 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector buffer length of slot A
Implements RawCOPPERFormat.
Definition at line 92 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get data size of FINESSE slot A buffer
Implements RawCOPPERFormat.
Definition at line 133 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector Buffer of slot B
Implements RawCOPPERFormat.
Definition at line 184 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector buffer length of slot B
Implements RawCOPPERFormat.
Definition at line 102 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get data size of FINESSE slot B buffer
Implements RawCOPPERFormat.
Definition at line 143 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector Buffer of slot C
Implements RawCOPPERFormat.
Definition at line 194 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector buffer length of slot C
Implements RawCOPPERFormat.
Definition at line 112 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get data size of FINESSE slot C buffer
Implements RawCOPPERFormat.
Definition at line 153 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector Buffer of slot D
Implements RawCOPPERFormat.
Definition at line 204 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get Detector buffer length of slot D
Implements RawCOPPERFormat.
Definition at line 122 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get data size of FINESSE slot D buffer
Implements RawCOPPERFormat.
Definition at line 163 of file RawCOPPERFormat_latest.cc.
|
virtual |
get b2l block from "FEE b2link header"
Implements RawCOPPERFormat.
Definition at line 41 of file PostRawCOPPERFormat_latest.cc.
|
virtualinherited |
get size of a data block
Definition at line 107 of file RawDataBlockFormat.cc.
|
virtualinherited |
get nth buffer pointer
Definition at line 124 of file RawDataBlockFormat.cc.
|
virtualinherited |
get position of data block in word
Definition at line 30 of file RawDataBlockFormat.cc.
|
virtualinherited |
Get hostname of a node from an argument.
Definition at line 200 of file RawCOPPERFormat.cc.
|
virtualinherited |
Get hostname of a node from the RawCOPPER header.
Definition at line 182 of file RawCOPPERFormat.cc.
|
inlinevirtualinherited |
get # of data blocks = (# of nodes)*(# of events)
Definition at line 49 of file RawDataBlockFormat.h.
|
inlinevirtualinherited |
|
virtualinherited |
get # of FINNESEs which contains data
Implements RawCOPPERFormat.
Definition at line 30 of file RawCOPPERFormat_latest.cc.
|
inlinevirtualinherited |
get # of data sources(e.g. # of COPPER boards) in m_buffer
Definition at line 52 of file RawDataBlockFormat.h.
|
virtualinherited |
get # of offset words for FINESSE slot A buffer position
Implements RawCOPPERFormat.
Definition at line 214 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get # of offset words for FINESSE slot B buffer position
Reimplemented from RawCOPPERFormat.
Definition at line 225 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get # of offset words for FINESSE slot C buffer position
Reimplemented from RawCOPPERFormat.
Definition at line 236 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get # of offset words for FINESSE slot D buffer position
Reimplemented from RawCOPPERFormat.
Definition at line 246 of file RawCOPPERFormat_latest.cc.
|
virtualinherited |
get # of offset words
Definition at line 36 of file RawCOPPERFormat.cc.
|
inlinevirtualinherited |
get malloc_flag
Definition at line 58 of file RawDataBlockFormat.h.
|
virtualinherited |
get pointer to buffer(m_buffer)
Definition at line 119 of file RawDataBlockFormat.cc.
|
virtual |
Pack data for PCIe40 data-format.
Reimplemented from RawCOPPERFormat.
Definition at line 295 of file PostRawCOPPERFormat_latest.cc.
|
virtual |
Pack data (format ver. = -1 -> Select the latest format version)
Implements RawCOPPERFormat.
Definition at line 278 of file PostRawCOPPERFormat_latest.cc.
|
virtualinherited |
print data
Definition at line 161 of file RawDataBlockFormat.cc.
|
virtualinherited |
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer )
Definition at line 131 of file RawDataBlockFormat.cc.
|
virtualinherited |
Get total length of m_buffer.
Definition at line 101 of file RawDataBlockFormat.cc.
|
protectedinherited |
Definition at line 98 of file RawDataBlockFormat.h.
|
protectedinherited |
number of events in this object
Definition at line 95 of file RawDataBlockFormat.h.
|
protectedinherited |
number of nodes in this object
Definition at line 92 of file RawDataBlockFormat.h.
|
protectedinherited |
number of words of buffer
Definition at line 89 of file RawDataBlockFormat.h.
|
protectedinherited |
not recorded
flag for deleting m_buffer in destructer( 0:delete, 1: not delete) When using pre-allocated buffer, the buffer should be reused and not deleted in the destructer
Definition at line 102 of file RawDataBlockFormat.h.
|
inherited |
header ( not recorded )
Definition at line 260 of file RawCOPPERFormat_latest.h.
|
inherited |
trailer ( not recorded )
Definition at line 263 of file RawCOPPERFormat_latest.h.