Belle II Software development
ERotation.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 <cstdlib> // for abs
11#include <climits>
12
13namespace Belle2 {
19 namespace TrackFindingCDC {
20
22 namespace NRotation {
23
25 enum ERotation : signed short {
26
29
32
35
37 c_Invalid = SHRT_MIN,
38 };
39
41 inline ERotation reversed(ERotation eRotation)
42 { return ERotation(-eRotation); }
43
45 inline bool isValid(ERotation eRotation)
46 { return std::abs(eRotation) <= 1; }
47 }
48
50 using ERotation = NRotation::ERotation;
51 }
53}
ERotation
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: ERotation.h:25
@ c_CounterClockwise
Constant for counter clockwise oriented circle.
Definition: ERotation.h:28
@ c_Invalid
Constant for an invalid information.
Definition: ERotation.h:37
@ c_Clockwise
Constant for clockwise oriented circle.
Definition: ERotation.h:34
@ c_Unknown
For the orientation of a line.
Definition: ERotation.h:31
ERotation reversed(ERotation eRotation)
Return the reversed rotation. Leaves ERotation::c_Invalid the same.
Definition: ERotation.h:41
bool isValid(ERotation eRotation)
Check whether the given enum instance is one of the valid values.
Definition: ERotation.h:45
Abstract base class for different kinds of events.