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