Belle II Software  release-05-02-19
TOPFrontEndSetting.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 #include <vector>
15 
16 namespace Belle2 {
25  class TOPFrontEndSetting: public TObject {
26 
27  public:
28 
33  {}
34 
40  void setWriteDepths(const std::vector<int>& depths) {m_writeDepths = depths;}
41 
47  void setLookbackWindows(int lookback) {m_lookbackWindows = lookback;}
48 
54  void setReadoutWindows(int readoutWindows) {m_readoutWindows = readoutWindows;}
55 
62  void setExtraWindows(int extra) {m_extraWindows = extra;}
63 
68  void setWindowShifts(std::vector<int> shifts);
69 
76  void setOffset(int offset) {m_offset = offset;}
77 
83  const std::vector<int>& getWriteDepths() const {return m_writeDepths;}
84 
90  int getLookbackWindows() const {return m_lookbackWindows;}
91 
97  int getReadoutWindows() const {return m_readoutWindows;}
98 
105  int getExtraWindows() const {return m_extraWindows;}
106 
112  int getWindowShift(unsigned revo9count) const {return m_windowShifts[revo9count % 6];}
113 
118  int getOffset() const {return m_offset;}
119 
120 
121  private:
122 
123  std::vector<int> m_writeDepths;
124  int m_lookbackWindows = 0;
125  int m_readoutWindows = 0;
126  int m_extraWindows = 0;
127  int m_windowShifts[6] = {0};
128  int m_offset = 0;
132  };
133 
135 } // end namespace Belle
Belle2::TOPFrontEndSetting::setOffset
void setOffset(int offset)
Sets the offset of a photon peak within the readout window region.
Definition: TOPFrontEndSetting.h:84
Belle2::TOPFrontEndSetting::m_writeDepths
std::vector< int > m_writeDepths
write depths
Definition: TOPFrontEndSetting.h:131
Belle2::TOPFrontEndSetting::setWriteDepths
void setWriteDepths(const std::vector< int > &depths)
Sets write depths.
Definition: TOPFrontEndSetting.h:48
Belle2::TOPFrontEndSetting::getWindowShift
int getWindowShift(unsigned revo9count) const
Returns window shift at a given revo9count.
Definition: TOPFrontEndSetting.h:120
Belle2::TOPFrontEndSetting
Front-end settings: storage depths, lookback, readout windows etc.
Definition: TOPFrontEndSetting.h:33
Belle2::TOPFrontEndSetting::m_extraWindows
int m_extraWindows
number of extra windows
Definition: TOPFrontEndSetting.h:134
Belle2::TOPFrontEndSetting::setExtraWindows
void setExtraWindows(int extra)
Sets the number of extra windows between the one determined from lookback and the first readout windo...
Definition: TOPFrontEndSetting.h:70
Belle2::TOPFrontEndSetting::getOffset
int getOffset() const
Returns the offset of a photon peak within the readout window region.
Definition: TOPFrontEndSetting.h:126
Belle2::TOPFrontEndSetting::setWindowShifts
void setWindowShifts(std::vector< int > shifts)
Sets window shifts.
Definition: TOPFrontEndSetting.cc:22
Belle2::TOPFrontEndSetting::m_lookbackWindows
int m_lookbackWindows
number of lookback windows
Definition: TOPFrontEndSetting.h:132
Belle2::TOPFrontEndSetting::ClassDef
ClassDef(TOPFrontEndSetting, 1)
ClassDef.
Belle2::TOPFrontEndSetting::getLookbackWindows
int getLookbackWindows() const
Returns the number of lookback windows.
Definition: TOPFrontEndSetting.h:98
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPFrontEndSetting::setReadoutWindows
void setReadoutWindows(int readoutWindows)
Sets the number of readout windows.
Definition: TOPFrontEndSetting.h:62
Belle2::TOPFrontEndSetting::getWriteDepths
const std::vector< int > & getWriteDepths() const
Returns write depths.
Definition: TOPFrontEndSetting.h:91
Belle2::TOPFrontEndSetting::getExtraWindows
int getExtraWindows() const
Returns the number of extra windows between the one determined from lookback and the first readout wi...
Definition: TOPFrontEndSetting.h:113
Belle2::TOPFrontEndSetting::m_readoutWindows
int m_readoutWindows
number of readout windows
Definition: TOPFrontEndSetting.h:133
Belle2::TOPFrontEndSetting::getReadoutWindows
int getReadoutWindows() const
Returns the number of readout windows.
Definition: TOPFrontEndSetting.h:105
Belle2::TOPFrontEndSetting::m_offset
int m_offset
position of photon peak within readout region [RF clocks]
Definition: TOPFrontEndSetting.h:136
Belle2::TOPFrontEndSetting::setLookbackWindows
void setLookbackWindows(int lookback)
Sets the number of lookback windows.
Definition: TOPFrontEndSetting.h:55
Belle2::TOPFrontEndSetting::m_windowShifts
int m_windowShifts[6]
window shifts as a function of revo9count%6
Definition: TOPFrontEndSetting.h:135
Belle2::TOPFrontEndSetting::TOPFrontEndSetting
TOPFrontEndSetting()
Default constructor.
Definition: TOPFrontEndSetting.h:40