Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CsvPlanarClusterReader.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CsvPlanarClusterReader.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2019 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 #pragma once
9 
20 
21 #include <cstddef>
22 #include <cstdint>
23 #include <memory>
24 #include <string>
25 #include <unordered_map>
26 #include <utility>
27 #include <vector>
28 
29 namespace ActsFatras {
30 class Barcode;
31 } // namespace ActsFatras
32 
33 namespace Acts {
34 class Surface;
35 class PlanarModuleCluster;
36 class TrackingGeometry;
37 } // namespace Acts
38 
39 namespace ActsExamples {
40 struct AlgorithmContext;
41 
56 class CsvPlanarClusterReader final : public IReader {
57  public:
58  struct Config {
70  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry;
71  };
72 
78 
79  std::string name() const override;
80 
82  std::pair<size_t, size_t> availableEvents() const override;
83 
85  ProcessCode read(const ActsExamples::AlgorithmContext& ctx) override;
86 
88  const Config& config() const { return m_cfg; }
89 
90  private:
92  std::pair<size_t, size_t> m_eventsRange;
93  std::unique_ptr<const Acts::Logger> m_logger;
94 
96  m_outputClusters{this, "OutputClusters"};
98  m_outputMeasurementParticlesMap{this, "OutputMeasurementParticlesMap"};
101 
102  const Acts::Logger& logger() const { return *m_logger; }
103 };
104 
105 } // namespace ActsExamples