42 EGS_AusgabObject(Name,f), m_pts(0), m_start(0), m_stop(1024), m_lastCase(-1),
43 m_nScore(0), m_bufSize(16), m_score(false), m_didScore(false),
44 m_score_photons(true), m_score_electrons(true), m_score_positrons(true), m_fnExtra(
"") {
45 otype =
"EGS_TrackScoring";
48 EGS_TrackScoring::~EGS_TrackScoring() {
75 if (i_parallel >= 0) {
77 sprintf(buf,
"_w%d",i_parallel);
86 description +=
"======================================================\n";
87 description +=
" - Scoring photon tracks = ";
89 description +=
" - Scoring electron tracks = ";
91 description +=
" - Scoring positron tracks = ";
93 description +=
" - First event to score = ";
97 description +=
" - Last event to score = ";
98 sprintf(buf,
"%lld\n",
m_stop);
100 description +=
" - Track buffer size = ";
103 description +=
" - Output file name = ";
104 description += fname;
105 description +=
"\n\n";
108 void EGS_TrackScoring::reportResults() {
110 egsInformation(
"======================================================\n");
122 const static char *func =
"createAusgabObject(track_scoring)";
127 vector<string> sc_options;
128 sc_options.push_back(
"no");
129 sc_options.push_back(
"yes");
130 bool scph = input->
getInput(
"score photons",sc_options,
true);
131 bool scel = input->
getInput(
"score electrons",sc_options,
true);
132 bool scpo = input->
getInput(
"score positrons",sc_options,
true);
133 if (!scph && !scel && !scpo) {
136 EGS_I64 first = 0, last = 1024;
137 input->
getInput(
"start scoring",first);
138 input->
getInput(
"stop scoring",last);
140 input->
getInput(
"buffer size",bufSize);
142 input->
getInput(
"file name addition",fnExtra);
144 result->setScorePhotons(scph);
145 result->setScoreElectrons(scel);
146 result->setScorePositrons(scpo);
147 result->setFirstEvent(first);
148 result->setLastEvent(last);
149 result->setBufferSize(bufSize);
150 result->setFileNameExtra(fnExtra);
bool m_score_positrons
Score positron tracks?
bool m_score_photons
Score photon tracks?
string description
A short ausgab object description.
bool egsIsAbsolutePath(const string &path)
Does the string path represent an absolute path name?
EGS_ParticleTrackContainer * m_pts
The particle track container.
string egsJoinPath(const string &first, const string &second)
Join two path variables (or a path and a file name) using the platform specific directory separator a...
EGS_I64 m_start
Minimum event index for which to score tracks.
int getIparallel() const
Returns the job number in a parallel run.
Global egspp functions header file.
int getNparallel() const
Returns the number of parallel jobs executing.
string m_fnExtra
String to append to output file name.
EGS_I64 m_nScore
Number of events for which tracks were scored.
EGS_InfoFunction EGS_EXPORT egsInformation
Always use this function for reporting the progress of a simulation and any other type of information...
A class that stores all the tracks in a simulation.
void setName(EGS_Input *inp)
Set the name of the object from the information provided by inp.
void reportResults(bool with_header=true)
Report results from the track scoring process so far.
string name
The object name.
EGS_I64 m_stop
Maximum event index for which to score tracks.
A track scoring ausgab object.
A track scoring object: header.
const string & getAppDir() const
Returns the absolute path to the user code directory.
string otype
The object type.
int m_bufSize
The track container size.
virtual void setApplication(EGS_Application *App)
Set the application this object belongs to.
Base class for advanced EGSnrc C++ applications.
const string & getOutputFile() const
Returns the base name of the output file(s)
EGS_Application * app
The application this object belongs to.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.
bool m_score_electrons
Score electron tracks?