Belle II Software  release-08-01-10
RawTLUFormat Class Reference

The Raw TLU class Class for data from DAQ PC for TLU(Trigger Logic Unit) It is supposed to be used only in the DESY beam test. More...

#include <RawTLUFormat.h>

Inheritance diagram for RawTLUFormat:
Collaboration diagram for RawTLUFormat:

Public Types

enum  {
  POS_NWORDS = 0 ,
  POS_HDR_NWORDS = 1 ,
  POS_NUMEVE_NUMNODES = 2 ,
  POS_RUN_NO = 3 ,
  POS_EVE_NO = 4 ,
  POS_NA_1 = 5 ,
  POS_NODE_ID = 6 ,
  POS_NA_2 = 7 ,
  POS_TLU_EVENTTAG = 8 ,
  POS_NA_3 = 9 ,
  POS_TLU_TIME_1 = 10 ,
  POS_TLU_TIME_2 = 11 ,
  POS_RSVD_1 = 12 ,
  POS_MAGIC_1 = 13
}
 
enum  { SIZE_TLU_PACKET = 14 }
 
enum  { TLU_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

 RawTLUFormat ()
 Default constructor.
 
virtual ~RawTLUFormat ()
 Destructor.
 
int GetNwordsHeader (int n)
 Get the size of the header.
 
unsigned int GetNodeID (int n)
 Get Node ID.
 
unsigned int GetEveNo (int n)
 Get Event #.
 
unsigned int GetMagicTrailer (int n)
 Get Magic Trailer #.
 
int GetRunNo (int n)
 Get Run #.
 
unsigned int GetTLUEventTag (int n)
 Get TLU event tag.
 
void CheckData (int n, unsigned int prev_evenum, unsigned int *cur_evenum)
 check data contents
 
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 More...
 

Detailed Description

The Raw TLU class Class for data from DAQ PC for TLU(Trigger Logic Unit) It is supposed to be used only in the DESY beam test.

Definition at line 25 of file RawTLUFormat.h.

Member Data Documentation

◆ m_use_prealloc_buf

int m_use_prealloc_buf
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.


The documentation for this class was generated from the following files: