43 EGS_AusgabObject(Name,f), m_pts(0), m_start(0), m_stop(1024), m_lastCase(-1),
44 m_nScore(0), m_bufSize(16), m_score(false), m_didScore(false),
45 m_score_photons(true), m_score_electrons(true), m_score_positrons(true), m_fnExtra(
""), m_include_time(false) {
46 otype =
"EGS_TrackScoring";
49 EGS_TrackScoring::~EGS_TrackScoring() {
76 if (i_parallel >= 0) {
78 sprintf(buf,
"_w%d",i_parallel);
97 description +=
"======================================================\n";
111 sprintf(buf,
"%lld\n",
m_stop);
121 void EGS_TrackScoring::reportResults() {
123 egsInformation(
"======================================================\n");
134 const static char *func =
"createAusgabObject(track_scoring)";
139 vector<string> sc_options;
140 sc_options.push_back(
"no");
141 sc_options.push_back(
"yes");
142 bool scph = input->
getInput(
"score photons",sc_options,
true);
143 bool scel = input->
getInput(
"score electrons",sc_options,
true);
144 bool scpo = input->
getInput(
"score positrons",sc_options,
true);
145 if (!scph && !scel && !scpo) {
153 bool incltime = input->
getInput(
"include time index",sc_options,1,&found);
156 bool autoDetectDynamic =
false;
158 autoDetectDynamic =
true;
161 EGS_I64 first = 0, last = 1024;
162 input->
getInput(
"start scoring",first);
163 input->
getInput(
"stop scoring",last);
165 input->
getInput(
"buffer size",bufSize);
167 input->
getInput(
"file name addition",fnExtra);
169 result->setScorePhotons(scph);
170 result->setScoreElectrons(scel);
171 result->setScorePositrons(scpo);
172 result->setIncludeTime(incltime);
173 result->setAutoDetectDynamic(autoDetectDynamic);
174 result->setFirstEvent(first);
175 result->setLastEvent(last);
176 result->setBufferSize(bufSize);
177 result->setFileNameExtra(fnExtra);
Base class for advanced EGSnrc C++ applications.
int getNparallel() const
Returns the number of parallel jobs executing.
const string & getOutputFile() const
Returns the base name of the output file(s)
const string & getAppDir() const
Returns the absolute path to the user code directory.
int getIparallel() const
Returns the job number in a parallel run.
virtual void setApplication(EGS_Application *App)
Set the application this object belongs to.
string description
A short ausgab object description.
EGS_Application * app
The application this object belongs to.
void setName(EGS_Input *inp)
Set the name of the object from the information provided by inp.
string name
The object name.
A class that stores all the tracks in a simulation.
void reportResults(bool with_header=true)
Report results from the track scoring process so far.
A track scoring object: header.
EGS_I64 m_start
Minimum event index for which to score tracks.
bool m_score_electrons
Score electron tracks?
bool m_include_time
include time index in tracks file?
string m_fnExtra
String to append to output file name.
bool m_autoDetectDynamic
Option for autodetecting whether to include time indices.
EGS_I64 m_stop
Maximum event index for which to score tracks.
int m_bufSize
The track container size.
EGS_ParticleTrackContainer * m_pts
The particle track container.
bool m_score_photons
Score photon tracks?
EGS_I64 m_nScore
Number of events for which tracks were scored.
bool m_score_positrons
Score positron tracks?
Global egspp functions header file.
EGS_RADIATIVE_SPLITTING_EXPORT EGS_AusgabObject * createAusgabObject(EGS_Input *input, EGS_ObjectFactory *f)
A track scoring ausgab object.
EGS_InfoFunction EGS_EXPORT egsInformation
Always use this function for reporting the progress of a simulation and any other type of information...
bool egsIsAbsolutePath(const string &path)
Does the string path represent an absolute path name?
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_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.