Belle II Software  release-05-02-19
SoftwareTriggerCutBase.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 #include <vector>
12 #include <framework/logging/Logger.h>
13 
14 namespace Belle2 {
27  class SoftwareTriggerCutBase {
28  public:
30  SoftwareTriggerCutBase(unsigned int preScaleFactor = 1, const bool& isRejectCut = false) :
31  m_preScaleFactor( {preScaleFactor}), m_isRejectCut(isRejectCut)
32  {
33  }
34 
36  unsigned int getPreScaleFactor() const
37  {
38  B2ASSERT("Prescale factor should only have a single entry!", m_preScaleFactor.size() == 1);
39  return m_preScaleFactor[0];
40  }
41 
43  bool isRejectCut() const
44  {
45  return m_isRejectCut;
46  }
47 
48  private:
53 
55  std::vector<unsigned int> m_preScaleFactor = {1};
57  bool m_isRejectCut = false;
58  };
60 }
Belle2::SoftwareTriggerCutBase::isRejectCut
bool isRejectCut() const
Returns true, if the cut is a reject cut and false otherwise.
Definition: SoftwareTriggerCutBase.h:51
Belle2::SoftwareTriggerCutBase::SoftwareTriggerCutBase
SoftwareTriggerCutBase(unsigned int preScaleFactor=1, const bool &isRejectCut=false)
Create a new base instance. This should rarely be called by yourself.
Definition: SoftwareTriggerCutBase.h:38
Belle2::SoftwareTriggerCutBase::operator=
SoftwareTriggerCutBase & operator=(const SoftwareTriggerCutBase &)=delete
Do not copy/assign this object.
Belle2::SoftwareTriggerCutBase
Base class for the SoftwareTriggerCut and its DBRepresentation.
Definition: SoftwareTriggerCutBase.h:35
Belle2::SoftwareTriggerCutBase::m_preScaleFactor
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...
Definition: SoftwareTriggerCutBase.h:63
Belle2::SoftwareTriggerCutBase::m_isRejectCut
bool m_isRejectCut
The internal storage if it is a reject cut.
Definition: SoftwareTriggerCutBase.h:65
Belle2::SoftwareTriggerCutBase::getPreScaleFactor
unsigned int getPreScaleFactor() const
Return the list of pre scale factors.
Definition: SoftwareTriggerCutBase.h:44
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19