Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against more than one track_scoring object in egsinp #751

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

mxxo
Copy link
Contributor

@mxxo mxxo commented Jul 15, 2021

As discussed in #745, ensure that multiple EGS_TrackScoring objects are not defined as this can lead to bugs at write time when the objects try to write to the same file (i.e. if the file name addition is blank). More than one track scoring object is not seen as a required feature, since photons, electrons and positrons can all be toggled in egs_view.

:start ausgab object:
    library = egs_track_scoring
    name    = some_name
    score photons   = yes or no # optional, yes assumed if missing
    score electrons = yes or no # optional, yes assumed if missing
    score positrons = yes or no # optional, yes assumed if missing
    start scoring   = event_number # optional, 0 assumed if missing
    stop  scoring   = event_number # optional, 1024 assumed if missing
    buffer size     = size         # optional, 1024 assumed if missing
    file name addition = some_string # optional, empty string assumed if missing
:stop ausgab object:

@mxxo mxxo requested a review from a team as a code owner July 15, 2021 18:14
@rtownson
Copy link
Collaborator

@mainegra is there a debugging feature here where you might output tracks in limited "start scoring/stop scoring" ranges that would make it useful to have multiple track ausgab objects? I had forgotten 'file name addition' was an option - maybe we just need to defend against them having the same output file..

@mainegra
Copy link
Contributor

Fellas, my understanding was that the possibility to modify the file name was just for that: having a ptrack file name different from the default name used based on the input file name. So I agree that one ptrack file should be enough.

@rtownson rtownson self-assigned this Jul 25, 2021
@rtownson rtownson added the bug label Jul 25, 2021
@ftessier ftessier added the small label Jun 27, 2022
As discussed in issue nrc-cnrc#745 ensure that one EGS_TrackScoring object is
define to prevent bugs at write time when multiple objects try to write
to the same file.
@ftessier ftessier merged commit 0656939 into nrc-cnrc:develop Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants