Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:37

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <memory>
0012 
0013 #include <G4UserRunAction.hh>
0014 #include <globals.hh>
0015 
0016 class G4Run;
0017 
0018 namespace ActsExamples::Geant4::HepMC3 {
0019 
0020 /// The RunAction class is the implementation of the
0021 /// Geant4 class G4UserRunAction. It initiates the run
0022 /// an resets the EventAction
0023 class RunAction final : public G4UserRunAction {
0024  public:
0025   /// Static access method
0026   static RunAction* instance();
0027 
0028   /// Construct the action and ensure singleton usage.
0029   RunAction();
0030   ~RunAction() override;
0031 
0032   /// Interface method at the begin of the run
0033   /// @note resets the event action
0034   void BeginOfRunAction(const G4Run* run) override;
0035 
0036   /// Interface method at the end of the run
0037   void EndOfRunAction(const G4Run* run) override;
0038 
0039  private:
0040   /// Instance of the EventAction
0041   static RunAction* s_instance;
0042 };
0043 
0044 }  // namespace ActsExamples::Geant4::HepMC3