Geant4  10.02.p01
RunAction.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // $Id: RunAction.cc 81932 2014-06-06 15:39:45Z gcosmo $
30 
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
33 #include "RunAction.hh"
34 #include "HistoManager.hh"
35 #include "G4UImanager.hh"
36 #include "G4VVisManager.hh"
37 #include "G4NistManager.hh"
38 #include "G4Element.hh"
39 #include "G4PhysicalConstants.hh"
40 #include "G4SystemOfUnits.hh"
41 
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46  : G4UserRunAction()
47 {}
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
52 {}
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
56 void RunAction::BeginOfRunAction(const G4Run* run)
57 {
58  G4int id = run->GetRunID();
59  G4cout << "### Run " << id << " start" << G4endl;
61 
62 #ifdef G4VIS_USE
64  G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
65  }
66 #endif
67 
68 }
69 
70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71 
73 {
74  G4cout << "RunAction: End of run action is starting" << G4endl;
75 
76 #ifdef G4VIS_USE
78  G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
79 #endif
80 
82 }
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void BeginOfRunAction(const G4Run *)
Definition: RunAction.cc:57
static G4VVisManager * GetConcreteInstance()
void EndOfRun(G4int runID)
int G4int
Definition: G4Types.hh:78
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
G4GLOB_DLL std::ostream G4cout
void EndOfRunAction(const G4Run *)
Definition: RunAction.cc:260
void BeginOfRun()
G4int GetRunID() const
Definition: G4Run.hh:76
Definition: G4Run.hh:46
~RunAction()
Definition: RunAction.cc:52
#define G4endl
Definition: G4ios.hh:61
static HistoManager * GetPointer()
Definition: HistoManager.cc:64
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:446