File indexing completed on 2025-10-14 07:59:51
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011
0012 #ifdef ACTS_CORE_GEOMETRYCONTEXT_PLUGIN
0013 #include ACTS_CORE_GEOMETRYCONTEXT_PLUGIN
0014 #else
0015
0016 #include "Acts/Utilities/detail/ContextType.hpp"
0017
0018 #include <ostream>
0019
0020 namespace Acts {
0021
0022
0023
0024
0025
0026
0027
0028 class GeometryContext : public ContextType {
0029 public:
0030
0031 using ContextType::ContextType;
0032 using ContextType::operator=;
0033 };
0034
0035
0036
0037
0038
0039
0040
0041 template <typename T>
0042 struct GeometryContextOstreamWrapper {
0043
0044
0045
0046 GeometryContextOstreamWrapper(const T& object, const GeometryContext& gctx)
0047 : m_object(object), m_gctx(gctx) {}
0048
0049 GeometryContextOstreamWrapper(const GeometryContextOstreamWrapper&) = delete;
0050 GeometryContextOstreamWrapper(GeometryContextOstreamWrapper&&) = delete;
0051 GeometryContextOstreamWrapper& operator=(
0052 const GeometryContextOstreamWrapper&) = delete;
0053 GeometryContextOstreamWrapper& operator=(GeometryContextOstreamWrapper&&) =
0054 delete;
0055
0056 friend std::ostream& operator<<(
0057 std::ostream& os, const GeometryContextOstreamWrapper& osWrapper) {
0058 osWrapper.toStream(os);
0059 return os;
0060 }
0061
0062 private:
0063 void toStream(std::ostream& os) const { m_object.toStreamImpl(m_gctx, os); }
0064
0065 const T& m_object;
0066 const GeometryContext& m_gctx;
0067 };
0068
0069 }
0070
0071 #endif