Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventRecording.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EventRecording.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 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 
19 
20 #include <memory>
21 #include <mutex>
22 
23 #include <HepMC3/GenEvent.h>
24 
25 class G4RunManager;
26 
27 namespace ActsExamples {
28 
29 class DetectorConstructionFactory;
30 
32  public:
34  struct Config {
38  std::string outputHepMcTracks = "geant-outcome-tracks";
39 
40  std::shared_ptr<DetectorConstructionFactory> detectorConstructionFactory;
41 
43  int seed1 = 12345;
45  int seed2 = 45678;
46 
48  std::vector<std::string> processesCombine;
53  std::vector<std::string> processesReject;
54  };
55 
60 
61  ~EventRecording() override;
62 
64  const AlgorithmContext& context) const override;
65 
67  const Config& config() const { return m_cfg; }
68 
69  private:
73  std::unique_ptr<G4RunManager> m_runManager;
74 
77  "OutputEvents"};
78 
79  // has to be mutable; algorithm interface enforces object constness
80  mutable std::mutex m_runManagerLock;
81 };
82 } // namespace ActsExamples