Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SurfaceError.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SurfaceError.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 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 http://mozilla.org/MPL/2.0/.
8
9
#include "
Acts/Surfaces/SurfaceError.hpp
"
10
11
#include <string>
12
13
namespace
{
14
15
class
SurfaceErrorCategory :
public
std::error_category {
16
public
:
17
// Return a short descriptive name for the category.
18
const
char
*
name
() const noexcept final {
return
"SurfaceError"
; }
19
20
// Return what each enum means in text.
21
std::string
message
(
int
c
)
const
final
{
22
using
Acts::SurfaceError
;
23
24
switch
(static_cast<SurfaceError>(
c
)) {
25
case
SurfaceError::GlobalPositionNotOnSurface:
26
return
"Global to local transformation failed: position not on "
27
"surface."
;
28
default
:
29
return
"unknown"
;
30
}
31
}
32
};
33
34
}
// namespace
35
36
std::error_code
Acts::make_error_code
(
Acts::SurfaceError
e
) {
37
static
SurfaceErrorCategory
c
;
38
return
{
static_cast<
int
>
(
e
), c};
39
}
acts
blob
sPHENIX
Core
src
Surfaces
SurfaceError.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration