ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
actor.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s)
12#include "detray/definitions/detail/qualifiers.hpp"
13
14// System include(s)
15#include <cstdint>
16#include <ostream>
17
18namespace detray::actor {
19
20enum class status : std::uint8_t {
21 e_notify = 0u,
22 e_success = 1u,
23 e_unknown = 2u,
24 e_failure = 3u,
25};
26
27// Print the values of an enum by identifier
28#define ENUM_PRINT(x) \
29 case x: \
30 os << #x; \
31 break
32
33DETRAY_HOST inline std::ostream& operator<<(std::ostream& os, status s) {
34 switch (s) {
35 using enum status;
36 ENUM_PRINT(e_notify);
37 ENUM_PRINT(e_success);
38 ENUM_PRINT(e_unknown);
39 ENUM_PRINT(e_failure);
40 }
41 return os;
42}
43
44#undef ENUM_PRINT
45} // namespace detray::actor
constexpr double u
atomic mass unit u
Definition Units.hpp:155