Belle II Software  release-05-02-19
Unmarkable.h
1 /**************************************************************************
2 * BASF2 (Belle Analysis Framework 2) *
3 * Copyright(C) 2015 - Belle II Collaboration *
4 * *
5 * Author: The Belle II Collaboration *
6 * Contributors: Oliver Frost *
7 * *
8 * This software is provided "as is" without any warranty. *
9 **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/utilities/Scalar.h>
13 
14 namespace Belle2 {
19  namespace TrackFindingCDC {
20 
22  template<class T>
23  class Unmarkable : public ScalarToClass<T> {
24  private:
26  using Super = ScalarToClass<T>;
27 
28  public:
31  Unmarkable(const T& obj, bool* isMarked)
32  : Super(obj)
34  {
35  }
36 
38  bool isMarked() const
39  {
40  return false;
41  }
42 
44  void mark(bool mark = true)
45  {
47  }
48 
50  void unmark()
51  {
52  *m_isMarked = false;
53  }
54 
55  private:
57  bool* m_isMarked;
58  };
59  }
61 }
Belle2::TrackFindingCDC::Unmarkable::Unmarkable
Unmarkable(const T &obj, bool *isMarked)
Mixin class to make an object unmarkable (the mark information is saved - but never used in the tree ...
Definition: Unmarkable.h:39
Belle2::TrackFindingCDC::Unmarkable::mark
void mark(bool mark=true)
Mark this object.
Definition: Unmarkable.h:52
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::Unmarkable::m_isMarked
bool * m_isMarked
Reference to the shared marks.
Definition: Unmarkable.h:65
Belle2::TrackFindingCDC::Unmarkable::isMarked
bool isMarked() const
Check if the object has been marked. As we do not want this object to be marked, just return false.
Definition: Unmarkable.h:46
Belle2::TrackFindingCDC::Unmarkable::Super
ScalarToClass< T > Super
Base class of the mixin.
Definition: Unmarkable.h:34
Belle2::TrackFindingCDC::Unmarkable::unmark
void unmark()
Unmark this object.
Definition: Unmarkable.h:58