![]() |
Belle II Software development
|
The Raw COPPER class This class stores data received by COPPER via belle2linkt Data from all detectors except PXD are stored in this class. More...
#include <RawCOPPER.h>
Public Types | |
enum | { POS_FORMAT_VERSION = 1 , FORMAT_MASK = 0x0000FF00 } |
Public Member Functions | |
RawCOPPER () | |
Default constructor. | |
virtual | ~RawCOPPER () |
Constructor using existing pointer to raw data buffer. | |
void | SetBuffer (int *bufin, int nwords, int delete_flag, int num_events, int num_nodes) OVERRIDE_CPP17 |
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer ) | |
int | GetDetectorNwords (int n, int finesse_num) |
get Detector buffer length | |
int | Get1stDetectorNwords (int n) |
get Detector buffer length of slot A | |
int | Get2ndDetectorNwords (int n) |
get Detector buffer length of slot B | |
int | Get3rdDetectorNwords (int n) |
get Detector buffer length of slot C | |
int | Get4thDetectorNwords (int n) |
get Detector buffer length of slot D | |
int * | GetDetectorBuffer (int n, int finesse_num) |
get Detector buffer | |
int * | Get1stDetectorBuffer (int n) |
get Detector buffer of slot A | |
int * | Get2ndDetectorBuffer (int n) |
get Detector Buffer of slot B | |
int * | Get3rdDetectorBuffer (int n) |
get Detector Buffer of slot C | |
int * | Get4thDetectorBuffer (int n) |
get Detector Buffer of slot D | |
virtual int | GetBufferPos (int n) OVERRIDE_CPP17 |
get posistion of COPPER block in unit of word | |
virtual int * | GetRawHdrBufPtr (int n) |
get buffer pointer of rawcopper header(Currently same as GetBufferPos) | |
virtual int * | GetRawTrlBufPtr (int n) |
get buffer pointer of rawcopper trailer | |
int * | GetFINESSEBuffer (int n, int finesse_num) |
get FINESSE buffer pointer | |
int * | Get1stFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot A | |
int * | Get2ndFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot B | |
int * | Get3rdFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot C | |
int * | Get4thFINESSEBuffer (int n) |
get FINESSE buffer pointer for slot D | |
int | GetExpNo (int n) |
get Experimental # from header | |
unsigned int | GetExpRunSubrun (int n) |
get Experimental # from header | |
int | GetRunNo (int n) |
Exp# (10bit) run# (14bit) restart # (8bit) | |
int | GetSubRunNo (int n) |
get run # (14bit) | |
unsigned int | GetEveNo (int n) |
get subrun #(8bit) | |
int | GetDataType (int n) |
get contents of header | |
int | GetTruncMask (int n) |
get contents of header | |
unsigned int | GetErrorBitFlag (int n) |
get contents of header | |
void | AddErrorBitFlag (int n, unsigned int error_bit_flag) |
Get Detected Error bitflag. | |
int | GetPacketCRCError (int n) |
check CRC packet Error | |
int | GetEventCRCError (int n) |
check CRC event Error | |
int | GetEventCRC16Value (int n, int finesse_num) |
Get Event CRC16 value. | |
unsigned int | GetNodeID (int n) |
get node-ID from data | |
virtual unsigned int | GetCOPPERCounter (int n) |
get COPPER counter(not event number) | |
virtual int | GetNumFINESSEBlock (int n) |
get # of FINNESEs which contains data | |
int | GetOffsetFINESSE (int n, int finesse) |
get # of offset words | |
int | GetOffset1stFINESSE (int n) |
get # of offset words for FINESSE slot A buffer position | |
int | GetOffset2ndFINESSE (int n) |
get # of offset words for FINESSE slot B buffer position | |
int | GetOffset3rdFINESSE (int n) |
get # of offset words for FINESSE slot C buffer position | |
int | GetOffset4thFINESSE (int n) |
get # of offset words for FINESSE slot D buffer position | |
int | GetFINESSENwords (int n, int finesse) |
get data size of FINESSE buffer | |
int | Get1stFINESSENwords (int n) |
get data size of FINESSE slot A buffer | |
int | Get2ndFINESSENwords (int n) |
get data size of FINESSE slot B buffer | |
int | Get3rdFINESSENwords (int n) |
get data size of FINESSE slot C buffer | |
int | Get4thFINESSENwords (int n) |
get data size of FINESSE slot D buffer | |
virtual int * | GetExpRunSubrunBuf (int n) |
get b2l block from "FEE b2link header" | |
virtual unsigned int | GetB2LFEE32bitEventNumber (int n) |
get b2l block from "FEE b2link header" | |
unsigned int | GetMagicDriverHeader (int n) |
get magic word of COPPER driver header | |
unsigned int | GetMagicFPGAHeader (int n) |
get magic word of COPPER FPGA header | |
unsigned int | GetMagicFPGATrailer (int n) |
get magic word of COPPER FPGA trailer | |
unsigned int | GetMagicDriverTrailer (int n) |
get magic word of COPPER driver trailer | |
unsigned int | GetTrailerChksum (int n) |
Get checksum in RawTrailer. | |
bool | CheckCOPPERMagic (int n) |
Check if COPPER Magic words are correct. | |
unsigned int | GetTTCtimeTRGType (int n) |
Check if COPPER Magic words are correct. | |
unsigned int | GetTTUtime (int n) |
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) |
should be called by DeSerializerCOPPER.cc and fill contents in RawHeader | |
unsigned int | GetDriverChkSum (int n) |
read COPPER driver's checksum value | |
unsigned int | CalcDriverChkSum (int n) |
calc COPPER driver's checksum value | |
unsigned int | CalcXORChecksum (int *buf, int nwords) |
calc XOR checksum | |
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) |
check data contents | |
void | CheckUtimeCtimeTRGType (int n) |
check data contents | |
int | GetTTCtime (int n) |
Get ctime. | |
int | GetTRGType (int n) |
Get trgtype. | |
void | GetTTTimeVal (int n, struct timeval *tv) |
Get timeval. | |
void | SetVersion () |
read data, detect and set the version number of the data format | |
void | SetVersion (std::string class_name) |
Get timeval. | |
void | CheckVersionSetBuffer () |
Check the version number of data format. | |
void | ShowBuffer () |
show m_buffer | |
void | PackDetectorBuf (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) |
Packer for RawCOPPER class Pack data (format ver. | |
void | PackDetectorBuf4DummyData (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) |
Pack dummy data (format ver. = -1 -> Select the latest format version) | |
void | PackDetectorBuf (int *const(&detector_buf_ch)[MAX_PCIE40_CH], int const(&nwords_ch)[MAX_PCIE40_CH], RawCOPPERPackerInfo rawcprpacker_info) |
Pack data for PCIe40 data-format. | |
int | GetMaxNumOfCh (int n) |
Get the max number of channels in a readout board. | |
void | CompareHeaderValue (int n, const unsigned int(&input_val)[MAX_PCIE40_CH], std::vector< std::vector< unsigned int > > &result) |
Compare value from different channels and make a statistics table. | |
bool | CheckOnlineRemovedDataBit (int n, int finesse_num) |
check if this channel's data has been removed on a readout PC for CDC online "masking" | |
std::string | getInfoHTML () const |
Return a short summary of this object's contents in HTML format. | |
virtual int | TotalBufNwords () |
Get total length of m_buffer. | |
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 | |
RawCOPPERFormat * | m_access |
class to access | |
int | m_version |
do not record | |
RawDataBlockFormat * | m_access_dblk |
class to access | |
Protected Member Functions | |
ClassDefOverride (RawCOPPER, 3) | |
do not record | |
ClassDef (RawDataBlock, 3) | |
not record | |
Protected Attributes | |
int | m_nwords |
do not record | |
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 |
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 | |
The Raw COPPER class This class stores data received by COPPER via belle2linkt Data from all detectors except PXD are stored in this class.
Definition at line 52 of file RawCOPPER.h.
anonymous enum |
Definition at line 327 of file RawCOPPER.h.
RawCOPPER | ( | ) |
Default constructor.
Definition at line 22 of file RawCOPPER.cc.
|
virtual |
Constructor using existing pointer to raw data buffer.
Destructor
Definition at line 28 of file RawCOPPER.cc.
|
inlinevirtualinherited |
get FTSW ID to check whether this data block is FTSW data or not
Definition at line 101 of file RawDataBlock.h.
|
inlinevirtualinherited |
get FTSW ID to check whether this data block is FTSW data or not
Definition at line 108 of file RawDataBlock.h.
|
protectedinherited |
not record
To drive from TObject
|
protected |
do not record
ver.2 Change FEE format as presented at B2GM in Nov.2013 ( Nov.20, 2013) ver.3 Change FEE format as presented at B2GM in Nov.2013 ( May 1, 2014) ver.4 Do not record m_access pointer ( Dec 19, 2014)
void CompareHeaderValue | ( | int | n, |
const unsigned int(&) | input_val[MAX_PCIE40_CH], | ||
std::vector< std::vector< unsigned int > > & | result | ||
) |
Compare value from different channels and make a statistics table.
Definition at line 313 of file RawCOPPER.cc.
|
inlinevirtualinherited |
Copy one datablock to buffer.
Definition at line 115 of file RawDataBlock.h.
|
inlinevirtualinherited |
get size of a data block
Definition at line 94 of file RawDataBlock.h.
|
inlinevirtualinherited |
get nth buffer pointer
Definition at line 53 of file RawDataBlock.h.
std::string getInfoHTML | ( | ) | const |
Return a short summary of this object's contents in HTML format.
Definition at line 285 of file RawCOPPER.cc.
|
inlinevirtualinherited |
get # of data blocks = (# of nodes)*(# of events)
Definition at line 67 of file RawDataBlock.h.
|
inlinevirtualinherited |
get # of events in m_buffer
Definition at line 81 of file RawDataBlock.h.
|
inlinevirtualinherited |
get # of data sources(e.g. # of COPPER boards) in m_buffer
Definition at line 74 of file RawDataBlock.h.
|
inlinevirtualinherited |
get malloc_flag
Definition at line 88 of file RawDataBlock.h.
|
inlinevirtualinherited |
get pointer to buffer(m_buffer)
Definition at line 60 of file RawDataBlock.h.
void PackDetectorBuf | ( | int *const(&) | detector_buf_ch[MAX_PCIE40_CH], |
int const(&) | nwords_ch[MAX_PCIE40_CH], | ||
RawCOPPERPackerInfo | rawcprpacker_info | ||
) |
Pack data for PCIe40 data-format.
Definition at line 216 of file RawCOPPER.cc.
void PackDetectorBuf | ( | 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 | ||
) |
Packer for RawCOPPER class Pack data (format ver.
= -1 -> Select the latest format version)
Definition at line 183 of file RawCOPPER.cc.
void PackDetectorBuf4DummyData | ( | 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 | ||
) |
Pack dummy data (format ver. = -1 -> Select the latest format version)
Definition at line 251 of file RawCOPPER.cc.
|
inlinevirtualinherited |
print data
Definition at line 122 of file RawDataBlock.h.
|
virtual |
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer )
Reimplemented from RawDataBlock.
Definition at line 141 of file RawCOPPER.cc.
void SetVersion | ( | ) |
read data, detect and set the version number of the data format
Definition at line 34 of file RawCOPPER.cc.
void SetVersion | ( | std::string | class_name | ) |
Get timeval.
Definition at line 94 of file RawCOPPER.cc.
void ShowBuffer | ( | ) |
show m_buffer
Definition at line 169 of file RawCOPPER.cc.
|
inlinevirtualinherited |
Get total length of m_buffer.
Definition at line 39 of file RawDataBlock.h.
RawCOPPERFormat* m_access |
class to access
Definition at line 333 of file RawCOPPER.h.
|
inherited |
class to access
Definition at line 141 of file RawDataBlock.h.
|
protectedinherited |
Definition at line 154 of file RawDataBlock.h.
|
protectedinherited |
number of events in this object
Definition at line 151 of file RawDataBlock.h.
|
protectedinherited |
number of nodes in this object
Definition at line 148 of file RawDataBlock.h.
|
protectedinherited |
|
protectedinherited |
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 158 of file RawDataBlock.h.
int m_version |