Belle II Software development
RawFTSW Class Reference

The Raw FTSW class. More...

#include <RawFTSW.h>

Inheritance diagram for RawFTSW:
RawDataBlock

Public Types

enum  {
  POS_NODE_FORMAT_ID = 6 ,
  FTSW_FORMAT_MASK = 0x000000FF ,
  FORMAT_ID_VER_0TO2 = 0x54544420 ,
  FORMAT_ID_VER_0TO3 = 0x54544431 ,
  POS_HEADER_SIZE = 1 ,
  VER_0_HEADER_SIZE = 0 ,
  VER_1_HEADER_SIZE = 0 ,
  VER_2_HEADER_SIZE = 8 ,
  VER_3_HEADER_SIZE = 8
}
 

Public Member Functions

 RawFTSW ()
 Default constructor.
 
virtual ~RawFTSW ()
 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 )
 
void SetVersion ()
 read data, detect and set the version number of the data format
 
void CheckVersionSetBuffer ()
 Check the version number of data format.
 
int GetNwordsHeader (int n)
 Get # of words of header.
 
unsigned int GetFTSWNodeID (int n)
 Get Node # ( should be "TTD " )
 
unsigned int GetEveNo (int n)
 Get event #.
 
unsigned int GetTTCtimeTRGType (int n)
 Get a word containing ctime and trigger type info.
 
unsigned int GetTTUtime (int n)
 get unixtime of the trigger
 
int GetTTCtime (int n)
 Get ctime of the trigger.
 
int GetTRGType (int n)
 Get trgtype.
 
void GetTTTimeVal (int n, struct timeval *tv)
 Get timeval from ctime and utime.
 
void GetPCTimeVal (int n, struct timeval *tv)
 Get timeval obtained from gettimeval()
 
unsigned int GetMagicTrailer (int n)
 Get magic number for data corruption check.
 
void CheckData (int n, unsigned int prev_evenum, unsigned int *cur_evenum, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no)
 check the data contents
 
unsigned int GetExpRunSubrun (int n)
 Exp# (10bit) run# (14bit) restart # (8bit)
 
int GetRunNo (int n)
 Get run #.
 
int GetSubRunNo (int n)
 Get subrun #.
 
int GetRunNoSubRunNo (int n)
 get a word cotaining run # and subrun #
 
int GetExpNo (int n)
 Get Exp #.
 
int Get15bitTLUTag (int n)
 DESY test only.
 
int GetIsHER (int n)
 HER injection = 1 or LER injection = 0.
 
unsigned int GetTimeSinceLastInjection (int n)
 Get time since the last injection.
 
unsigned int GetTimeSincePrevTrigger (int n)
 Get time since the previous trigger.
 
unsigned int GetBunchNumber (int n)
 Get a bunch number.
 
unsigned int GetFrameCount (int n)
 Get a frame count.
 
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
 

Public Attributes

RawFTSWFormatm_access {}
 class to access
 
int m_version = -1
 do not record
 
RawDataBlockFormatm_access_dblk
 class to access
 

Protected Member Functions

 ClassDefOverride (RawFTSW, 2)
 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
 

Detailed Description

The Raw FTSW class.

This class stores the RAW data containing FTSW data(event #, trg time ).

Definition at line 30 of file RawFTSW.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
POS_NODE_FORMAT_ID 

Added to distinguish different version.

ver.0 : early DESY-beam-test version( Node ID 0x545444** is at 5th word (0,1,2,..5) : Please ask Nakao-san about his e-mail ( [daq-experts:8055] FEE data header and FTSW data format) ver.1 : late DESY-beam-test version( Node ID 0x545444** was moved to 6th word (0,1,2,..5) : header size is ? words ( I need to ask Nakao-san because it will be used for distinguish between 0,1, and 2 ver 2 : phase II ? version : header size is 8 words : Format is written by Nakao-san in ver.26(as of 2019.3.1 ) of https://xwiki.desy.de/xwiki/rest/p/a2bb3/#HInformationsentfromTTDtodatastream 0x545452?? up to ver.2 this number is more or less same. So, it cannot be used to distinguish different version numbers

VER_0_HEADER_SIZE 

The same number of this information must appear in RawFTSWFormat*.h. Information should be placed in one place but I need to put this number in RawFTSW.h because it is used to distinguish different version numbers.

VER_1_HEADER_SIZE 

Unpacker for ver.0(early DESY version) is not available.

Definition at line 207 of file RawFTSW.h.

207 {
217 POS_NODE_FORMAT_ID = 6, // Position of format ID in header
218 FTSW_FORMAT_MASK = 0x000000FF,
219
220 FORMAT_ID_VER_0TO2 = 0x54544420,
221 FORMAT_ID_VER_0TO3 = 0x54544431,
222
223 POS_HEADER_SIZE = 1,
224 // header size is used to distinguish different version number for ver. 0, 1, and 2
226 VER_1_HEADER_SIZE = 0, // ! Unpacker for ver.1(late DESY version) is available but it is unlikely for a user to read this ver. Until there is a request to read ver.1, it is closed.
227 VER_2_HEADER_SIZE = 8,
228 VER_3_HEADER_SIZE = 8
229 };
@ POS_NODE_FORMAT_ID
Added to distinguish different version.
Definition: RawFTSW.h:217
@ VER_1_HEADER_SIZE
Unpacker for ver.0(early DESY version) is not available.
Definition: RawFTSW.h:226
@ VER_0_HEADER_SIZE
The same number of this information must appear in RawFTSWFormat*.h. Information should be placed in ...
Definition: RawFTSW.h:225

Constructor & Destructor Documentation

◆ RawFTSW()

RawFTSW ( )

Default constructor.

Definition at line 13 of file RawFTSW.cc.

14{
15 m_access = NULL;
16 m_version = -1;
17}
RawFTSWFormat * m_access
class to access
Definition: RawFTSW.h:232
int m_version
do not record
Definition: RawFTSW.h:235

◆ ~RawFTSW()

~RawFTSW ( )
virtual

Constructor using existing pointer to raw data buffer.

Destructor

Definition at line 19 of file RawFTSW.cc.

20{
21 if (m_access != NULL) delete m_access;
22 m_access = NULL;
23}

Member Function Documentation

◆ CheckData()

void CheckData ( int  n,
unsigned int  prev_evenum,
unsigned int *  cur_evenum,
unsigned int  prev_exprunsubrun_no,
unsigned int *  cur_exprunsubrun_no 
)
inline

check the data contents

Definition at line 121 of file RawFTSW.h.

124 {
126 return m_access->CheckData(n, prev_evenum, cur_evenum, prev_exprunsubrun_no, cur_exprunsubrun_no);
127 }
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
void CheckVersionSetBuffer()
Check the version number of data format.
Definition: RawFTSW.h:247

◆ CheckFTSWID()

virtual int CheckFTSWID ( int  n)
inlinevirtualinherited

get FTSW ID to check whether this data block is FTSW data or not

Definition at line 101 of file RawDataBlock.h.

102 {
104 return m_access_dblk->CheckFTSWID(n);
105 }
virtual int CheckFTSWID(int n)
get FTSW ID to check whether this data block is FTSW data or not
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 )
int m_num_events
number of events in this object
Definition: RawDataBlock.h:151
int m_num_nodes
number of nodes in this object
Definition: RawDataBlock.h:148
int * m_buffer
Buffer.
Definition: RawDataBlock.h:154
int m_nwords
do not record
Definition: RawDataBlock.h:145
RawDataBlockFormat * m_access_dblk
class to access
Definition: RawDataBlock.h:141

◆ CheckTLUID()

virtual int CheckTLUID ( int  n)
inlinevirtualinherited

get FTSW ID to check whether this data block is FTSW data or not

Definition at line 108 of file RawDataBlock.h.

109 {
111 return m_access_dblk->CheckTLUID(n);
112 }
virtual int CheckTLUID(int n)
get FTSW ID to check whether this data block is FTSW data or not

◆ ClassDef()

ClassDef ( RawDataBlock  ,
 
)
protectedinherited

not record

To drive from TObject

◆ ClassDefOverride()

ClassDefOverride ( RawFTSW  ,
 
)
protected

do not record

To derive from TObject ver.2 Remove m_FTSW_header and introduce a new data format on Nov. 20, 2013 ver.3 Add m_access on Mar. 7 2016 but Classded stays 2 for some(?) reason ver.4 Add m_version on Feb. 18 2019 for the new format version defined by Nakao-san Reason to stay at 2 is that the persistent content did not change If necessary: be aware that we have to change this in online and offline at the same time!

◆ CopyBlock()

virtual void CopyBlock ( int  n,
int *  buf_to 
)
inlinevirtualinherited

Copy one datablock to buffer.

Definition at line 115 of file RawDataBlock.h.

116 {
118 return m_access_dblk->CopyBlock(n, buf_to);
119 }
virtual void CopyBlock(int n, int *buf_to)
Copy one datablock to buffer.

◆ Get15bitTLUTag()

int Get15bitTLUTag ( int  n)
inline

DESY test only.

Definition at line 166 of file RawFTSW.h.

167 {
169 return m_access->Get15bitTLUTag(n);
170 }
virtual int Get15bitTLUTag(int n)
DESY test only (ver.1)

◆ GetBlockNwords()

virtual int GetBlockNwords ( int  n)
inlinevirtualinherited

get size of a data block

Definition at line 94 of file RawDataBlock.h.

95 {
98 }
virtual int GetBlockNwords(int n)
get size of a data block

◆ GetBuffer()

virtual int * GetBuffer ( int  n)
inlinevirtualinherited

get nth buffer pointer

Definition at line 53 of file RawDataBlock.h.

54 {
56 return m_access_dblk->GetBuffer(n);
57 }
virtual int * GetBuffer(int n)
get nth buffer pointer

◆ GetBufferPos()

virtual int GetBufferPos ( int  n)
inlinevirtualinherited

get position of data block in word

Reimplemented in RawCOPPER.

Definition at line 46 of file RawDataBlock.h.

47 {
49 return m_access_dblk->GetBufferPos(n);
50 }
virtual int GetBufferPos(int n)
get position of data block in word

◆ GetBunchNumber()

unsigned int GetBunchNumber ( int  n)
inline

Get a bunch number.

Definition at line 194 of file RawFTSW.h.

195 {
197 return m_access->GetBunchNumber(n);
198 }
virtual unsigned int GetBunchNumber(int n)
Get a bunch number.

◆ GetEveNo()

unsigned int GetEveNo ( int  n)
inline

Get event #.

Definition at line 65 of file RawFTSW.h.

66 {
68 return m_access->GetEveNo(n);
69 }
virtual unsigned int GetEveNo(int n)=0
Get event #.

◆ GetExpNo()

int GetExpNo ( int  n)
inline

Get Exp #.

Definition at line 159 of file RawFTSW.h.

160 {
162 return m_access->GetExpNo(n);
163 }
virtual int GetExpNo(int n)=0
Get Exp #.

◆ GetExpRunSubrun()

unsigned int GetExpRunSubrun ( int  n)
inline

Exp# (10bit) run# (14bit) restart # (8bit)

Definition at line 130 of file RawFTSW.h.

131 {
133 return m_access->GetExpRunSubrun(n);
134 }
virtual unsigned int GetExpRunSubrun(int n)=0
Exp# (10bit) run# (14bit) restart # (8bit)

◆ GetFrameCount()

unsigned int GetFrameCount ( int  n)
inline

Get a frame count.

Definition at line 201 of file RawFTSW.h.

202 {
204 return m_access->GetFrameCount(n);
205 }
virtual unsigned int GetFrameCount(int n)
Get a frame count.

◆ GetFTSWNodeID()

unsigned int GetFTSWNodeID ( int  n)
inline

Get Node # ( should be "TTD " )

Definition at line 58 of file RawFTSW.h.

59 {
61 return m_access->GetFTSWNodeID(n);
62 }
virtual unsigned int GetFTSWNodeID(int n)=0
Get Node # ( should be "TTD " )

◆ GetIsHER()

int GetIsHER ( int  n)
inline

HER injection = 1 or LER injection = 0.

Definition at line 173 of file RawFTSW.h.

174 {
176 return m_access->GetIsHER(n);
177 }
virtual int GetIsHER(int n)
HER injection = 1 or LER injection = 0.

◆ GetMagicTrailer()

unsigned int GetMagicTrailer ( int  n)
inline

Get magic number for data corruption check.

Definition at line 114 of file RawFTSW.h.

115 {
117 return m_access->GetMagicTrailer(n);
118 }
virtual unsigned int GetMagicTrailer(int n)=0
Get magic number for data corruption check.

◆ GetNumEntries()

virtual int GetNumEntries ( )
inlinevirtualinherited

get # of data blocks = (# of nodes)*(# of events)

Definition at line 67 of file RawDataBlock.h.

68 {
71 }
virtual int GetNumEntries()
get # of data blocks = (# of nodes)*(# of events)

◆ GetNumEvents()

virtual int GetNumEvents ( )
inlinevirtualinherited

get # of events in m_buffer

Definition at line 81 of file RawDataBlock.h.

82 {
85 }
virtual int GetNumEvents()
get # of events in m_buffer

◆ GetNumNodes()

virtual int GetNumNodes ( )
inlinevirtualinherited

get # of data sources(e.g. # of COPPER boards) in m_buffer

Definition at line 74 of file RawDataBlock.h.

75 {
77 return m_access_dblk->GetNumNodes();
78 }
virtual int GetNumNodes()
get # of data sources(e.g. # of COPPER boards) in m_buffer

◆ GetNwordsHeader()

int GetNwordsHeader ( int  n)
inline

Get # of words of header.

Definition at line 51 of file RawFTSW.h.

52 {
54 return m_access->GetNwordsHeader(n);
55 }
virtual int GetNwordsHeader(int n)=0
Get # of words of header.

◆ GetPCTimeVal()

void GetPCTimeVal ( int  n,
struct timeval *  tv 
)
inline

Get timeval obtained from gettimeval()

Definition at line 107 of file RawFTSW.h.

108 {
110 return m_access->GetPCTimeVal(n, tv);
111 }
virtual void GetPCTimeVal(int n, struct timeval *tv)
Get stored information of getimeofday in a PC.

◆ GetPreAllocFlag()

virtual int GetPreAllocFlag ( )
inlinevirtualinherited

get malloc_flag

Definition at line 88 of file RawDataBlock.h.

89 {
90 return m_use_prealloc_buf;
91 }
int m_use_prealloc_buf
flag for deleting m_buffer in destructer( 0:delete, 1: not delete) When using pre-allocated buffer,...
Definition: RawDataBlock.h:158

◆ GetRunNo()

int GetRunNo ( int  n)
inline

Get run #.

Definition at line 137 of file RawFTSW.h.

138 {
140 return m_access->GetRunNo(n);
141 }
virtual int GetRunNo(int n)=0
Get run #.

◆ GetRunNoSubRunNo()

int GetRunNoSubRunNo ( int  n)
inline

get a word cotaining run # and subrun #

Definition at line 152 of file RawFTSW.h.

153 {
155 return m_access->GetRunNoSubRunNo(n);
156 }
virtual int GetRunNoSubRunNo(int n)=0
get a word cotaining run # and subrun #

◆ GetSubRunNo()

int GetSubRunNo ( int  n)
inline

Get subrun #.

Definition at line 145 of file RawFTSW.h.

146 {
148 return m_access->GetSubRunNo(n);
149 }
virtual int GetSubRunNo(int n)=0
Get subrun #.

◆ GetTimeSinceLastInjection()

unsigned int GetTimeSinceLastInjection ( int  n)
inline

Get time since the last injection.

Definition at line 180 of file RawFTSW.h.

181 {
184 }
virtual unsigned int GetTimeSinceLastInjection(int n)
Get time since the last injection.

◆ GetTimeSincePrevTrigger()

unsigned int GetTimeSincePrevTrigger ( int  n)
inline

Get time since the previous trigger.

Definition at line 187 of file RawFTSW.h.

188 {
191 }
virtual unsigned int GetTimeSincePrevTrigger(int n)
Get time since the previous trigger.

◆ GetTRGType()

int GetTRGType ( int  n)
inline

Get trgtype.

Definition at line 93 of file RawFTSW.h.

94 {
96 return m_access->GetTRGType(n);
97 }
virtual int GetTRGType(int n)=0
Get trgtype.

◆ GetTTCtime()

int GetTTCtime ( int  n)
inline

Get ctime of the trigger.

Definition at line 86 of file RawFTSW.h.

87 {
89 return m_access->GetTTCtime(n);
90 }
virtual int GetTTCtime(int n)=0
Get ctime of the trigger.

◆ GetTTCtimeTRGType()

unsigned int GetTTCtimeTRGType ( int  n)
inline

Get a word containing ctime and trigger type info.

Definition at line 72 of file RawFTSW.h.

73 {
75 return m_access->GetTTCtimeTRGType(n);
76 }
virtual unsigned int GetTTCtimeTRGType(int n)=0
Get a word containing ctime and trigger type info.

◆ GetTTTimeVal()

void GetTTTimeVal ( int  n,
struct timeval *  tv 
)
inline

Get timeval from ctime and utime.

Definition at line 100 of file RawFTSW.h.

101 {
103 return m_access->GetTTTimeVal(n, tv);
104 }
virtual void GetTTTimeVal(int n, struct timeval *tv)=0
Get timeval from ctime and utime.

◆ GetTTUtime()

unsigned int GetTTUtime ( int  n)
inline

get unixtime of the trigger

Definition at line 79 of file RawFTSW.h.

80 {
82 return m_access->GetTTUtime(n);
83 }
virtual unsigned int GetTTUtime(int n)=0
get unixtime of the trigger

◆ GetWholeBuffer()

virtual int * GetWholeBuffer ( )
inlinevirtualinherited

get pointer to buffer(m_buffer)

Definition at line 60 of file RawDataBlock.h.

61 {
64 }
virtual int * GetWholeBuffer()
get pointer to buffer(m_buffer)

◆ PrintData()

virtual void PrintData ( int *  buf,
int  nwords 
)
inlinevirtualinherited

print data

Definition at line 122 of file RawDataBlock.h.

123 {
125 return m_access_dblk->PrintData(buf, nwords);
126 }
virtual void PrintData(int *buf, int nwords)
print data

◆ 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 from RawDataBlock.

Definition at line 107 of file RawFTSW.cc.

108{
109
110 if (bufin == NULL) {
111 char err_buf[500];
112 sprintf(err_buf, "[FATAL] bufin is NULL. Exting...\n");
113 printf("%s", err_buf); fflush(stdout);
114 B2FATAL(err_buf);
115 }
116 if (!m_use_prealloc_buf && m_buffer != NULL) delete[] m_buffer;
117
118 if (delete_flag == 0) {
119 m_use_prealloc_buf = true;
120 } else {
121 m_use_prealloc_buf = false;
122 }
123
124 m_nwords = nwords;
125 m_buffer = bufin;
126
127 m_num_nodes = num_nodes;
128 m_num_events = num_events;
129
130 SetVersion();
131
132}
void SetVersion()
read data, detect and set the version number of the data format
Definition: RawFTSW.cc:25

◆ SetVersion()

void SetVersion ( )

read data, detect and set the version number of the data format

Definition at line 25 of file RawFTSW.cc.

26{
27 if (m_buffer == NULL) {
28 char err_buf[500];
29 sprintf(err_buf, "m_buffer is NULL. Exiting...");
30 printf("%s", err_buf); fflush(stdout);
31 B2FATAL(err_buf);
32 }
33
34 if (m_access != NULL) {
35 delete m_access;
36 m_access = nullptr;
37 }
38
39 //
40 // Assign unpacker
41 //
42 // Special treatment is required because Nakao-san did not set verision number in ver.0,1, and 2 header.
43 // I'm using the size of header which is stored the 1st word (0,1,..)
44 //
45 int temp_version = m_version;
46 if (m_buffer[ POS_HEADER_SIZE ] == VER_0_HEADER_SIZE) {
47 char err_buf[500];
48 sprintf(err_buf,
49 "[FATAL] Ver.0 of RawFTSW( so-called early DESYtest format ) is detected but not supported. (header size = 0x%.8x ) Exiting...\n %s %s %d\n",
50 m_buffer[ POS_HEADER_SIZE ], __FILE__, __PRETTY_FUNCTION__, __LINE__);
51 printf("%s", err_buf); fflush(stdout);
52 B2FATAL(err_buf);
53 } else if (m_buffer[ POS_NODE_FORMAT_ID ] == FORMAT_ID_VER_0TO2) {
54 if (m_buffer[ POS_HEADER_SIZE ] == VER_2_HEADER_SIZE) {
56 m_version = 2; // as of 2019.3.2, the latest version is 2.
57 } else if (m_buffer[ POS_HEADER_SIZE ] == VER_1_HEADER_SIZE) {
59 m_version = 1;
60 } else {
61 char err_buf[500];
62 sprintf(err_buf, "[FATAL] ERROR_EVENT : Invalid RawFTSW header size of FTSW data format(= 0x%.8x words). Exiting...\n %s %s %d\n",
63 m_buffer[ POS_HEADER_SIZE ], __FILE__, __PRETTY_FUNCTION__, __LINE__);
64 printf("%s", err_buf); fflush(stdout);
65 B2FATAL(err_buf);
66 }
67 } else if (m_buffer[ POS_NODE_FORMAT_ID ] == FORMAT_ID_VER_0TO3 ||
68 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544432 ||
69 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544433 ||
70 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544434 ||
71 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544435 ||
72 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544436 ||
73 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544437 ||
74 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544438 ||
75 m_buffer[ POS_NODE_FORMAT_ID ] == 0x54544439) {
76 // Request from Nakao-san in Oct. 15, 2019
77 // - FORMAT_ID_VER_0TO3 should be changed to x"54544431" from x"5454421"
78 // - RawFTSWFormat_latest should accept newer format versions(= larger version number), so that this unpacker
79 // will not stop due to version error, when Nakao-san updated version number in RawFTSW data.
80 // -- Since the latest format is basically the addition of some variables in RawFTSW data, probably it won't cause the problem.
82 m_version = 3; // as of 2019.3.20 the latest version is 3.
83 } else {
84 char err_buf[500];
85 sprintf(err_buf,
86 "[FATAL] ERROR_EVENT : Invalid RawFTSW header size(= 0x%.8x words) or version number.(=0x%.8x) Exiting...\n %s %s %d\n",
87 m_buffer[ POS_HEADER_SIZE ], m_buffer[ POS_NODE_FORMAT_ID ], __FILE__, __PRETTY_FUNCTION__, __LINE__);
88 printf("%s", err_buf); fflush(stdout);
89 B2FATAL(err_buf);
90 }
91
92
93 if (temp_version >= 0 && temp_version != m_version) {
94 char err_buf[500];
95 sprintf(err_buf,
96 "[FATAL] Already assigned RawFTSW format version (= %.8x) is different from the one (= 0x%.8x) from the current event. Exiting...\n %s %s %d\n",
97 temp_version, m_version, __FILE__, __PRETTY_FUNCTION__, __LINE__);
98 printf("%s", err_buf); fflush(stdout);
99 B2FATAL(err_buf);
100 }
101
103}
The Raw FTSW class 3 ( 2019.8.20 )
The Raw FTSW class ver.1 .
The Raw FTSW class ver.2 .

◆ TotalBufNwords()

virtual int TotalBufNwords ( )
inlinevirtualinherited

Get total length of m_buffer.

Definition at line 39 of file RawDataBlock.h.

40 {
43 }
virtual int TotalBufNwords()
Get total length of m_buffer.

Member Data Documentation

◆ m_access

RawFTSWFormat* m_access {}

class to access

Definition at line 232 of file RawFTSW.h.

◆ m_access_dblk

RawDataBlockFormat* m_access_dblk
inherited

class to access

Definition at line 141 of file RawDataBlock.h.

◆ m_buffer

int* m_buffer
protectedinherited

Buffer.

Definition at line 154 of file RawDataBlock.h.

◆ m_num_events

int m_num_events
protectedinherited

number of events in this object

Definition at line 151 of file RawDataBlock.h.

◆ m_num_nodes

int m_num_nodes
protectedinherited

number of nodes in this object

Definition at line 148 of file RawDataBlock.h.

◆ m_nwords

int m_nwords
protectedinherited

do not record

number of words of buffer

Definition at line 145 of file RawDataBlock.h.

◆ m_use_prealloc_buf

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

◆ m_version

int m_version = -1

do not record

Version of the format

Definition at line 235 of file RawFTSW.h.


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