Geant4
10.02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
//
26
// $Id: RunAction.cc 82310 2014-06-14 00:27:39Z adotti $
27
//
30
31
#include <
G4VUserMPIrunMerger.hh
>
32
#include "
G4MPImanager.hh
"
33
#include <stdio.h>
34
#include "
G4Threading.hh
"
35
#include "Analysis.hh"
36
#include "RunAction.hh"
37
#include "Run.hh"
38
39
#include "
G4MPIscorerMerger.hh
"
40
41
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42
RunAction::RunAction
()
43
{
44
}
45
46
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47
RunAction::~RunAction
()
48
{
49
}
50
51
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52
G4Run
*
RunAction::GenerateRun
()
53
{
54
return
new
Run
;
55
}
56
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57
void
RunAction::BeginOfRunAction
(
const
G4Run
*)
58
{
59
Analysis
* myana =
Analysis::GetAnalysis
();
60
myana->
Clear
();
61
myana->
Book
();
62
}
63
64
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
void
RunAction::EndOfRunAction
(
const
G4Run
*)
66
{
67
G4int
rank =
G4MPImanager::GetManager
()-> GetRank();
68
69
char
str[64];
70
//NOTE: if only histograms are active actually we do not create the per-thread
71
//ntuple file
72
sprintf(str,
"dose-rank%03d-thread%03d"
, rank,
G4Threading::G4GetThreadId
());
73
G4String
fname(str);
74
75
Analysis
* myana =
Analysis::GetAnalysis
();
76
myana-> Save(fname);
77
}
RunAction::RunAction
RunAction()
Definition:
RunAction.cc:42
RunAction::BeginOfRunAction
void BeginOfRunAction(const G4Run *)
Definition:
RunAction.cc:57
Analysis
Definition:
Analysis.hh:43
JA::Clear
void Clear(Node *)
Definition:
G4XXXSGSceneHandler.cc:485
G4VUserMPIrunMerger.hh
RunAction::GenerateRun
virtual G4Run * GenerateRun()
Definition:
RunAction.cc:66
G4int
int G4int
Definition:
G4Types.hh:78
G4MPImanager.hh
MPI manager class.
G4MPIscorerMerger.hh
G4Threading.hh
Analysis::GetAnalysis
static Analysis * GetAnalysis()
Definition:
Analysis.cc:45
RunAction::EndOfRunAction
void EndOfRunAction(const G4Run *)
Definition:
RunAction.cc:260
G4Run
Definition:
G4Run.hh:46
Analysis::Book
void Book()
Definition:
Analysis.cc:65
G4MPImanager::GetManager
static G4MPImanager * GetManager()
Definition:
G4MPImanager.cc:103
RunAction::~RunAction
~RunAction()
Definition:
RunAction.cc:52
Run
Definition:
Run.hh:46
G4Threading::G4GetThreadId
G4int G4GetThreadId()
Definition:
G4Threading.cc:128
G4String
Definition:
G4String.hh:45
geant4.10.02
examples
extended
parallel
MPI
examples
exMPI03
src
RunAction.cc
Generated on Thu Dec 31 2015 10:42:57 for Geant4 by
1.8.8