Belle II Software development
|
The Raw FTSW class 3 ( 2019.8.20 ) More...
#include <RawFTSWFormat_latest.h>
Public Types | |
enum | { POS_NWORDS = 0 , POS_HDR_NWORDS = 1 , POS_NUMEVE_NUMNODES = 2 , POS_EXP_RUN_NO = 3 , POS_EVE_NO_1 = 4 , POS_NA_1 = 5 , POS_NODE_ID = 6 , POS_NA_2 = 7 } |
header format More... | |
enum | { POS_TT_CTIME_TRGTYPE = 8 , POS_TT_UTIME = 9 , POS_EVE_NO_2 = 10 , POS_FRAME_COUNT = 11 , POS_TIME_SINCE_PREV_TRG = 12 , POS_INJECTION_INFO = 13 , POS_BUNCH_NUM = 14 , POS_TVSEC_FROM_PC = 15 , POS_TVUSEC_FROM_PC = 16 } |
data format More... | |
enum | { POS_RSVD_1 = 20 , POS_MAGIC_1 = 21 } |
trailer format More... | |
enum | { INJ_HER_LER_MASK = 0x80000000 , INJ_HER_LER_SHIFT = 31 , INJ_TIME_MASK = 0x7FFFFFFF , INJ_TIME_SHIFT = 0 , INJ_BUNCH_MASK = 0x000007FF , INJ_BUNCH_SHIFT = 0 , EXP_MASK = 0xFFC00000 , EXP_SHIFT = 22 , RUNNO_MASK = 0x003FFF00 , RUNNO_SHIFT = 8 , SUBRUNNO_MASK = 0x000000FF , TTCTIME_MASK = 0x7FFFFFF0 , TTCTIME_SHIFT = 4 , TRGTYPE_MASK = 0xF } |
enum | { SIZE_FTSW_PACKET = 22 } |
enum | { FTSW_MAGIC_TRAILER = 0x7FFF0000 } |
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 | |
RawFTSWFormat_latest () | |
Default constructor. | |
virtual | ~RawFTSWFormat_latest () |
Constructor using existing pointer to raw data buffer. | |
int | GetNwordsHeader (int n) OVERRIDE_CPP17 |
Get # of words of header. | |
unsigned int | GetFTSWNodeID (int n) OVERRIDE_CPP17 |
Get Node # ( should be "TTD " ) | |
unsigned int | GetEveNo (int n) OVERRIDE_CPP17 |
Get event #. | |
unsigned int | GetTTCtimeTRGType (int n) OVERRIDE_CPP17 |
Get a word containing ctime and trigger type info. | |
unsigned int | GetTTUtime (int n) OVERRIDE_CPP17 |
get unixtime of the trigger | |
int | GetTTCtime (int n) OVERRIDE_CPP17 |
Get ctime of the trigger. | |
int | GetTRGType (int n) OVERRIDE_CPP17 |
Get trgtype. | |
void | GetTTTimeVal (int n, struct timeval *tv) OVERRIDE_CPP17 |
Get timeval from ctime and utime. | |
void | GetTTTimeSpec (int n, struct timespec *ts) OVERRIDE_CPP17 |
Get timespec from ctime and utime. | |
unsigned long long int | GetTTTimeNs (int n) OVERRIDE_CPP17 |
Get time in ns since epoch from ctime and utime. | |
unsigned int | GetMagicTrailer (int n) OVERRIDE_CPP17 |
Get magic number for data corruption check. | |
void | GetPCTimeVal (int n, struct timeval *tv) OVERRIDE_CPP17 |
Get stored information of getimeofday in a PC. | |
void | CheckData (int n, unsigned int prev_evenum, unsigned int *cur_evenum, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no) OVERRIDE_CPP17 |
check the data contents | |
unsigned int | GetExpRunSubrun (int n) OVERRIDE_CPP17 |
Exp# (10bit) run# (14bit) restart # (8bit) | |
int | GetRunNo (int n) OVERRIDE_CPP17 |
Get run #. | |
int | GetSubRunNo (int n) OVERRIDE_CPP17 |
Get subrun #. | |
int | GetRunNoSubRunNo (int n) OVERRIDE_CPP17 |
get a word cotaining run # and subrun # | |
int | GetExpNo (int n) OVERRIDE_CPP17 |
Get Exp #. | |
int | GetIsHER (int n) OVERRIDE_CPP17 |
HER injection = 1 or LER injection = 0. | |
unsigned int | GetTimeSinceLastInjection (int n) OVERRIDE_CPP17 |
Get time since the last injection. | |
unsigned int | GetTimeSincePrevTrigger (int n) OVERRIDE_CPP17 |
Get time since the previous trigger. | |
unsigned int | GetBunchNumber (int n) OVERRIDE_CPP17 |
Get a bunch number. | |
unsigned int | GetFrameCount (int n) OVERRIDE_CPP17 |
Get a frame count. | |
virtual int | Get15bitTLUTag (int n) |
DESY test only (ver.1) | |
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 | |
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 FTSW class 3 ( 2019.8.20 )
This class stores the RAW data containing FTSW data(event #, trg time ).
Definition at line 24 of file RawFTSWFormat_latest.h.
|
inherited |
Definition at line 75 of file RawDataBlockFormat.h.
|
inherited |
Definition at line 80 of file RawDataBlockFormat.h.
anonymous enum |
header format
Definition at line 133 of file RawFTSWFormat_latest.h.
anonymous enum |
data format
Definition at line 145 of file RawFTSWFormat_latest.h.
anonymous enum |
trailer format
Definition at line 158 of file RawFTSWFormat_latest.h.
anonymous enum |
Definition at line 163 of file RawFTSWFormat_latest.h.
anonymous enum |
Definition at line 180 of file RawFTSWFormat_latest.h.
anonymous enum |
Definition at line 185 of file RawFTSWFormat_latest.h.
|
virtual |
Constructor using existing pointer to raw data buffer.
Destructor
Definition at line 19 of file RawFTSWFormat_latest.cc.
|
virtual |
check the data contents
Implements RawFTSWFormat.
Definition at line 133 of file RawFTSWFormat_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.
|
virtualinherited |
Copy one datablock to buffer.
Definition at line 173 of file RawDataBlockFormat.cc.
|
virtualinherited |
DESY test only (ver.1)
Reimplemented in RawFTSWFormat_v1.
Definition at line 24 of file RawFTSWFormat.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.
|
virtual |
Get a bunch number.
Reimplemented from RawFTSWFormat.
Definition at line 118 of file RawFTSWFormat_latest.cc.
|
virtual |
|
virtual |
Get a frame count.
Reimplemented from RawFTSWFormat.
Definition at line 125 of file RawFTSWFormat_latest.cc.
|
virtual |
Get Node # ( should be "TTD " )
Implements RawFTSWFormat.
Definition at line 81 of file RawFTSWFormat_latest.cc.
|
virtual |
HER injection = 1 or LER injection = 0.
Reimplemented from RawFTSWFormat.
Definition at line 96 of file RawFTSWFormat_latest.cc.
|
virtual |
Get magic number for data corruption check.
Implements RawFTSWFormat.
Definition at line 91 of file RawFTSWFormat_latest.cc.
|
inlinevirtualinherited |
get # of data blocks = (# of nodes)*(# of events)
Definition at line 49 of file RawDataBlockFormat.h.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
get # of data sources(e.g. # of COPPER boards) in m_buffer
Definition at line 52 of file RawDataBlockFormat.h.
|
virtual |
Get # of words of header.
Implements RawFTSWFormat.
Definition at line 75 of file RawFTSWFormat_latest.cc.
|
virtual |
Get stored information of getimeofday in a PC.
Reimplemented from RawFTSWFormat.
Definition at line 62 of file RawFTSWFormat_latest.cc.
|
inlinevirtualinherited |
get malloc_flag
Definition at line 58 of file RawDataBlockFormat.h.
|
virtual |
Get time since the last injection.
Reimplemented from RawFTSWFormat.
Definition at line 104 of file RawFTSWFormat_latest.cc.
|
virtual |
Get time since the previous trigger.
Reimplemented from RawFTSWFormat.
Definition at line 111 of file RawFTSWFormat_latest.cc.
|
virtual |
Get trgtype.
Implements RawFTSWFormat.
Definition at line 36 of file RawFTSWFormat_latest.cc.
|
virtual |
Get ctime of the trigger.
Implements RawFTSWFormat.
Definition at line 31 of file RawFTSWFormat_latest.cc.
|
virtual |
Get a word containing ctime and trigger type info.
Implements RawFTSWFormat.
Definition at line 24 of file RawFTSWFormat_latest.cc.
|
virtual |
Get time in ns since epoch from ctime and utime.
Implements RawFTSWFormat.
Definition at line 70 of file RawFTSWFormat_latest.cc.
|
virtual |
Get timespec from ctime and utime.
Implements RawFTSWFormat.
Definition at line 54 of file RawFTSWFormat_latest.cc.
|
virtual |
Get timeval from ctime and utime.
Implements RawFTSWFormat.
Definition at line 46 of file RawFTSWFormat_latest.cc.
|
virtual |
get unixtime of the trigger
Implements RawFTSWFormat.
Definition at line 41 of file RawFTSWFormat_latest.cc.
|
virtualinherited |
get pointer to buffer(m_buffer)
Definition at line 119 of file RawDataBlockFormat.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.