Belle II Software
release-05-01-25
WithSharedMark.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
WithSharedMark :
public
ScalarToClass<T> {
24
private
:
26
using
Super
= ScalarToClass<T>;
27
28
public
:
30
WithSharedMark
(
const
T& obj,
bool
*
isMarked
)
31
:
Super
(obj)
32
,
m_isMarked
(
isMarked
)
33
{
34
}
35
37
bool
isMarked
()
const
38
{
39
return
*
m_isMarked
;
40
}
41
43
void
mark
(
bool
mark
=
true
)
44
{
45
*
m_isMarked
=
mark
;
46
}
47
49
void
unmark
()
50
{
51
*
m_isMarked
=
false
;
52
}
53
54
private
:
56
bool
*
m_isMarked
;
57
};
58
}
60
}
Belle2::TrackFindingCDC::WithSharedMark::WithSharedMark
WithSharedMark(const T &obj, bool *isMarked)
Mixin class Wraps an object including r the mark is provided from a shared position.
Definition:
WithSharedMark.h:38
Belle2::TrackFindingCDC::WithSharedMark::isMarked
bool isMarked() const
Check if the object has been marked.
Definition:
WithSharedMark.h:45
Belle2::TrackFindingCDC::WithSharedMark::m_isMarked
bool * m_isMarked
Reference to the shared marks.
Definition:
WithSharedMark.h:64
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::WithSharedMark::Super
ScalarToClass< T > Super
Base class of the mixin.
Definition:
WithSharedMark.h:34
Belle2::TrackFindingCDC::WithSharedMark::mark
void mark(bool mark=true)
Mark this object.
Definition:
WithSharedMark.h:51
Belle2::TrackFindingCDC::WithSharedMark::unmark
void unmark()
Unmark this object.
Definition:
WithSharedMark.h:57
tracking
trackFindingCDC
hough
baseelements
include
WithSharedMark.h
Generated on Fri Nov 5 2021 04:03:25 for Belle II Software by
1.8.17