The RawDataBlock class Base class for rawdata handling.
More...
#include <RawDataBlock.h>
|
| RawDataBlock () |
| Default constructor.
|
|
virtual | ~RawDataBlock () |
| Destructor.
|
|
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
|
|
|
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 RawDataBlock class Base class for rawdata handling.
Definition at line 27 of file RawDataBlock.h.
◆ RawDataBlock()
Default constructor.
Definition at line 14 of file RawDataBlock.cc.
15{
17
23}
int m_num_events
number of events in this object
int m_num_nodes
number of nodes in this object
int m_use_prealloc_buf
flag for deleting m_buffer in destructer( 0:delete, 1: not delete) When using pre-allocated buffer,...
int m_nwords
do not record
RawDataBlockFormat * m_access_dblk
class to access
◆ ~RawDataBlock()
◆ CheckFTSWID()
virtual int CheckFTSWID |
( |
int |
n | ) |
|
|
inlinevirtual |
get FTSW ID to check whether this data block is FTSW data or not
Definition at line 101 of file RawDataBlock.h.
◆ CheckTLUID()
virtual int CheckTLUID |
( |
int |
n | ) |
|
|
inlinevirtual |
get FTSW ID to check whether this data block is FTSW data or not
Definition at line 108 of file RawDataBlock.h.
◆ ClassDef()
not record
To drive from TObject
◆ CopyBlock()
virtual void CopyBlock |
( |
int |
n, |
|
|
int * |
buf_to |
|
) |
| |
|
inlinevirtual |
◆ GetBlockNwords()
virtual int GetBlockNwords |
( |
int |
n | ) |
|
|
inlinevirtual |
◆ GetBuffer()
virtual int * GetBuffer |
( |
int |
n | ) |
|
|
inlinevirtual |
◆ GetBufferPos()
virtual int GetBufferPos |
( |
int |
n | ) |
|
|
inlinevirtual |
◆ GetNumEntries()
virtual int GetNumEntries |
( |
| ) |
|
|
inlinevirtual |
get # of data blocks = (# of nodes)*(# of events)
Definition at line 67 of file RawDataBlock.h.
◆ GetNumEvents()
virtual int GetNumEvents |
( |
| ) |
|
|
inlinevirtual |
◆ GetNumNodes()
virtual int GetNumNodes |
( |
| ) |
|
|
inlinevirtual |
get # of data sources(e.g. # of COPPER boards) in m_buffer
Definition at line 74 of file RawDataBlock.h.
◆ GetPreAllocFlag()
virtual int GetPreAllocFlag |
( |
| ) |
|
|
inlinevirtual |
◆ GetWholeBuffer()
virtual int * GetWholeBuffer |
( |
| ) |
|
|
inlinevirtual |
◆ PrintData()
virtual void PrintData |
( |
int * |
buf, |
|
|
int |
nwords |
|
) |
| |
|
inlinevirtual |
◆ SetBuffer()
void SetBuffer |
( |
int * |
bufin, |
|
|
int |
nwords, |
|
|
int |
delete_flag, |
|
|
int |
num_events, |
|
|
int |
num_nodes |
|
) |
| |
|
virtual |
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer )
Reimplemented in RawCOPPER, and RawFTSW.
Definition at line 35 of file RawDataBlock.cc.
36{
37
38 if (bufin == NULL) {
39 char err_buf[500];
40 sprintf(err_buf, "[DEBUG] bufin is NULL. Exting...\n");
41 printf("%s", err_buf); fflush(stdout);
42 B2FATAL(err_buf);
43 }
44
46
47 if (delete_flag == 0) {
49 } else {
51 }
52
55
58
59
61
62
63
64
65
66
67
68
69}
◆ TotalBufNwords()
virtual int TotalBufNwords |
( |
| ) |
|
|
inlinevirtual |
◆ m_access_dblk
◆ m_buffer
◆ m_num_events
◆ m_num_nodes
◆ m_nwords
do not record
number of words of buffer
Definition at line 145 of file RawDataBlock.h.
◆ 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
Definition at line 158 of file RawDataBlock.h.
The documentation for this class was generated from the following files: