EIC 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 
14 
15 #include <memory>
16 #include <string>
17 #include <unordered_map>
18 
19 namespace Acts {
20 class Surface;
21 }
22 
23 namespace ActsExamples {
24 
39 class CsvPlanarClusterReader final : public IReader {
40  public:
41  struct Config {
43  std::string inputDir;
45  std::string outputClusters;
47  std::string outputHitIds;
49  std::string outputHitParticlesMap;
51  std::string outputSimulatedHits;
53  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry;
54  };
55 
61 
62  std::string name() const final override;
63 
65  std::pair<size_t, size_t> availableEvents() const final override;
66 
68  ProcessCode read(const ActsExamples::AlgorithmContext& ctx) final override;
69 
70  private:
72  std::unordered_map<Acts::GeometryIdentifier, const Acts::Surface*> m_surfaces;
73  std::pair<size_t, size_t> m_eventsRange;
74  std::unique_ptr<const Acts::Logger> m_logger;
75 
76  const Acts::Logger& logger() const { return *m_logger; }
77 };
78 
79 } // namespace ActsExamples