Belle II Software development
Unmarkable.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
10#include <tracking/trackFindingCDC/utilities/Scalar.h>
11
12namespace Belle2 {
17 namespace TrackFindingCDC {
18
20 template<class T>
21 class Unmarkable : public ScalarToClass<T> {
22 private:
24 using Super = ScalarToClass<T>;
25
26 public:
29 Unmarkable(const T& obj, bool* isMarked)
30 : Super(obj)
32 {
33 }
34
36 bool isMarked() const
37 {
38 return false;
39 }
40
42 void mark(bool mark = true)
43 {
45 }
46
48 void unmark()
49 {
50 *m_isMarked = false;
51 }
52
53 private:
56 };
57 }
59}
Mixin class to attach a mark that is shared among many instances.
Definition: Unmarkable.h:21
ScalarToClass< T > Super
Base class of the mixin.
Definition: Unmarkable.h:24
bool * m_isMarked
Reference to the shared marks.
Definition: Unmarkable.h:55
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:36
void mark(bool mark=true)
Mark this object.
Definition: Unmarkable.h:42
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:29
void unmark()
Unmark this object.
Definition: Unmarkable.h:48
Abstract base class for different kinds of events.