Belle II Software  release-08-01-10
SVDTriggerType.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 
9 #ifndef SVDTRIGGERTYPE_H
10 #define SVDTRIGGERTYPE_H
11 
12 #include <cstdint>
13 
14 namespace Belle2 {
24 
25  public:
27  typedef uint8_t baseType;
28 
31  {
32  m_triggerID.type = type;
33  }
34 
36  void setType(baseType type) { m_triggerID.type = type; }
37 
39  baseType getType() const { return m_triggerID.type; }
40 
41  /*
42  * additional methods will come later...
43  */
44 
45  private:
46 
68  union {
71 
72  // 2 structs convenient for retrieving info (maybe one more to come....)
73  struct {
74  baseType bin1: 1;
76  baseType bin3: 1;
77  baseType bin4: 1;
78  } parts1;
79  struct {
80  baseType bin12: 2;
82  } parts2;
83 
85  };
87 } // namespace Belle2
88 
89 #endif
90 
Class to store Trigger Type information.
union Belle2::SVDTriggerType::@237 m_triggerID
how to interpret the 4 bits:
void setType(baseType type)
Set the unique type.
baseType bin34
first 2 bits
baseType type
Unique id.
uint8_t baseType
The base integer type for SVDTriggerType.
SVDTriggerType(baseType type=0)
Constructor using the unique type.
baseType getType() const
Get the unique type.
Abstract base class for different kinds of events.