Belle II Software development
|
The Raw FTSW class. More...
#include <RawFTSWFormat.h>
Public Types | |
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 () | |
Default constructor. | |
virtual | ~RawFTSWFormat () |
Constructor using existing pointer to raw data buffer. | |
virtual int | GetNwordsHeader (int n)=0 |
Get # of words of header. | |
virtual unsigned int | GetFTSWNodeID (int n)=0 |
Get Node # ( should be "TTD " ) | |
virtual unsigned int | GetEveNo (int n)=0 |
Get event #. | |
virtual unsigned int | GetTTCtimeTRGType (int n)=0 |
Get a word containing ctime and trigger type info. | |
virtual unsigned int | GetTTUtime (int n)=0 |
get unixtime of the trigger | |
virtual int | GetTTCtime (int n)=0 |
Get ctime of the trigger. | |
virtual int | GetTRGType (int n)=0 |
Get trgtype. | |
virtual void | GetTTTimeVal (int n, struct timeval *tv)=0 |
Get timeval from ctime and utime. | |
virtual void | GetTTTimeSpec (int n, struct timespec *ts)=0 |
Get timespec from ctime and utime. | |
virtual unsigned long long int | GetTTTimeNs (int n)=0 |
Get time in ns since epoch from ctime and utime. | |
virtual unsigned int | GetMagicTrailer (int n)=0 |
Get magic number for data corruption check. | |
virtual void | GetPCTimeVal (int n, struct timeval *tv) |
Get stored information of getimeofday in a PC. | |
virtual void | CheckData (int n, unsigned int prev_evenum, unsigned int *cur_evenum, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no)=0 |
check the data contents | |
virtual unsigned int | GetExpRunSubrun (int n)=0 |
Exp# (10bit) run# (14bit) restart # (8bit) | |
virtual int | GetRunNo (int n)=0 |
Get run #. | |
virtual int | GetSubRunNo (int n)=0 |
Get subrun #. | |
virtual int | GetRunNoSubRunNo (int n)=0 |
get a word cotaining run # and subrun # | |
virtual int | GetExpNo (int n)=0 |
Get Exp #. | |
virtual int | Get15bitTLUTag (int n) |
DESY test only (ver.1) | |
virtual int | GetIsHER (int n) |
HER injection = 1 or LER injection = 0. | |
virtual unsigned int | GetTimeSinceLastInjection (int n) |
Get time since the last injection. | |
virtual unsigned int | GetTimeSincePrevTrigger (int n) |
Get time since the previous trigger. | |
virtual unsigned int | GetBunchNumber (int n) |
Get a bunch number. | |
virtual unsigned int | GetFrameCount (int n) |
Get a frame count. | |
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.
This class stores the RAW data containing FTSW data(event #, trg time ).
Definition at line 24 of file RawFTSWFormat.h.
|
inherited |
Definition at line 75 of file RawDataBlockFormat.h.
|
inherited |
Definition at line 80 of file RawDataBlockFormat.h.
RawFTSWFormat | ( | ) |
|
virtual |
Constructor using existing pointer to raw data buffer.
Destructor
Definition at line 19 of file RawFTSWFormat.cc.
|
pure virtual |
check the data contents
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
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.
|
virtual |
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 in RawFTSWFormat_latest, and RawFTSWFormat_v2.
Definition at line 72 of file RawFTSWFormat.cc.
|
pure virtual |
Get event #.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get Exp #.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Exp# (10bit) run# (14bit) restart # (8bit)
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
virtual |
Get a frame count.
Reimplemented in RawFTSWFormat_latest, and RawFTSWFormat_v2.
Definition at line 83 of file RawFTSWFormat.cc.
|
pure virtual |
Get Node # ( should be "TTD " )
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
virtual |
HER injection = 1 or LER injection = 0.
Reimplemented in RawFTSWFormat_latest, and RawFTSWFormat_v2.
Definition at line 36 of file RawFTSWFormat.cc.
|
pure virtual |
Get magic number for data corruption check.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
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.
|
pure virtual |
Get # of words of header.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
virtual |
Get stored information of getimeofday in a PC.
Reimplemented in RawFTSWFormat_latest.
Definition at line 98 of file RawFTSWFormat.cc.
|
inlinevirtualinherited |
get malloc_flag
Definition at line 58 of file RawDataBlockFormat.h.
|
pure virtual |
Get run #.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
get a word cotaining run # and subrun #
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get subrun #.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
virtual |
Get time since the last injection.
Reimplemented in RawFTSWFormat_latest, and RawFTSWFormat_v2.
Definition at line 49 of file RawFTSWFormat.cc.
|
virtual |
Get time since the previous trigger.
Reimplemented in RawFTSWFormat_latest, and RawFTSWFormat_v2.
Definition at line 61 of file RawFTSWFormat.cc.
|
pure virtual |
Get trgtype.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get ctime of the trigger.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get a word containing ctime and trigger type info.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get time in ns since epoch from ctime and utime.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get timespec from ctime and utime.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
Get timeval from ctime and utime.
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
pure virtual |
get unixtime of the trigger
Implemented in RawFTSWFormat_latest, RawFTSWFormat_v1, and RawFTSWFormat_v2.
|
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.