ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
value_corrector.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file value_corrector.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 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 #pragma once
10 // Acts include(s)
13 
14 namespace Acts {
16 namespace detail {
32 template <ParID_t... params>
33 struct value_corrector;
34 
36 template <typename R, ParID_t... params>
37 struct value_corrector_impl;
38 
39 template <ParID_t... params>
40 struct value_corrector {
41  using ParVector_t = ActsVector<ParValue_t, sizeof...(params)>;
42 
43  static void result(ParVector_t& values) {
44  value_corrector_impl<ParVector_t, params...>::calculate(values, 0);
45  }
46 };
47 
48 template <typename R, ParID_t first, ParID_t... others>
49 struct value_corrector_impl<R, first, others...> {
50  static void calculate(R& values, unsigned int pos) {
51  using parameter_type = BoundParameterType<first>;
52  if (parameter_type::may_modify_value) {
54  }
55  value_corrector_impl<R, others...>::calculate(values, pos + 1);
56  }
57 };
58 
59 template <typename R, ParID_t last>
60 struct value_corrector_impl<R, last> {
61  static void calculate(R& values, unsigned int pos) {
62  using parameter_type = BoundParameterType<last>;
63  if (parameter_type::may_modify_value) {
65  }
66  }
67 };
69 } // namespace detail
71 } // namespace Acts