EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexFinderConcept.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VertexFinderConcept.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
16 
17 namespace Acts {
18 
19 namespace Concepts {
20 namespace VertexFinder {
21 
22 template <typename T>
23 using state_t = typename T::State;
24 
25 METHOD_TRAIT(find_t, find);
26 
27 // clang-format off
28  template <typename S>
30  constexpr static bool state_exists = exists<state_t, S>;
31  static_assert(state_exists, "State type not found");
32 
33  constexpr static bool find_exists = has_method<const S, Result<std::vector<Vertex<typename S::InputTrack_t>>>,
34  find_t, const std::vector<const typename S::InputTrack_t*>&,
35  const VertexingOptions<typename S::InputTrack_t>&, typename S::State&>;
36  static_assert(find_exists, "find method not found");
37 
38  constexpr static bool value = require<state_exists, find_exists>;
39  };
40 // clang-format on
41 } // namespace VertexFinder
42 } // namespace Concepts
43 
44 template <typename finder>
45 constexpr bool VertexFinderConcept =
47 
48 } // namespace Acts