File indexing completed on 2026-04-01 07:46:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Utilities/Logger.hpp"
0012 #include "Acts/Visualization/ViewConfig.hpp"
0013 #include "ActsExamples/Framework/AlgorithmContext.hpp"
0014 #include "ActsExamples/Framework/ProcessCode.hpp"
0015
0016 #include <cstddef>
0017 #include <memory>
0018 #include <string>
0019
0020 namespace Acts {
0021 class TrackingVolume;
0022 class TrackingGeometry;
0023 }
0024
0025 namespace ActsExamples {
0026
0027
0028
0029
0030
0031 class ObjTrackingGeometryWriter {
0032 public:
0033
0034
0035
0036 class Config {
0037 public:
0038 double outputScalor = 1.0;
0039 std::size_t outputPrecision = 6;
0040 std::filesystem::path outputDir = ".";
0041
0042 Acts::ViewConfig containerView = {.color = {220, 220, 220}};
0043 Acts::ViewConfig volumeView = {.color = {220, 220, 0}};
0044 Acts::ViewConfig sensitiveView = {.color = {0, 180, 240}};
0045 Acts::ViewConfig passiveView = {.color = {240, 280, 0}};
0046 Acts::ViewConfig gridView = {.color = {220, 0, 0}};
0047
0048 Acts::ViewConfig portalView = passiveView;
0049 };
0050
0051
0052
0053
0054 ObjTrackingGeometryWriter(const Config& config, Acts::Logging::Level level);
0055
0056
0057
0058 std::string name() const;
0059
0060
0061
0062
0063
0064 ProcessCode write(const AlgorithmContext& context,
0065 const Acts::TrackingGeometry& tGeometry);
0066
0067 private:
0068 std::unique_ptr<const Acts::Logger> m_logger;
0069
0070 Config m_cfg;
0071
0072
0073
0074
0075 void write(const AlgorithmContext& context,
0076 const Acts::TrackingVolume& tVolume, bool gen3 = false);
0077
0078
0079 const Acts::Logger& logger() const { return *m_logger; }
0080 };
0081
0082 }