Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PodioUtil.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PodioUtil.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2023 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 
15 
16 #include <limits>
17 #include <memory>
18 
19 namespace ActsPodioEdm {
20 class Surface;
21 }
22 
23 namespace Acts::PodioUtil {
24 
25 using Identifier = uint64_t;
26 constexpr Identifier kNoIdentifier = std::numeric_limits<Identifier>::max();
27 constexpr int kNoSurface = -1;
28 
29 // @TODO: We might want to consider making this a type erased type that's not an interface
31  public:
32  virtual std::optional<Identifier> surfaceToIdentifier(
33  const Surface& surface) const = 0;
34  virtual const Surface* identifierToSurface(Identifier identifier) const = 0;
35 
36  virtual Identifier sourceLinkToIdentifier(const SourceLink& sl) = 0;
37  virtual SourceLink identifierToSourceLink(Identifier identifier) const = 0;
38 };
39 
40 std::shared_ptr<const Surface> convertSurfaceFromPodio(
41  const ConversionHelper& helper, const ActsPodioEdm::Surface& surface);
42 
44  const Acts::Surface& surface);
45 
46 } // namespace Acts::PodioUtil