#include <RunActionMaster.hh>
Definition at line 36 of file RunActionMaster.hh.
RunActionMaster::RunActionMaster |
( |
| ) |
|
RunActionMaster::~RunActionMaster |
( |
| ) |
|
void RunActionMaster::BeginOfRunAction |
( |
const G4Run * |
arun | ) |
|
|
virtual |
void RunActionMaster::EndOfRunAction |
( |
const G4Run * |
arun | ) |
|
|
virtual |
Reimplemented from G4UserRunAction.
Definition at line 69 of file RunActionMaster.cc.
88 G4cout <<
"=====================================================" <<
G4endl;
89 G4cout <<
"Start EndOfRunAction for master thread in rank: " << rank<<
G4endl;
90 G4cout <<
"=====================================================" <<
G4endl;
94 RunMerger rm(static_cast<const Run*>(arun));
96 if ( rank == 0 && ver == 0) ver = 1;
99 G4cout<<
"Before merge the Run object has test counter value: "
100 <<
static_cast<const Run*
>(arun)->GetCounter()<<
G4endl;
102 rm.SetVerbosity( ver );
105 G4cout<<
"After merge the Run object has test counter value: "
106 <<
static_cast<const Run*
>(arun)->GetCounter()
107 <<
" (with 1 thread== number of ranks)"<<
G4endl;
115 sm.SetVerbosity(ver);
117 auto debugme = [&scor](){
118 for (
size_t idx = 0 ; idx < scor->GetNumberOfMesh() ; ++idx) {
119 const auto m = scor->GetMesh(idx);
121 std::for_each(map.begin(),map.end(),
122 [](
const MeshScoreMap::value_type& e) {
124 const auto data = e.second->GetMap();
125 for(
auto it =
data->begin() ; it !=
data->end() ; ++it ) {
126 G4cout<<it->first<<
" => G4StatDouble(n,sum_w,sum_w2,sum_wx,sum_wx2): "
127 <<it->second->n()<<
" "<<it->second->sum_w()<<
" "
128 <<it->second->sum_w2()<<
" "<<it->second->sum_wx()<<
" "
129 <<it->second->sum_wx2()<<
G4endl;
143 for (
size_t idx = 0 ; idx < scor->GetNumberOfMesh() ; ++idx) {
144 const auto m = scor->GetMesh(idx);
145 const auto& mn =
m->GetWorldName();
146 std::ostringstream
fname;
147 fname<<
"scorer-"<<mn<<
"-rank"<<rank<<
".csv";
148 scor->DumpAllQuantitiesToFile(mn,fname.str());
162 for (
size_t idx = 0 ; idx < scor->GetNumberOfMesh() ; ++idx) {
163 const auto m = scor->GetMesh(idx);
164 const auto& mn =
m->GetWorldName();
165 std::ostringstream
fname;
166 fname<<
"scorer-"<<mn<<
"-merged.csv";
167 scor->DumpAllQuantitiesToFile(mn,fname.str());
182 hm.SetVerbosity(ver);
191 std::ostringstream
fname;
192 fname<<
"dose-rank"<<rank;
194 fname.str(
"dose-merged");
197 myana-> Save(fname.str());
202 G4cout <<
"===================================================" <<
G4endl;
203 G4cout <<
"End EndOfRunAction for master thread in rank: " << rank <<
G4endl;
204 G4cout <<
"===================================================" <<
G4endl;
const XML_Char const XML_Char * data
G4GLOB_DLL std::ostream G4cout
static G4ScoringManager * GetScoringManagerIfExist()
static constexpr double m
static Analysis * GetAnalysis()
static G4MPImanager * GetManager()
static G4ScoringManager * GetScoringManager()
std::map< G4String, RunScore * > MeshScoreMap
G4Run * RunActionMaster::GenerateRun |
( |
void |
| ) |
|
|
virtual |
The documentation for this class was generated from the following files:
- source/geant4.10.03.p03/examples/extended/parallel/MPI/examples/exMPI03/include/RunActionMaster.hh
- source/geant4.10.03.p03/examples/extended/parallel/MPI/examples/exMPI03/src/RunActionMaster.cc