File indexing completed on 2025-01-18 09:10: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 GeometryContextOstreamWrapper(const T& object, const GeometryContext& gctx)
0044 : m_object(object), m_gctx(gctx) {}
0045
0046 GeometryContextOstreamWrapper(const GeometryContextOstreamWrapper&) = delete;
0047 GeometryContextOstreamWrapper(GeometryContextOstreamWrapper&&) = delete;
0048 GeometryContextOstreamWrapper& operator=(
0049 const GeometryContextOstreamWrapper&) = delete;
0050 GeometryContextOstreamWrapper& operator=(GeometryContextOstreamWrapper&&) =
0051 delete;
0052
0053 friend std::ostream& operator<<(
0054 std::ostream& os, const GeometryContextOstreamWrapper& osWrapper) {
0055 osWrapper.toStream(os);
0056 return os;
0057 }
0058
0059 private:
0060 void toStream(std::ostream& os) const { m_object.toStreamImpl(m_gctx, os); }
0061
0062 const T& m_object;
0063 const GeometryContext& m_gctx;
0064 };
0065
0066 }
0067
0068 #endif