Belle II Software  release-08-01-10
SoftwareTriggerCutBase.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 #include <vector>
10 #include <framework/logging/Logger.h>
11 
12 namespace Belle2 {
26  public:
28  SoftwareTriggerCutBase(unsigned int preScaleFactor = 1, const bool& isRejectCut = false) :
29  m_preScaleFactor({preScaleFactor}), m_isRejectCut(isRejectCut)
30  {
31  }
32 
34  unsigned int getPreScaleFactor() const
35  {
36  B2ASSERT("Prescale factor should only have a single entry!", m_preScaleFactor.size() == 1);
37  return m_preScaleFactor[0];
38  }
39 
41  bool isRejectCut() const
42  {
43  return m_isRejectCut;
44  }
45 
46  private:
51 
53  std::vector<unsigned int> m_preScaleFactor = {1};
55  bool m_isRejectCut = false;
56  };
58 }
Base class for the SoftwareTriggerCut and its DBRepresentation.
SoftwareTriggerCutBase(const SoftwareTriggerCutBase &rhs)=delete
Do not copy this object.
SoftwareTriggerCutBase(unsigned int preScaleFactor=1, const bool &isRejectCut=false)
Create a new base instance. This should rarely be called by yourself.
bool isRejectCut() const
Returns true, if the cut is a reject cut and false otherwise.
bool m_isRejectCut
The internal storage if it is a reject cut.
unsigned int getPreScaleFactor() const
Return the list of pre scale factors.
SoftwareTriggerCutBase & operator=(const SoftwareTriggerCutBase &)=delete
Do not copy/assign this object.
std::vector< unsigned int > m_preScaleFactor
The internal storage of the prescale factor of the cut. In former times, this was a vector but is not...
Abstract base class for different kinds of events.