![]() |
|
|||
File indexing completed on 2025-04-06 08:07:20
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file hadronic/Hadr01/src/RunAction.cc 0027 /// \brief Implementation of the RunAction class 0028 // 0029 // 0030 // ------------------------------------------------------------- 0031 // 0032 // GEANT4 class file 0033 // RunAction 0034 // 0035 // ------------------------------------------------------------- 0036 0037 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0039 0040 #include "RunAction.hh" 0041 0042 #include "HistoManager.hh" 0043 0044 #include "G4CascadeChannelTables.hh" 0045 #include "G4NuclearLevelData.hh" 0046 #include "G4Timer.hh" 0047 #include "G4UImanager.hh" 0048 #include "G4VVisManager.hh" 0049 0050 #include <iosfwd> 0051 0052 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0053 0054 RunAction::RunAction() : G4UserRunAction() 0055 { 0056 fTimer = new G4Timer(); 0057 fTimer->Start(); 0058 } 0059 0060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0061 0062 void RunAction::BeginOfRunAction(const G4Run* aRun) 0063 { 0064 G4int id = aRun->GetRunID(); 0065 G4cout << "### Run " << id << " start" << G4endl; 0066 fTimer->Stop(); 0067 G4cout << "Initialisation time: " << *fTimer << G4endl; 0068 0069 delete fTimer; 0070 fTimer = new G4Timer(); 0071 fTimer->Start(); 0072 0073 (HistoManager::GetPointer())->BeginOfRun(); 0074 } 0075 0076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0077 0078 void RunAction::EndOfRunAction(const G4Run*) 0079 { 0080 fTimer->Stop(); 0081 G4cout << "RunAction::EndOfRunAction: " << *fTimer << G4endl; 0082 G4cout << "RunAction: End of run actions are started" << G4endl; 0083 auto man = HistoManager::GetPointer(); 0084 man->EndOfRun(); 0085 G4int key = man->PrintBertiniXS(); 0086 if (0 == key) { 0087 G4cout << "RunAction: Print all Bertini cross sections" << G4endl; 0088 G4CascadeChannelTables::Print(); 0089 } 0090 else if (0 < key) { 0091 G4cout << "RunAction: Print Bertini cross section key=" << key << G4endl; 0092 G4CascadeChannelTables::PrintTable(key, G4cout); 0093 } 0094 } 0095 0096 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |