Skip to content

MCPLGen: state what a stat:sum value of -1 means, not what might have caused it - #66

Merged
tkittel merged 2 commits into
mctools:mainfrom
tkittel:mcplgen-errmsg
Nov 8, 2026
Merged

tkittel merged 2 commits into
mctools:mainfrom
tkittel:mcplgen-errmsg

Conversation

@tkittel

@tkittel tkittel commented Nov 8, 2026

Copy link
Copy Markdown
Member

MCPLGen refuses to normalise weights when the input file has
stat:sum:initial_ray_count = -1. The error message speculated about the
cause (an interrupted run of the application writing the file, or a
partial file). It now only says what -1 means in MCPL: the value is not
available.

Also:

  • The same kind of speculation is removed from a comment in the
    G4MCPLTests app which creates the test input files.
  • Removes a TODO in ExprParser/ASTNode.icc, which is addressed by the
    explicit template instantiation from the previous PR.

assisted-by: claude

… caused it

The error message for an input file with stat:sum:initial_ray_count = -1 now
only says what -1 means in MCPL (the value is not available), rather than
guessing at what happened in the application writing the file.

Assisted-by: Claude
Move the definition from ASTNode.icc to ASTNode.cc, where the class template
is explicitly instantiated, so it is no longer compiled into each library
using it. This is what the TODO in ASTNode.icc asked for, so the TODO is
removed.

Assisted-by: Claude
@tkittel
tkittel merged commit 09c4200 into mctools:main Nov 8, 2026
23 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant