Belle II Software  release-06-01-15
ARICHRawDataHeader.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef ARICHRAWDATAHEADER_H
9 #define ARICHRAWDATAHEADER_H
10 
11 #include <iostream>
12 #include <vector>
13 
14 
15 namespace Belle2 {
21 #define ARICHFEB_HEADER_SIZE 10 // FEB header size in bytes
22 #define ARICHRAW_HEADER_SIZE 12 // Raw header size in bytes
23 
24  struct ARICHRawHeader {
25  uint8_t type = 0;
26  uint8_t version = 0;
27  uint8_t mergerID = 0;
28  uint8_t FEBSlot = 0;
29  uint32_t length = 0;
30  uint32_t trigger = 0;
31  std::vector<bool> SEU_FEB = std::vector<bool>(6, false);
32  bool thscan_mode = false;
33  unsigned vth = 0;
34 
35  void print()
36  {
37  std::cout << "Type: " << unsigned(type) << " version: " << unsigned(version) << std::endl;
38  std::cout << "mergerID: " << unsigned(mergerID) << " FEBSlot: " << unsigned(FEBSlot) << std::endl;
39  std::cout << "data length: " << length << " trigger No.: " << trigger << std::endl;
40  std::cout << "SEU of FEB: " << SEU_FEB[5] << " " << SEU_FEB[4] << " " << SEU_FEB[3] << " " << SEU_FEB[2] << " " << SEU_FEB[1] << " "
41  << SEU_FEB[0] << std::endl;
42  std::cout << "thscan_mode: " << thscan_mode << ", vth: " << vth << std::endl;
43  }
44 
45  };
47 }
48 
49 
50 #endif
Abstract base class for different kinds of events.