Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CsvTrackingGeometryWriter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CsvTrackingGeometryWriter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2018 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 <cstddef>
17 #include <limits>
18 #include <memory>
19 #include <string>
20 
21 namespace Acts {
22 class TrackingVolume;
23 class TrackingGeometry;
24 } // namespace Acts
25 
26 namespace ActsExamples {
27 struct AlgorithmContext;
28 
41  public:
42  struct Config {
44  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry;
48  std::size_t outputPrecision = std::numeric_limits<float>::max_digits10;
50  bool writeSensitive = true;
52  bool writeBoundary = false;
54  bool writeSurfaceGrid = true;
56  bool writeLayerVolume = true;
58  bool writePerEvent = false;
59  };
60 
66 
67  std::string name() const override;
68 
70  ProcessCode write(const AlgorithmContext& ctx) override;
71 
73  ProcessCode finalize() override;
74 
76  const Config& config() const { return m_cfg; }
77 
78  private:
80  const Acts::TrackingVolume* m_world = nullptr;
81  std::unique_ptr<const Acts::Logger> m_logger;
82 
83  const Acts::Logger& logger() const { return *m_logger; }
84 };
85 
86 } // namespace ActsExamples