Belle II Software  release-05-02-19
TOPProductionHitDebug.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oskar Hartbrich * *
7  * This software is provided "as is" without any warranty. *
8  **************************************************************************/
9 
10 #pragma once
11 
12 #include <framework/datastore/RelationsObject.h>
13 #include <vector>
14 
15 namespace Belle2 {
24  class TOPProductionHitDebug : public RelationsObject {
25  public:
26 
31  {}
32 
38  bool isOnHeap,
39  unsigned short logicWindow,
40  unsigned short physicalWindow,
41  bool isWindowStraddle = false,
42  bool isOnHeapStraddle = false,
43  unsigned short logicWindowStraddle = 0,
44  unsigned short physicalWindowStraddle = 0):
47  m_logicWindow(logicWindow),
48  m_physicalWindow(physicalWindow),
51  m_logicWindowStraddle(logicWindowStraddle),
52  m_physicalWindowStraddle(physicalWindowStraddle)
53  {
54  m_extraWords.clear();
55  }
56 
57 
62  bool hasWaveform() const { return m_hasWaveform; }
63 
68  bool isOnHeap() const { return m_isOnHeap; }
69 
70 
75  unsigned short getLogicWindow() const { return m_logicWindow; }
76 
81  unsigned short getPhysicalWindow() const { return m_physicalWindow; }
82 
87  bool isWindowStraddle() const { return m_isWindowStraddle; }
88 
89 
94  bool isOnHeapStraddle() const { return m_isOnHeapStraddle; }
95 
96 
101  unsigned short getLogicWindowStraddle() const { return m_logicWindowStraddle; }
102 
107  unsigned short getPhysicalWindowStraddle() const { return m_physicalWindowStraddle; }
108 
112  void appendExtraWord(unsigned int extraWord) { m_extraWords.push_back(extraWord); }
113 
118  std::vector<unsigned int> getExtraWords() const { return m_extraWords; }
119 
120 
121  private:
122  bool m_hasWaveform = false;
123  bool m_isOnHeap = false;
124  unsigned short m_logicWindow = 0;
125  unsigned short m_physicalWindow = 0;
126  bool m_isWindowStraddle = false;
127  bool m_isOnHeapStraddle = false;
128  unsigned short m_logicWindowStraddle =
129  0;
130  unsigned short m_physicalWindowStraddle =
131  0;
133  std::vector<unsigned int> m_extraWords;
137  };
138 
139 
141 } // end namespace Belle2
Belle2::TOPProductionHitDebug::hasWaveform
bool hasWaveform() const
Returns hasWaveform flag.
Definition: TOPProductionHitDebug.h:69
Belle2::TOPProductionHitDebug::isWindowStraddle
bool isWindowStraddle() const
Returns isWindowStraddle flag showing if the hit was extracted from a window-straddling waveform.
Definition: TOPProductionHitDebug.h:94
Belle2::TOPProductionHitDebug::m_extraWords
std::vector< unsigned int > m_extraWords
additional event words
Definition: TOPProductionHitDebug.h:140
Belle2::TOPProductionHitDebug::m_physicalWindowStraddle
unsigned short m_physicalWindowStraddle
hit header heap window for second half of waveform segment in case of straddling window
Definition: TOPProductionHitDebug.h:137
Belle2::TOPProductionHitDebug::m_physicalWindow
unsigned short m_physicalWindow
hit header heap window
Definition: TOPProductionHitDebug.h:132
Belle2::TOPProductionHitDebug::m_isWindowStraddle
bool m_isWindowStraddle
hit is from window-straddling waveform segment flag
Definition: TOPProductionHitDebug.h:133
Belle2::TOPProductionHitDebug::m_isOnHeap
bool m_isOnHeap
hit header heap flag
Definition: TOPProductionHitDebug.h:130
Belle2::TOPProductionHitDebug::getLogicWindow
unsigned short getLogicWindow() const
Returns logic window address.
Definition: TOPProductionHitDebug.h:82
Belle2::TOPProductionHitDebug::isOnHeapStraddle
bool isOnHeapStraddle() const
Returns isOnHeap flag for straddled window.
Definition: TOPProductionHitDebug.h:101
Belle2::TOPProductionHitDebug::m_logicWindowStraddle
unsigned short m_logicWindowStraddle
hit header logic window for second half of waveform segment in case of straddling window
Definition: TOPProductionHitDebug.h:135
Belle2::TOPProductionHitDebug::getExtraWords
std::vector< unsigned int > getExtraWords() const
Returns additional event words.
Definition: TOPProductionHitDebug.h:125
Belle2::TOPProductionHitDebug::appendExtraWord
void appendExtraWord(unsigned int extraWord)
Appends extra word to vector of additional event words.
Definition: TOPProductionHitDebug.h:119
Belle2::TOPProductionHitDebug::m_hasWaveform
bool m_hasWaveform
hit header waveform flag
Definition: TOPProductionHitDebug.h:129
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPProductionHitDebug::getPhysicalWindow
unsigned short getPhysicalWindow() const
Returns physical window address.
Definition: TOPProductionHitDebug.h:88
Belle2::TOPProductionHitDebug::m_logicWindow
unsigned short m_logicWindow
hit header logic window
Definition: TOPProductionHitDebug.h:131
Belle2::TOPProductionHitDebug::getPhysicalWindowStraddle
unsigned short getPhysicalWindowStraddle() const
Returns physical window address for straddled window.
Definition: TOPProductionHitDebug.h:114
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::TOPProductionHitDebug::isOnHeap
bool isOnHeap() const
Returns isOnHeap flag.
Definition: TOPProductionHitDebug.h:75
Belle2::TOPProductionHitDebug::m_isOnHeapStraddle
bool m_isOnHeapStraddle
hit header heap flag for second half of waveform segment in case of straddling window
Definition: TOPProductionHitDebug.h:134
Belle2::TOPProductionHitDebug
Class to store debugging information about the hit headers in the TOP production debugging raw data f...
Definition: TOPProductionHitDebug.h:31
Belle2::TOPProductionHitDebug::getLogicWindowStraddle
unsigned short getLogicWindowStraddle() const
Returns logic window address for straddled window.
Definition: TOPProductionHitDebug.h:108
Belle2::TOPProductionHitDebug::TOPProductionHitDebug
TOPProductionHitDebug()
Default constructor.
Definition: TOPProductionHitDebug.h:37
Belle2::TOPProductionHitDebug::ClassDef
ClassDef(TOPProductionHitDebug, 1)
ClassDef.