Belle II Software  release-05-02-19
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 
223  /* cppcheck-suppress missingOverride */
224  int GetMaxNumOfCh(int n) OVERRIDE_CPP17;
225 
226  enum {
227  DATA_FORMAT_VERSION = 0
228  };
229 
230  //
231  // size of "COPPER front header" and "COPPER trailer"
232  //
234  enum {
235  SIZE_COPPER_DRIVER_HEADER = 7,
236  SIZE_COPPER_DRIVER_TRAILER = 2
237  };
238 
239  //
240  // Data Format : "COPPER header"
241  //
242  enum {
243  POS_MAGIC_COPPER_1 = 0,
244  POS_EVE_NUM_COPPER = 1,
245  POS_SUBSYSTEM_ID = 2,
246  POS_CRATE_ID = 3,
247  POS_SLOT_ID = 4,
248  POS_MAGIC_COPPER_2 = 7,
249  POS_DATA_LENGTH = 8,
250  POS_CH_A_DATA_LENGTH = 9,
251  POS_CH_B_DATA_LENGTH = 10,
252  POS_CH_C_DATA_LENGTH = 11,
253  POS_CH_D_DATA_LENGTH = 12,
254 
255  SIZE_COPPER_HEADER = 13
256  };
257 
258 
259 
260  //
261  // Data Format : "COPPER Trailer"
262  //
263  enum {
264  POS_MAGIC_COPPER_3 = 0,
265  POS_CHKSUM_COPPER = 1,
266  POS_MAGIC_COPPER_4 = 2,
267 
268  SIZE_COPPER_TRAILER = 3
269  };
270 
271  //
272  // Data Format : "B2Link HSLB Header"
273  //
274  enum {
275  POS_MAGIC_B2LHSLB = 0,
276  // POS_EVE_CNT_B2LHSLB = 1,
277  SIZE_B2LHSLB_HEADER = 1
278  };
279 
280  //
281  // Data Format : "B2Link HSLB Trailer"
282  //
283  enum {
284  POS_CHKSUM_B2LHSLB = 0,
285  SIZE_B2LHSLB_TRAILER = 1
286  };
287 
288 
289  // Data Format : "B2Link FEE Header"
290  // modified by Nov. 21, 2013, Nakao-san's New firmware?
291  enum {
292  POS_TT_CTIME_TYPE = 0,
293  POS_TT_TAG = 1,
294  POS_TT_UTIME = 2,
295  POS_EXP_RUN = 3,
296  POS_B2L_CTIME = 4,
297  SIZE_B2LFEE_HEADER = 5
298  };
299 
300 
301  //
302  // Data Format : B2Link FEE Trailer
303  //
304  enum {
305  POS_CHKSUM_B2LFEE = 0,
306  SIZE_B2LFEE_TRAILER = 1
307  };
308 
309  //
310  // COPPER magic words
311  //
312  enum {
313  COPPER_MAGIC_DRIVER_HEADER = 0x7FFF0008,
314  COPPER_MAGIC_FPGA_HEADER = 0xFFFFFAFA,
315  COPPER_MAGIC_FPGA_TRAILER = 0xFFFFF5F5,
316  COPPER_MAGIC_DRIVER_TRAILER = 0x7FFF0009
317  };
318 
321 
324 
325  protected :
327  // ClassDefOverride(RawCOPPERFormat_v0, 2);
328 
329  };
330 
331 
332 
333 
335  {
336  int pos_nwords;
337  if (n == (m_num_events * m_num_nodes) - 1) {
338  pos_nwords = m_nwords - tmp_trailer.GetTrlNwords();
339  } else {
340  pos_nwords = GetBufferPos(n + 1) - tmp_trailer.GetTrlNwords();
341  }
342  return &(m_buffer[ pos_nwords ]);
343  }
344 
345  inline unsigned int RawCOPPERFormat_v0::GetDriverChkSum(int n)
346  {
347  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n)
348  - tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
349  return m_buffer[ pos_nwords ];
350  }
351 
353  {
355  return tmp_header.GetExpNo();
356  }
357 
358  inline unsigned int RawCOPPERFormat_v0::GetExpRunSubrun(int n)
359  {
361  return tmp_header.GetExpRunSubrun();
362  }
363 
365  {
367  return tmp_header.GetRunNo();
368  }
369 
370 
372  {
374  return tmp_header.GetSubRunNo();
375  }
376 
377  inline unsigned int RawCOPPERFormat_v0::GetEveNo(int n)
378  {
380  return tmp_header.GetEveNo();
381  }
382 
383 
384  inline unsigned int RawCOPPERFormat_v0::GetNodeID(int n)
385  {
387  return tmp_header.GetNodeID();
388  }
389 
390 
392  {
394  return tmp_header.GetDataType();
395  }
396 
398  {
400  return tmp_header.GetTruncMask();
401  }
402 
403  inline unsigned int RawCOPPERFormat_v0::GetErrorBitFlag(int n)
404  {
406  return tmp_header.GetErrorBitFlag();
407  }
408 
409  inline void RawCOPPERFormat_v0::AddErrorBitFlag(int n, unsigned int error_bit_flag)
410  {
412  tmp_header.AddErrorBitFlag(error_bit_flag);
413  return;
414  }
415 
416  inline unsigned int RawCOPPERFormat_v0::GetCOPPERCounter(int n)
417  {
418  int pos_nwords = GetBufferPos(n) + POS_EVE_NUM_COPPER + tmp_header.RAWHEADER_NWORDS;
419  return (unsigned int)(m_buffer[ pos_nwords ]);
420  }
421 
422 
423 
424 
426  {
427 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
428  CheckB2LFEEHeaderVersion(n);
429 #endif
430  int nwords = 0;
431  if (Get1stFINESSENwords(n) > 0) {
432  nwords = Get1stFINESSENwords(n) - SIZE_B2LHSLB_HEADER - SIZE_B2LFEE_HEADER
433  - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
434  }
435  return nwords;
436  }
437 
439  {
440 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
441  CheckB2LFEEHeaderVersion(n);
442 #endif
443  int nwords = 0;
444  if (Get2ndFINESSENwords(n) > 0) {
445  nwords = Get2ndFINESSENwords(n) - SIZE_B2LHSLB_HEADER -
446  SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
447  }
448  return nwords;
449  }
450 
452  {
453 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
454  CheckB2LFEEHeaderVersion(n);
455 #endif
456  int nwords = 0;
457  if (Get3rdFINESSENwords(n) > 0) {
458  nwords = Get3rdFINESSENwords(n) - SIZE_B2LHSLB_HEADER -
459  SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
460  }
461  return nwords;
462  }
463 
465  {
466 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
467  CheckB2LFEEHeaderVersion(n);
468 #endif
469  int nwords = 0;
470  if (Get4thFINESSENwords(n) > 0) {
471  nwords = Get4thFINESSENwords(n) - SIZE_B2LHSLB_HEADER -
472  SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
473  }
474  return nwords;
475  }
476 
477 
478 
480  {
481  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_A_DATA_LENGTH;
482  return m_buffer[ pos_nwords ];
483  }
484 
486  {
487  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_B_DATA_LENGTH;
488  return m_buffer[ pos_nwords ];
489  }
490 
492  {
493  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_C_DATA_LENGTH;
494  return m_buffer[ pos_nwords ];
495  }
496 
498  {
499  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_CH_D_DATA_LENGTH;
500  return m_buffer[ pos_nwords ];
501  }
502 
503 
505  {
506  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + SIZE_COPPER_HEADER;
507  return pos_nwords;
508  }
509 
510 
512  {
513 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
514  CheckB2LFEEHeaderVersion(n);
515 #endif
516  if (Get1stFINESSENwords(n) > 0) {
517  int pos_nwords = GetOffset1stFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
518  return &(m_buffer[ pos_nwords ]);
519  }
520  return NULL;
521  }
522 
524  {
525 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
526  CheckB2LFEEHeaderVersion(n);
527 #endif
528  if (Get2ndFINESSENwords(n) > 0) {
529  int pos_nwords = GetOffset2ndFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
530  return &(m_buffer[ pos_nwords ]);
531  }
532  return NULL;
533  }
534 
536  {
537 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
538  CheckB2LFEEHeaderVersion(n);
539 #endif
540  if (Get3rdFINESSENwords(n) > 0) {
541  int pos_nwords = GetOffset3rdFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
542  return &(m_buffer[ pos_nwords ]);
543  }
544  return NULL;
545  }
546 
548  {
549 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
550  CheckB2LFEEHeaderVersion(n);
551 #endif
552  if (Get4thFINESSENwords(n) > 0) {
553  int pos_nwords = GetOffset4thFINESSE(n) + SIZE_B2LHSLB_HEADER + SIZE_B2LFEE_HEADER;
554  return &(m_buffer[ pos_nwords ]);
555  }
556  return NULL;
557  }
558 
560  {
561 #ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
562  CheckB2LFEEHeaderVersion(n);
563 #endif
564  int pos_nwords = GetOffset1stFINESSE(n) + SIZE_B2LHSLB_HEADER + POS_EXP_RUN;
565  return &(m_buffer[ pos_nwords ]);
566  }
567 
568 
569 
570  inline unsigned int RawCOPPERFormat_v0::GetMagicDriverHeader(int n)
571  {
572  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_MAGIC_COPPER_1;
573  return (unsigned int)(m_buffer[ pos_nwords ]);
574  }
575 
576  inline unsigned int RawCOPPERFormat_v0::GetMagicFPGAHeader(int n)
577  {
578  int pos_nwords = GetBufferPos(n) + tmp_header.RAWHEADER_NWORDS + POS_MAGIC_COPPER_2;
579  return (unsigned int)(m_buffer[ pos_nwords ]);
580  }
581 
582  inline unsigned int RawCOPPERFormat_v0::GetMagicFPGATrailer(int n)
583  {
584  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n) - tmp_trailer.GetTrlNwords() - 3;
585 
586  // printf( "[DEBUG] 1 %d 2 %d 3 %d\n", GetBufferPos(n), GetBlockNwords(n), tmp_trailer.GetTrlNwords());
587 
588  return (unsigned int)(m_buffer[ pos_nwords ]);
589  }
590 
591  inline unsigned int RawCOPPERFormat_v0::GetMagicDriverTrailer(int n)
592  {
593  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n) - tmp_trailer.GetTrlNwords() - 1;
594  return (unsigned int)(m_buffer[ pos_nwords ]);
595  }
596 
597 
598  inline unsigned int RawCOPPERFormat_v0::GetTrailerChksum(int n)
599  {
600  int pos_nwords = GetBufferPos(n) + GetBlockNwords(n) - tmp_trailer.GetTrlNwords() + tmp_trailer.POS_CHKSUM;
601  return (unsigned int)(m_buffer[ pos_nwords ]);
602  }
603 
604 
605  inline unsigned int RawCOPPERFormat_v0::GetTTCtimeTRGType(int n)
606  {
608  return tmp_header.GetTTCtimeTRGType();
609  }
610 
611  inline unsigned int RawCOPPERFormat_v0::GetTTUtime(int n)
612  {
614  return tmp_header.GetTTUtime();
615  }
616 
617 
619  {
621  return tmp_header.GetTTCtime();
622  }
623 
625  {
627  return tmp_header.GetTRGType();
628  }
629 
630  inline void RawCOPPERFormat_v0::GetTTTimeVal(int n, struct timeval* tv)
631  {
634  return ;
635  }
636 
637  inline int RawCOPPERFormat_v0::GetMaxNumOfCh(int/* n */)
638  {
639  return MAX_COPPER_CH;
640  }
641 
643 }
644 
645 #endif
Belle2::RawCOPPERFormat_v0::GetTRGType
int GetTRGType(int n) OVERRIDE_CPP17
Get trgtype.
Definition: RawCOPPERFormat_v0.h:624
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:382
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:582
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:504
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:479
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:334
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:630
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::RawCOPPERFormat_v0::GetMaxNumOfCh
int GetMaxNumOfCh(int n) OVERRIDE_CPP17
Get the max number of channels in a readout board.
Definition: RawCOPPERFormat_v0.h:637
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:377
Belle2::RawCOPPERFormat_v0::Get2ndDetectorBuffer
int * Get2ndDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot B
Definition: RawCOPPERFormat_v0.h:523
Belle2::RawCOPPERFormat_v0::GetExpRunSubrunBuf
virtual int * GetExpRunSubrunBuf(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
Definition: RawCOPPERFormat_v0.h:559
Belle2::RawCOPPERFormat_v0::GetNodeID
unsigned int GetNodeID(int n) OVERRIDE_CPP17
get node-ID from data
Definition: RawCOPPERFormat_v0.h:384
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:438
Belle2::RawCOPPERFormat_v0::GetDriverChkSum
unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17
read COPPER driver's checksum value
Definition: RawCOPPERFormat_v0.h:345
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:397
Belle2::RawCOPPERFormat_v0::GetMagicDriverHeader
unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17
get magic word of COPPER driver header
Definition: RawCOPPERFormat_v0.h:570
Belle2::RawCOPPERFormat_v0::Get3rdDetectorNwords
int Get3rdDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot C
Definition: RawCOPPERFormat_v0.h:451
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:358
Belle2::RawCOPPERFormat::GetOffset4thFINESSE
virtual int GetOffset4thFINESSE(int n)
get # of offset words for FINESSE slot D buffer position
Definition: RawCOPPERFormat.h:387
Belle2::RawCOPPERFormat_v0::GetMagicFPGAHeader
unsigned int GetMagicFPGAHeader(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA header
Definition: RawCOPPERFormat_v0.h:576
Belle2::RawCOPPERFormat_v0::GetTrailerChksum
unsigned int GetTrailerChksum(int n) OVERRIDE_CPP17
Get checksum in RawTrailer.
Definition: RawCOPPERFormat_v0.h:598
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:535
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:320
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:605
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:352
Belle2::RawCOPPERFormat_v0::Get4thDetectorNwords
int Get4thDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot D
Definition: RawCOPPERFormat_v0.h:464
Belle2::RawCOPPERFormat_v0::Get1stDetectorNwords
int Get1stDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot A
Definition: RawCOPPERFormat_v0.h:425
Belle2::RawCOPPERFormat_v0::Get4thFINESSENwords
int Get4thFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot D buffer
Definition: RawCOPPERFormat_v0.h:497
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:591
Belle2::RawCOPPERFormat_v0::Get3rdFINESSENwords
int Get3rdFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot C buffer
Definition: RawCOPPERFormat_v0.h:491
Belle2::RawCOPPERFormat_v0::GetRunNo
int GetRunNo(int n) OVERRIDE_CPP17
Exp# (10bit) run# (14bit) restart # (8bit)
Definition: RawCOPPERFormat_v0.h:364
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:371
Belle2::RawCOPPERFormat_v0::Get2ndFINESSENwords
int Get2ndFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot B buffer
Definition: RawCOPPERFormat_v0.h:485
Belle2::RawCOPPERFormat_v0::GetTTCtime
int GetTTCtime(int n) OVERRIDE_CPP17
Get ctime.
Definition: RawCOPPERFormat_v0.h:618
Belle2::RawCOPPERFormat_v0::GetEveNo
unsigned int GetEveNo(int n) OVERRIDE_CPP17
get subrun #(8bit)
Definition: RawCOPPERFormat_v0.h:377
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:611
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:323
Belle2::RawCOPPERFormat_v0::Get4thDetectorBuffer
int * Get4thDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot D
Definition: RawCOPPERFormat_v0.h:547
Belle2::RawCOPPERFormat_v0::AddErrorBitFlag
void AddErrorBitFlag(int n, unsigned int error_bit_flag) OVERRIDE_CPP17
Add Detected Error bitflag.
Definition: RawCOPPERFormat_v0.h:409
Belle2::RawCOPPERFormat_v0::GetCOPPERCounter
virtual unsigned int GetCOPPERCounter(int n) OVERRIDE_CPP17
get COPPER counter(not event number)
Definition: RawCOPPERFormat_v0.h:416
Belle2::RawCOPPERFormat_v0::GetErrorBitFlag
unsigned int GetErrorBitFlag(int n) OVERRIDE_CPP17
get contents of header
Definition: RawCOPPERFormat_v0.h:403
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:511
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:391
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