Belle II Software  release-08-01-10
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 #pragma once
9 
10 #include <iostream>
11 #include <vector>
12 
13 
14 namespace Belle2 {
20 #define ARICHFEB_HEADER_SIZE 10 // FEB header size in bytes
21 #define ARICHRAW_HEADER_SIZE 12 // Raw header size in bytes
22 
23  struct ARICHRawHeader {
24  uint8_t type = 0;
25  uint8_t version = 0;
26  uint8_t mergerID = 0;
27  uint8_t FEBSlot = 0;
28  uint32_t length = 0;
29  uint32_t trigger = 0;
30  std::vector<bool> SEU_FEB = std::vector<bool>(6, false);
31  bool thscan_mode = false;
32  unsigned vth = 0;
33 
34  void print()
35  {
36  std::cout << "Type: " << unsigned(type) << " version: " << unsigned(version) << std::endl;
37  std::cout << "mergerID: " << unsigned(mergerID) << " FEBSlot: " << unsigned(FEBSlot) << std::endl;
38  std::cout << "data length: " << length << " trigger No.: " << trigger << std::endl;
39  std::cout << "SEU of FEB: " << SEU_FEB[5] << " " << SEU_FEB[4] << " " << SEU_FEB[3] << " " << SEU_FEB[2] << " " << SEU_FEB[1] << " "
40  << SEU_FEB[0] << std::endl;
41  std::cout << "thscan_mode: " << thscan_mode << ", vth: " << vth << std::endl;
42  }
43 
44  };
46 }
Abstract base class for different kinds of events.