ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DefaultGeometryIdGetter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DefaultGeometryIdGetter.hpp
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 #pragma once
10 
12 
13 namespace Acts {
14 namespace detail {
15 
18  // support objects that implement `.geoID()`.
19  template <typename object_t>
20  inline auto operator()(const object_t& object) const
21  -> decltype(object.geoID(), GeometryID()) {
22  return object.geoID();
23  }
24  // support objects that implement `.geometryId()`.
25  template <typename object_t>
26  inline auto operator()(const object_t& object) const
27  -> decltype(object.geometryId(), GeometryID()) {
28  return object.geometryId();
29  }
30 };
31 
32 } // namespace detail
33 } // namespace Acts