Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CombinatorialKalmanFilterError.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CombinatorialKalmanFilterError.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 
10 
11 #include <string>
12 
13 namespace {
14 
15 class CombinatorialKalmanFilterErrorCategory : public std::error_category {
16  public:
17  // Return a short descriptive name for the category.
18  const char* name() const noexcept final {
19  return "CombinatorialKalmanFilterError";
20  }
21 
22  // Return what each enum means in text.
23  std::string message(int c) const final {
25 
26  switch (static_cast<CombinatorialKalmanFilterError>(c)) {
27  case CombinatorialKalmanFilterError::UpdateFailed:
28  return "Kalman update failed";
29  case CombinatorialKalmanFilterError::SmoothFailed:
30  return "Kalman smooth failed";
31  case CombinatorialKalmanFilterError::OutputConversionFailed:
32  return "Kalman output conversion failed";
33  case CombinatorialKalmanFilterError::MeasurementSelectionFailed:
34  return "Measurement selection failed";
35  case CombinatorialKalmanFilterError::PropagationReachesMaxSteps:
36  return "Propagation reaches max steps before track finding is "
37  "finished";
38  default:
39  return "unknown";
40  }
41  }
42 };
43 
44 } // namespace
45 
47  static CombinatorialKalmanFilterErrorCategory c;
48  return {static_cast<int>(e), c};
49 }