Belle II Software  release-05-01-25
RawCOPPERFormat_v0.h
1 //+
2 // File : RawCOPPERFormat_v0.h
3 // Description : Module to handle raw data from COPPER
4 //
5 // Author : Satoru Yamada, IPNS, KEK
6 // Date : 2 - Aug - 2013
7 //-
8 
9 #ifndef RAWCOPPERFORMAT_V0_H
10 #define RAWCOPPERFORMAT_V0_H
11 
12 // Includes
13 #include <stdio.h>
14 
15 #include <rawdata/dataobjects/RawCOPPERFormat.h>
16 #include <rawdata/dataobjects/RawHeader_v0.h>
17 #include <rawdata/dataobjects/RawTrailer_v0.h>
18 
19 /* #include <framework/datastore/DataStore.h> */
20 /* #include <TObject.h> */
21 
22 //#define USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
23 
24 namespace Belle2 {
36  public:
39 
41  //RawCOPPERFormat_v0(int* bufin, int nwords);
43  virtual ~RawCOPPERFormat_v0();
44 
45  //
46  // Get position of or pointer to data
47  //
49  // POINTER TO "DETECTOR BUFFER"
50  //( after removing "B2link headers" from "FINESSE buffer". THIS IS THE RAW DATA FROM A DETECTOR
52 
53 
55  int GetDetectorNwords(int n, int finesse_num) OVERRIDE_CPP17;
56 
58  int Get1stDetectorNwords(int n) OVERRIDE_CPP17;
59 
61  int Get2ndDetectorNwords(int n) OVERRIDE_CPP17;
62 
64  int Get3rdDetectorNwords(int n) OVERRIDE_CPP17;
65 
67  int Get4thDetectorNwords(int n) OVERRIDE_CPP17;
68 
70  int* Get1stDetectorBuffer(int n) OVERRIDE_CPP17;
71 
73  int* Get2ndDetectorBuffer(int n) OVERRIDE_CPP17;
74 
76  int* Get3rdDetectorBuffer(int n) OVERRIDE_CPP17;
77 
79  int* Get4thDetectorBuffer(int n) OVERRIDE_CPP17;
81 
82  /* //! get posistion of COPPER block in unit of word */
83  /* virtual int GetBufferPos(int n); */
84 
86  virtual int* GetRawTrlBufPtr(int n) OVERRIDE_CPP17;
87 
88  //
89  // Get information from "RawCOPPERFormat_v0 header" attached by DAQ software
90  //
91 
92  int GetExpNo(int n) OVERRIDE_CPP17;
93 
94  unsigned int GetExpRunSubrun(int n) OVERRIDE_CPP17;
95 
96  int GetRunNo(int n) OVERRIDE_CPP17;
97 
98  int GetSubRunNo(int n) OVERRIDE_CPP17;
99 
100  unsigned int GetEveNo(int n) OVERRIDE_CPP17;
101 
102  int GetDataType(int n) OVERRIDE_CPP17;
103 
104  int GetTruncMask(int n) OVERRIDE_CPP17;
105 
107  unsigned int GetErrorBitFlag(int n) OVERRIDE_CPP17;
108 
110  void AddErrorBitFlag(int n, unsigned int error_bit_flag) OVERRIDE_CPP17;
111 
113  unsigned int GetNodeID(int n) OVERRIDE_CPP17;
114 
115  //
116  // Get information from 13words "COPPER header" attached by COPPER board
117  //
119  virtual unsigned int GetCOPPERCounter(int n) OVERRIDE_CPP17;
120 
122  virtual int GetNumFINESSEBlock(int n) OVERRIDE_CPP17;
123 
125  int GetOffset1stFINESSE(int n) OVERRIDE_CPP17;
126 
128  int GetFINESSENwords(int n, int finesse) OVERRIDE_CPP17;
129 
131  int Get1stFINESSENwords(int n) OVERRIDE_CPP17;
132 
134  int Get2ndFINESSENwords(int n) OVERRIDE_CPP17;
135 
137  int Get3rdFINESSENwords(int n) OVERRIDE_CPP17;
138 
140  int Get4thFINESSENwords(int n) OVERRIDE_CPP17;
141 
142  //
143  // Get information from "B2link(attached by FEE and HLSB) header"
144  //
146  // virtual int* GetFTSW2Words(int n);
147 
149  virtual int* GetExpRunSubrunBuf(int n) OVERRIDE_CPP17;
150 
152  virtual unsigned int GetB2LFEE32bitEventNumber(int n) OVERRIDE_CPP17;
153 
154  //
155  // read magic word to check data
156  //
158  unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17;
159 
161  unsigned int GetMagicFPGAHeader(int n) OVERRIDE_CPP17;
162 
164  unsigned int GetMagicFPGATrailer(int n) OVERRIDE_CPP17;
165 
167  unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17;
168 
170  unsigned int GetTrailerChksum(int n) OVERRIDE_CPP17;
171 
173  bool CheckCOPPERMagic(int n) OVERRIDE_CPP17;
174 
175 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
176  void CheckB2LFEEHeaderVersion(int n) OVERRIDE_CPP17;
178 #endif
179 
181  unsigned int GetTTCtimeTRGType(int n) OVERRIDE_CPP17;
182 
184  unsigned int GetTTUtime(int n) OVERRIDE_CPP17;
185 
187  unsigned int FillTopBlockRawHeader(unsigned int m_node_id, unsigned int prev_eve32,
188  unsigned int prev_exprunsubrun_no, unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
189 
191  unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17;
192 
194  unsigned int CalcDriverChkSum(int n) OVERRIDE_CPP17;
195 
197  void CheckData(int n,
198  unsigned int prev_evenum, unsigned int* cur_evenum,
199  unsigned int prev_copper_ctr, unsigned int* cur_copper_ctr,
200  unsigned int prev_exprunsubrun_no, unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
201 
203  void CheckUtimeCtimeTRGType(int n) OVERRIDE_CPP17;
204 
206  int GetTTCtime(int n) OVERRIDE_CPP17;
207 
209  int GetTRGType(int n) OVERRIDE_CPP17;
210 
212  void GetTTTimeVal(int n, struct timeval* tv) OVERRIDE_CPP17;
213 
215  int* PackDetectorBuf(int* packed_buf_nwords,
216  int* detector_buf_1st, int nwords_1st,
217  int* detector_buf_2nd, int nwords_2nd,
218  int* detector_buf_3rd, int nwords_3rd,
219  int* detector_buf_4th, int nwords_4th,
220  RawCOPPERPackerInfo rawcprpacker_info) OVERRIDE_CPP17;
221 
222  enum {
223  DATA_FORMAT_VERSION = 0
224  };
225 
226  //
227  // size of "COPPER front header" and "COPPER trailer"
228  //
230  enum {
231  SIZE_COPPER_DRIVER_HEADER = 7,
232  SIZE_COPPER_DRIVER_TRAILER = 2
233  };
234 
235  //
236  // Data Format : "COPPER header"
237  //
238  enum {
239  POS_MAGIC_COPPER_1 = 0,
240  POS_EVE_NUM_COPPER = 1,
241  POS_SUBSYSTEM_ID = 2,
242  POS_CRATE_ID = 3,
243  POS_SLOT_ID = 4,
244  POS_MAGIC_COPPER_2 = 7,
245  POS_DATA_LENGTH = 8,
246  POS_CH_A_DATA_LENGTH = 9,
247  POS_CH_B_DATA_LENGTH = 10,
248  POS_CH_C_DATA_LENGTH = 11,
249  POS_CH_D_DATA_LENGTH = 12,
250 
251  SIZE_COPPER_HEADER = 13
252  };
253 
254 
255 
256  //
257  // Data Format : "COPPER Trailer"
258  //
259  enum {
260  POS_MAGIC_COPPER_3 = 0,
261  POS_CHKSUM_COPPER = 1,
262  POS_MAGIC_COPPER_4 = 2,
263 
264  SIZE_COPPER_TRAILER = 3
265  };
266 
267  //
268  // Data Format : "B2Link HSLB Header"
269  //
270  enum {
271  POS_MAGIC_B2LHSLB = 0,
272  // POS_EVE_CNT_B2LHSLB = 1,
273  SIZE_B2LHSLB_HEADER = 1
274  };
275 
276  //
277  // Data Format : "B2Link HSLB Trailer"
278  //
279  enum {
280  POS_CHKSUM_B2LHSLB = 0,
281  SIZE_B2LHSLB_TRAILER = 1
282  };
283 
284 
285  // Data Format : "B2Link FEE Header"
286  // modified by Nov. 21, 2013, Nakao-san's New firmware?
287  enum {
288  POS_TT_CTIME_TYPE = 0,
289  POS_TT_TAG = 1,
290  POS_TT_UTIME = 2,
291  POS_EXP_RUN = 3,
292  POS_B2L_CTIME = 4,
293  SIZE_B2LFEE_HEADER = 5
294  };
295 
296 
297  //
298  // Data Format : B2Link FEE Trailer
299  //
300  enum {
301  POS_CHKSUM_B2LFEE = 0,
302  SIZE_B2LFEE_TRAILER = 1
303  };
304 
305  //
306  // COPPER magic words
307  //
308  enum {
309  COPPER_MAGIC_DRIVER_HEADER = 0x7FFF0008,
310  COPPER_MAGIC_FPGA_HEADER = 0xFFFFFAFA,
311  COPPER_MAGIC_FPGA_TRAILER = 0xFFFFF5F5,
312  COPPER_MAGIC_DRIVER_TRAILER = 0x7FFF0009
313  };
314 
317 
320 
321  protected :
323  // ClassDefOverride(RawCOPPERFormat_v0, 2);
324 
325  };
326 
327 
328 
329 
331  {
332  int pos_nwords;
333  if (n == (m_num_events * m_num_nodes) - 1) {
334  pos_nwords = m_nwords - tmp_trailer.GetTrlNwords();
335  } else {
336  pos_nwords = GetBufferPos(n + 1) - tmp_trailer.GetTrlNwords();
337  }
338  return &(m_buffer[ pos_nwords ]);
339  }
340 
341  inline unsigned int RawCOPPERFormat_v0::GetDriverChkSum(int n)
342  {
343  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n)
344  - tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
345  return m_buffer[ pos_nwords ];
346  }
347 
349  {
351  return tmp_header.GetExpNo();
352  }
353 
354  inline unsigned int RawCOPPERFormat_v0::GetExpRunSubrun(int n)
355  {
357  return tmp_header.GetExpRunSubrun();
358  }
359 
361  {
363  return tmp_header.GetRunNo();
364  }
365 
366 
368  {
370  return tmp_header.GetSubRunNo();
371  }
372 
373  inline unsigned int RawCOPPERFormat_v0::GetEveNo(int n)
374  {
376  return tmp_header.GetEveNo();
377  }
378 
379 
380  inline unsigned int RawCOPPERFormat_v0::GetNodeID(int n)
381  {
383  return tmp_header.GetNodeID();
384  }
385 
386 
388  {
390  return tmp_header.GetDataType();
391  }
392 
394  {
396  return tmp_header.GetTruncMask();
397  }
398 
399  inline unsigned int RawCOPPERFormat_v0::GetErrorBitFlag(int n)
400  {
402  return tmp_header.GetErrorBitFlag();
403  }
404 
405  inline void RawCOPPERFormat_v0::AddErrorBitFlag(int n, unsigned int error_bit_flag)
406  {
408  tmp_header.AddErrorBitFlag(error_bit_flag);
409  return;
410  }
411 
412  inline unsigned int RawCOPPERFormat_v0::GetCOPPERCounter(int n)
413  {
414  int pos_nwords = GetBufferPos(n) + POS_EVE_NUM_COPPER + tmp_header.RAWHEADER_NWORDS;
415  return (unsigned int)(m_buffer[ pos_nwords ]);
416  }
417 
418 
419 
420 
422  {
423 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
424  CheckB2LFEEHeaderVersion(n);
425 #endif
426  int nwords = 0;
427  if (Get1stFINESSENwords(n) > 0) {
428  nwords = Get1stFINESSENwords(n) - SIZE_B2LHSLB_HEADER - SIZE_B2LFEE_HEADER
429  - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
430  }
431  return nwords;
432  }
433 
435  {
436 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
437  CheckB2LFEEHeaderVersion(n);
438 #endif
439  int nwords = 0;
440  if (Get2ndFINESSENwords(n) > 0) {
441  nwords = Get2ndFINESSENwords(n) - SIZE_B2LHSLB_HEADER -
442  SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
443  }
444  return nwords;
445  }
446 
448  {
449 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
450  CheckB2LFEEHeaderVersion(n);
451 #endif
452  int nwords = 0;
453  if (Get3rdFINESSENwords(n) > 0) {
454  nwords = Get3rdFINESSENwords(n) - SIZE_B2LHSLB_HEADER -
455  SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
456  }
457  return nwords;
458  }
459 
461  {
462 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
463  CheckB2LFEEHeaderVersion(n);
464 #endif
465  int nwords = 0;
466  if (Get4thFINESSENwords(n) > 0) {
467  nwords = Get4thFINESSENwords(n) - SIZE_B2LHSLB_HEADER -
468  SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
469  }
470  return nwords;
471  }
472 
473 
474 
476  {
477  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_A_DATA_LENGTH;
478  return m_buffer[ pos_nwords ];
479  }
480 
482  {
483  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_B_DATA_LENGTH;
484  return m_buffer[ pos_nwords ];
485  }
486 
488  {
489  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_C_DATA_LENGTH;
490  return m_buffer[ pos_nwords ];
491  }
492 
494  {
495  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_D_DATA_LENGTH;
496  return m_buffer[ pos_nwords ];
497  }
498 
499 
501  {
502  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + SIZE_COPPER_HEADER;
503  return pos_nwords;
504  }
505 
506 
508  {
509 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
510  CheckB2LFEEHeaderVersion(n);
511 #endif
512  if (Get1stFINESSENwords(n) > 0) {
513  int pos_nwords = GetOffset1stFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
514  return &(m_buffer[ pos_nwords ]);
515  }
516  return NULL;
517  }
518 
520  {
521 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
522  CheckB2LFEEHeaderVersion(n);
523 #endif
524  if (Get2ndFINESSENwords(n) > 0) {
525  int pos_nwords = GetOffset2ndFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
526  return &(m_buffer[ pos_nwords ]);
527  }
528  return NULL;
529  }
530 
532  {
533 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
534  CheckB2LFEEHeaderVersion(n);
535 #endif
536  if (Get3rdFINESSENwords(n) > 0) {
537  int pos_nwords = GetOffset3rdFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
538  return &(m_buffer[ pos_nwords ]);
539  }
540  return NULL;
541  }
542 
544  {
545 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
546  CheckB2LFEEHeaderVersion(n);
547 #endif
548  if (Get4thFINESSENwords(n) > 0) {
549  int pos_nwords = GetOffset4thFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
550  return &(m_buffer[ pos_nwords ]);
551  }
552  return NULL;
553  }
554 
556  {
557 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
558  CheckB2LFEEHeaderVersion(n);
559 #endif
560  int pos_nwords = GetOffset1stFINESSE(n) + SIZE_B2LHSLB_HEADER + POS_EXP_RUN;
561  return &(m_buffer[ pos_nwords ]);
562  }
563 
564 
565 
566  inline unsigned int RawCOPPERFormat_v0::GetMagicDriverHeader(int n)
567  {
568  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_MAGIC_COPPER_1;
569  return (unsigned int)(m_buffer[ pos_nwords ]);
570  }
571 
572  inline unsigned int RawCOPPERFormat_v0::GetMagicFPGAHeader(int n)
573  {
574  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_MAGIC_COPPER_2;
575  return (unsigned int)(m_buffer[ pos_nwords ]);
576  }
577 
578  inline unsigned int RawCOPPERFormat_v0::GetMagicFPGATrailer(int n)
579  {
580  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n) - tmp_trailer.GetTrlNwords() - 3;
581 
582  // printf( "[DEBUG] 1 %d 2 %d 3 %d\n", GetBufferPos(n), GetBlockNwords(n), tmp_trailer.GetTrlNwords());
583 
584  return (unsigned int)(m_buffer[ pos_nwords ]);
585  }
586 
587  inline unsigned int RawCOPPERFormat_v0::GetMagicDriverTrailer(int n)
588  {
589  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n) - tmp_trailer.GetTrlNwords() - 1;
590  return (unsigned int)(m_buffer[ pos_nwords ]);
591  }
592 
593 
594  inline unsigned int RawCOPPERFormat_v0::GetTrailerChksum(int n)
595  {
596  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n) - tmp_trailer.GetTrlNwords() + tmp_trailer.POS_CHKSUM;
597  return (unsigned int)(m_buffer[ pos_nwords ]);
598  }
599 
600 
601  inline unsigned int RawCOPPERFormat_v0::GetTTCtimeTRGType(int n)
602  {
604  return tmp_header.GetTTCtimeTRGType();
605  }
606 
607  inline unsigned int RawCOPPERFormat_v0::GetTTUtime(int n)
608  {
610  return tmp_header.GetTTUtime();
611  }
612 
613 
615  {
617  return tmp_header.GetTTCtime();
618  }
619 
621  {
623  return tmp_header.GetTRGType();
624  }
625 
626  inline void RawCOPPERFormat_v0::GetTTTimeVal(int n, struct timeval* tv)
627  {
630  return ;
631  }
632 
633 
634 
636 }
637 
638 #endif
Belle2::RawCOPPERFormat_v0::GetTRGType
int GetTRGType(int n) OVERRIDE_CPP17
Get trgtype.
Definition: RawCOPPERFormat_v0.h:620
Belle2::RawCOPPERPackerInfo
struct to contain header information used by RawCOPPERFormat::Packer()
Definition: RawCOPPERPackerInfo.h:12
Belle2::RawCOPPERFormat::GetOffset3rdFINESSE
virtual int GetOffset3rdFINESSE(int n)
get # of offset words for FINESSE slot C buffer position
Definition: RawCOPPERFormat.h:365
Belle2::RawHeader_v0::GetDataType
int GetDataType()
get contents of header
Definition: RawHeader_v0.h:413
Belle2::RawCOPPERFormat_v0::GetMagicFPGATrailer
unsigned int GetMagicFPGATrailer(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA trailer
Definition: RawCOPPERFormat_v0.h:578
Belle2::RawHeader_v0::SetBuffer
void SetBuffer(int *bufin)
set buffer
Definition: RawHeader_v0.h:49
Belle2::RawHeader_v0::GetRunNo
int GetRunNo()
get contents of header
Definition: RawHeader_v0.h:381
Belle2::RawDataBlockFormat::m_nwords
int m_nwords
number of words of buffer
Definition: RawDataBlockFormat.h:89
Belle2::RawCOPPERFormat_v0::GetOffset1stFINESSE
int GetOffset1stFINESSE(int n) OVERRIDE_CPP17
get # of offset words for FINESSE slot A buffer position
Definition: RawCOPPERFormat_v0.h:500
Belle2::RawDataBlockFormat::m_buffer
int * m_buffer
Buffer.
Definition: RawDataBlockFormat.h:98
Belle2::RawDataBlockFormat::GetBufferPos
virtual int GetBufferPos(int n)
get position of data block in word
Definition: RawDataBlockFormat.cc:30
Belle2::RawCOPPERFormat_v0::Get1stFINESSENwords
int Get1stFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot A buffer
Definition: RawCOPPERFormat_v0.h:475
Belle2::RawHeader_v0::GetExpNo
int GetExpNo()
get a run/exp number combined word
Definition: RawHeader_v0.h:373
Belle2::RawCOPPERFormat_v0::GetRawTrlBufPtr
virtual int * GetRawTrlBufPtr(int n) OVERRIDE_CPP17
get buffer pointer of rawcopper trailer
Definition: RawCOPPERFormat_v0.h:330
Belle2::RawHeader_v0::GetTRGType
int GetTRGType()
get TRGType
Definition: RawHeader_v0.h:480
Belle2::RawCOPPERFormat_v0::CheckData
void CheckData(int n, unsigned int prev_evenum, unsigned int *cur_evenum, unsigned int prev_copper_ctr, unsigned int *cur_copper_ctr, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no) OVERRIDE_CPP17
check data contents
Definition: RawCOPPERFormat_v0.cc:172
Belle2::RawCOPPERFormat_v0::RawCOPPERFormat_v0
RawCOPPERFormat_v0()
Default constructor.
Definition: RawCOPPERFormat_v0.cc:21
Belle2::RawCOPPERFormat_v0::CheckCOPPERMagic
bool CheckCOPPERMagic(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
Definition: RawCOPPERFormat_v0.cc:335
Belle2::RawCOPPERFormat_v0::GetTTTimeVal
void GetTTTimeVal(int n, struct timeval *tv) OVERRIDE_CPP17
Get timeval.
Definition: RawCOPPERFormat_v0.h:626
Belle2::RawCOPPERFormat_v0::GetNumFINESSEBlock
virtual int GetNumFINESSEBlock(int n) OVERRIDE_CPP17
get # of FINNESEs which contains data
Definition: RawCOPPERFormat_v0.cc:42
Belle2::RawDataBlockFormat::GetBuffer
virtual int * GetBuffer(int n)
get nth buffer pointer
Definition: RawDataBlockFormat.cc:124
Belle2::RawHeader_v0::GetTTCtime
int GetTTCtime()
get contents of header
Definition: RawHeader_v0.h:474
Belle2::RawHeader_v0::GetTTTimeVal
void GetTTTimeVal(struct timeval *tv)
get contents of header
Definition: RawHeader_v0.h:493
Belle2::RawCOPPERFormat::GetOffset2ndFINESSE
virtual int GetOffset2ndFINESSE(int n)
get # of offset words for FINESSE slot B buffer position
Definition: RawCOPPERFormat.h:360
Belle2::RawCOPPERFormat_v0::Get2ndDetectorBuffer
int * Get2ndDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot B
Definition: RawCOPPERFormat_v0.h:519
Belle2::RawCOPPERFormat_v0::GetExpRunSubrunBuf
virtual int * GetExpRunSubrunBuf(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
Definition: RawCOPPERFormat_v0.h:555
Belle2::RawCOPPERFormat_v0::GetNodeID
unsigned int GetNodeID(int n) OVERRIDE_CPP17
get node-ID from data
Definition: RawCOPPERFormat_v0.h:380
Belle2::RawHeader_v0::GetTTCtimeTRGType
unsigned int GetTTCtimeTRGType()
get contents of header
Definition: RawHeader_v0.h:468
Belle2::RawCOPPERFormat_v0::Get2ndDetectorNwords
int Get2ndDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot B
Definition: RawCOPPERFormat_v0.h:434
Belle2::RawCOPPERFormat_v0::GetDriverChkSum
unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17
read COPPER driver's checksum value
Definition: RawCOPPERFormat_v0.h:341
Belle2::RawHeader_v0
The Raw Header class ver.0 ( from August, 2013 to April, 2014 ) This class defines the format of the ...
Definition: RawHeader_v0.h:34
Belle2::RawCOPPERFormat_v0::~RawCOPPERFormat_v0
virtual ~RawCOPPERFormat_v0()
Constructor using existing pointer to raw data buffer.
Definition: RawCOPPERFormat_v0.cc:25
Belle2::RawCOPPERFormat_v0::FillTopBlockRawHeader
unsigned int FillTopBlockRawHeader(unsigned int m_node_id, unsigned int prev_eve32, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no) OVERRIDE_CPP17
should be called by DeSerializerCOPPER.cc and fill contents in RawHeader
Definition: RawCOPPERFormat_v0.cc:396
Belle2::RawDataBlockFormat::m_num_nodes
int m_num_nodes
number of nodes in this object
Definition: RawDataBlockFormat.h:92
Belle2::RawCOPPERFormat_v0
The Raw COPPER class ver.0 ( from August, 2013 to April, 2014 ) This class stores data received by CO...
Definition: RawCOPPERFormat_v0.h:35
Belle2::RawHeader_v0::GetTruncMask
int GetTruncMask()
get contents of header
Definition: RawHeader_v0.h:419
Belle2::RawTrailer_v0::GetTrlNwords
int GetTrlNwords()
Set magic word.
Definition: RawTrailer_v0.h:129
Belle2::RawHeader_v0::GetSubRunNo
int GetSubRunNo()
get run # (14bit)
Definition: RawHeader_v0.h:388
Belle2::RawCOPPERFormat_v0::GetDetectorNwords
int GetDetectorNwords(int n, int finesse_num) OVERRIDE_CPP17
get Detector buffer length
Definition: RawCOPPERFormat_v0.cc:57
Belle2::RawDataBlockFormat::m_num_events
int m_num_events
number of events in this object
Definition: RawDataBlockFormat.h:95
Belle2::RawCOPPERFormat_v0::GetTruncMask
int GetTruncMask(int n) OVERRIDE_CPP17
get contents of header
Definition: RawCOPPERFormat_v0.h:393
Belle2::RawCOPPERFormat_v0::GetMagicDriverHeader
unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17
get magic word of COPPER driver header
Definition: RawCOPPERFormat_v0.h:566
Belle2::RawCOPPERFormat_v0::Get3rdDetectorNwords
int Get3rdDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot C
Definition: RawCOPPERFormat_v0.h:447
Belle2::RawCOPPERFormat_v0::CheckUtimeCtimeTRGType
void CheckUtimeCtimeTRGType(int n) OVERRIDE_CPP17
check data contents
Definition: RawCOPPERFormat_v0.cc:349
Belle2::RawCOPPERFormat_v0::GetExpRunSubrun
unsigned int GetExpRunSubrun(int n) OVERRIDE_CPP17
get Experimental # from header
Definition: RawCOPPERFormat_v0.h:354
Belle2::RawCOPPERFormat::GetOffset4thFINESSE
virtual int GetOffset4thFINESSE(int n)
get # of offset words for FINESSE slot D buffer position
Definition: RawCOPPERFormat.h:370
Belle2::RawCOPPERFormat_v0::GetMagicFPGAHeader
unsigned int GetMagicFPGAHeader(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA header
Definition: RawCOPPERFormat_v0.h:572
Belle2::RawCOPPERFormat_v0::GetTrailerChksum
unsigned int GetTrailerChksum(int n) OVERRIDE_CPP17
Get checksum in RawTrailer.
Definition: RawCOPPERFormat_v0.h:594
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RawCOPPERFormat_v0::Get3rdDetectorBuffer
int * Get3rdDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot C
Definition: RawCOPPERFormat_v0.h:531
Belle2::RawDataBlockFormat::GetBlockNwords
virtual int GetBlockNwords(int n)
get size of a data block
Definition: RawDataBlockFormat.cc:107
Belle2::RawCOPPERFormat_v0::tmp_header
RawHeader_v0 tmp_header
header ( not recorded )
Definition: RawCOPPERFormat_v0.h:316
Belle2::RawCOPPERFormat_v0::PackDetectorBuf
int * PackDetectorBuf(int *packed_buf_nwords, int *detector_buf_1st, int nwords_1st, int *detector_buf_2nd, int nwords_2nd, int *detector_buf_3rd, int nwords_3rd, int *detector_buf_4th, int nwords_4th, RawCOPPERPackerInfo rawcprpacker_info) OVERRIDE_CPP17
Pack data (format ver. = -1 -> Select the latest format version)
Definition: RawCOPPERFormat_v0.cc:703
Belle2::RawCOPPERFormat_v0::GetTTCtimeTRGType
unsigned int GetTTCtimeTRGType(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
Definition: RawCOPPERFormat_v0.h:601
Belle2::RawTrailer_v0
The Raw Trailer class ver.0 ( from August, 2013 to April, 2014 ) This class defines the format of the...
Definition: RawTrailer_v0.h:36
Belle2::RawHeader_v0::GetEveNo
unsigned int GetEveNo()
get restart #(8bit)
Definition: RawHeader_v0.h:401
Belle2::RawCOPPERFormat_v0::GetExpNo
int GetExpNo(int n) OVERRIDE_CPP17
get Experimental # from header
Definition: RawCOPPERFormat_v0.h:348
Belle2::RawCOPPERFormat_v0::Get4thDetectorNwords
int Get4thDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot D
Definition: RawCOPPERFormat_v0.h:460
Belle2::RawCOPPERFormat_v0::Get1stDetectorNwords
int Get1stDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot A
Definition: RawCOPPERFormat_v0.h:421
Belle2::RawCOPPERFormat_v0::Get4thFINESSENwords
int Get4thFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot D buffer
Definition: RawCOPPERFormat_v0.h:493
Belle2::RawCOPPERFormat_v0::GetFINESSENwords
int GetFINESSENwords(int n, int finesse) OVERRIDE_CPP17
get data size of FINESSE buffer
Definition: RawCOPPERFormat_v0.cc:84
Belle2::RawCOPPERFormat_v0::GetB2LFEE32bitEventNumber
virtual unsigned int GetB2LFEE32bitEventNumber(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
Definition: RawCOPPERFormat_v0.cc:117
Belle2::RawCOPPERFormat_v0::GetMagicDriverTrailer
unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17
get magic word of COPPER driver trailer
Definition: RawCOPPERFormat_v0.h:587
Belle2::RawCOPPERFormat_v0::Get3rdFINESSENwords
int Get3rdFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot C buffer
Definition: RawCOPPERFormat_v0.h:487
Belle2::RawCOPPERFormat_v0::GetRunNo
int GetRunNo(int n) OVERRIDE_CPP17
Exp# (10bit) run# (14bit) restart # (8bit)
Definition: RawCOPPERFormat_v0.h:360
Belle2::RawHeader_v0::GetTTUtime
unsigned int GetTTUtime()
get contents of header
Definition: RawHeader_v0.h:487
Belle2::RawCOPPERFormat_v0::GetSubRunNo
int GetSubRunNo(int n) OVERRIDE_CPP17
get run # (14bit)
Definition: RawCOPPERFormat_v0.h:367
Belle2::RawCOPPERFormat_v0::Get2ndFINESSENwords
int Get2ndFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot B buffer
Definition: RawCOPPERFormat_v0.h:481
Belle2::RawCOPPERFormat_v0::GetTTCtime
int GetTTCtime(int n) OVERRIDE_CPP17
Get ctime.
Definition: RawCOPPERFormat_v0.h:614
Belle2::RawCOPPERFormat_v0::GetEveNo
unsigned int GetEveNo(int n) OVERRIDE_CPP17
get subrun #(8bit)
Definition: RawCOPPERFormat_v0.h:373
Belle2::RawHeader_v0::AddErrorBitFlag
void AddErrorBitFlag(unsigned int error_bit_flag)
Add Detected Error bitflag.
Definition: RawHeader_v0.h:431
Belle2::RawCOPPERFormat_v0::GetTTUtime
unsigned int GetTTUtime(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
Definition: RawCOPPERFormat_v0.h:607
Belle2::RawCOPPERFormat_v0::CalcDriverChkSum
unsigned int CalcDriverChkSum(int n) OVERRIDE_CPP17
calc COPPER driver's checksum value
Definition: RawCOPPERFormat_v0.cc:29
Belle2::RawCOPPERFormat_v0::tmp_trailer
RawTrailer_v0 tmp_trailer
trailer ( not recorded )
Definition: RawCOPPERFormat_v0.h:319
Belle2::RawCOPPERFormat_v0::Get4thDetectorBuffer
int * Get4thDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot D
Definition: RawCOPPERFormat_v0.h:543
Belle2::RawCOPPERFormat_v0::AddErrorBitFlag
void AddErrorBitFlag(int n, unsigned int error_bit_flag) OVERRIDE_CPP17
Add Detected Error bitflag.
Definition: RawCOPPERFormat_v0.h:405
Belle2::RawCOPPERFormat_v0::GetCOPPERCounter
virtual unsigned int GetCOPPERCounter(int n) OVERRIDE_CPP17
get COPPER counter(not event number)
Definition: RawCOPPERFormat_v0.h:412
Belle2::RawCOPPERFormat_v0::GetErrorBitFlag
unsigned int GetErrorBitFlag(int n) OVERRIDE_CPP17
get contents of header
Definition: RawCOPPERFormat_v0.h:399
Belle2::RawHeader_v0::GetNodeID
unsigned int GetNodeID()
get contents of header
Definition: RawHeader_v0.h:407
Belle2::RawCOPPERFormat_v0::Get1stDetectorBuffer
int * Get1stDetectorBuffer(int n) OVERRIDE_CPP17
get Detector buffer of slot A
Definition: RawCOPPERFormat_v0.h:507
Belle2::RawCOPPERFormat
The Raw COPPER class This class stores data received by COPPER via belle2linkt Data from all detector...
Definition: RawCOPPERFormat.h:53
Belle2::RawCOPPERFormat_v0::GetDataType
int GetDataType(int n) OVERRIDE_CPP17
get contents of header
Definition: RawCOPPERFormat_v0.h:387
Belle2::RawHeader_v0::GetErrorBitFlag
unsigned int GetErrorBitFlag()
get contents of header
Definition: RawHeader_v0.h:425
Belle2::RawHeader_v0::GetExpRunSubrun
unsigned int GetExpRunSubrun()
get contents of header
Definition: RawHeader_v0.h:394