Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EDM4hepParticleReader.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EDM4hepParticleReader.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 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 <memory>
17 #include <string>
18 
19 #include <edm4hep/MCParticleCollection.h>
20 #include <podio/ROOTFrameReader.h>
21 
22 namespace ActsExamples {
23 
29 class EDM4hepParticleReader final : public IReader {
30  public:
31  struct Config {
35  std::string inputParticles = "MCParticles";
38  };
39 
45 
46  std::string name() const final;
47 
49  std::pair<size_t, size_t> availableEvents() const final;
50 
52  ProcessCode read(const ActsExamples::AlgorithmContext& ctx) final;
53 
55  const Config& config() const { return m_cfg; }
56 
57  private:
59  std::pair<size_t, size_t> m_eventsRange;
60  std::unique_ptr<const Acts::Logger> m_logger;
61 
62  podio::ROOTFrameReader m_reader;
63 
65  "OutputParticles"};
66 };
67 
68 } // namespace ActsExamples