Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SeedingPerformanceWriter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SeedingPerformanceWriter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020-2021 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 
20 
21 #include <cstddef>
22 #include <mutex>
23 #include <string>
24 #include <vector>
25 
26 class TFile;
27 class TTree;
28 namespace ActsFatras {
29 class Barcode;
30 } // namespace ActsFatras
31 
32 namespace ActsExamples {
33 struct AlgorithmContext;
34 
35 class SeedingPerformanceWriter final : public WriterT<SimSeedContainer> {
36  public:
38 
39  struct Config {
47  std::string filePath = "performance_track_seeding.root";
49  std::string fileMode = "RECREATE";
53  };
54 
59 
60  ~SeedingPerformanceWriter() override;
61 
63  ProcessCode finalize() override;
64 
66  const Config& config() const { return m_cfg; }
67 
68  private:
70  const SimSeedContainer& seeds) override;
71 
74  std::mutex m_writeMutex;
75  TFile* m_outputFile{nullptr};
82 
83  size_t m_nTotalSeeds = 0;
85  size_t m_nTotalParticles = 0;
88 
91  this, "InputMeasurementParticlesMaps"};
92 };
93 
94 } // namespace ActsExamples