#include <DicomRunAction.hh>
Definition at line 42 of file DicomRunAction.hh.
DicomRunAction::DicomRunAction |
( |
| ) |
|
DicomRunAction::~DicomRunAction |
( |
| ) |
|
|
virtual |
void DicomRunAction::BeginOfRunAction |
( |
const G4Run * |
aRun | ) |
|
|
virtual |
Reimplemented from G4UserRunAction.
Definition at line 83 of file DicomRunAction.cc.
void SetRandomNumberStore(G4bool flag)
G4GLOB_DLL std::ostream G4cout
static G4RunManager * GetRunManager()
void DicomRunAction::EndOfRunAction |
( |
const G4Run * |
aRun | ) |
|
|
virtual |
Reimplemented from G4UserRunAction.
Definition at line 91 of file DicomRunAction.cc.
94 if (nofEvents == 0)
return;
98 static double local_total_dose = 0;
99 double total_dose = 0;
103 for (
G4int i = 0; i < (
G4int)fSDName.size(); i++ ){
113 if( DoseDeposit && DoseDeposit->
GetMap()->size() != 0 ) {
114 std::map<G4int,G4double*>::iterator itr =
115 DoseDeposit->
GetMap()->begin();
116 for(; itr != DoseDeposit->
GetMap()->end(); itr++) {
117 if(!
IsMaster()) { local_total_dose += *(itr->second); }
118 total_dose += *(itr->second);
127 <<
"\n--------------------End of Global Run-----------------------"
128 <<
" \n The run was " << nofEvents <<
" events " <<
G4endl;
129 G4cout <<
"LOCAL TOTAL DOSE : \t" << local_total_dose/
gray
130 <<
" Gy" << std::endl;
131 G4cout <<
" TOTAL DOSE : \t" << total_dose/
gray
132 <<
" Gy" << std::endl;
138 <<
"\n--------------------End of Local Run------------------------"
139 <<
" \n The run was " << nofEvents <<
G4endl;
140 G4cout <<
"LOCAL TOTAL DOSE : \t" << local_total_dose/
gray
141 <<
" Gy" << std::endl;
142 G4cout <<
" TOTAL DOSE : \t" << total_dose/
gray
143 <<
" Gy" << std::endl;
153 for (
G4int i = 0; i < (
G4int)fSDName.size(); i++ ){
161 re02Run->
GetHitsMap(fSDName[i]+
"/DoseDeposit");
163 G4cout <<
"============================================================="
165 G4cout <<
" Number of event processed : "
167 G4cout <<
"============================================================="
170 std::ofstream fileout;
173 G4cout <<
" opened file " << fname <<
" for dose output" <<
G4endl;
175 if( DoseDeposit && DoseDeposit->
GetMap()->size() != 0 ) {
176 std::ostream *myout = &
G4cout;
178 std::map<G4int,G4double*>::iterator itr =DoseDeposit->
GetMap()->begin();
179 for(; itr != DoseDeposit->
GetMap()->end(); itr++) {
180 fileout << itr->first
183 G4cout <<
" " << itr->first
184 <<
" " << std::setprecision(6)
188 G4cout <<
"============================================="<<
G4endl;
191 "DoseDeposit HitsMap is either a null pointer of the HitsMap was empty");
194 G4cout <<
" closed file " << fname <<
" for dose output" <<
G4endl;
void PrintHeader(std::ostream *out)
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfEvent() const
static constexpr double gray
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::map< G4int, T * > * GetMap() const
G4THitsMap< G4double > * GetHitsMap(G4int i) const
static constexpr double gray
std::string DicomRunAction::FillString |
( |
const std::string & |
name, |
|
|
char |
c, |
|
|
G4int |
n, |
|
|
G4bool |
back = true |
|
) |
| |
DicomRun* DicomRunAction::GetDicomRun |
( |
| ) |
const |
|
inline |
void DicomRunAction::PrintHeader |
( |
std::ostream * |
out | ) |
|
Definition at line 204 of file DicomRunAction.cc.
206 std::vector<G4String> vecScoreName;
207 vecScoreName.push_back(
"DoseDeposit");
212 *out << std::setw(10) <<
"Voxel" <<
" |";
213 for (std::vector<G4String>::iterator it = vecScoreName.begin();
214 it != vecScoreName.end(); it++) {
220 *out << std::setw(fFieldValue) << (*it) <<
" |";
The documentation for this class was generated from the following files: