Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
process_signature_check.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file process_signature_check.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 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 
12 #include <type_traits>
13 
14 namespace Fatras {
15 
27 namespace detail {
28 
29 namespace {
30 template <typename T, typename generator_t, typename detector_t,
31  typename particle_t,
32  typename = decltype(std::declval<T>().operator()(
33  std::declval<generator_t &>(), std::declval<const detector_t &>(),
34  std::declval<particle_t &>(),
35  std::declval<std::vector<particle_t> &>()))>
36 
37 std::true_type test_physics_list(int);
38 
39 template <typename, typename, typename, typename>
40 std::false_type test_physics_list(...);
41 
42 template <typename T, typename generator_t, typename detector_t,
43  typename particle_t>
44 struct process_signature_check
45  : decltype(test_physics_list<T, generator_t, detector_t, particle_t>(0)) {};
46 
47 // clang-format on
48 } // end of anonymous namespace
49 
50 template <typename T, typename generator_t, typename detector_t,
51  typename particle_t>
52 constexpr bool process_signature_check_v =
54 
55 } // namespace detail
56 
57 } // namespace Fatras