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

Refactor messengers #69

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

ManuelHu
Copy link
Collaborator

  • Refactor out a helper function to initialize an interactive session. This allows to do a late intitialization of an interactive session. Before that change, using the command to use an interactive session just segfaulted with a null ptr deref.
  • There is an upstream bug with bools in G4GenericMessenger::DeclareMethod(), only numeric values work, other values like true will be silently ignored.
    I have added a temporary fix to the affected physics commands, and switched /RMG/Manager/Interactive to DeclareProperty (which is not affected by the bug)
  • Some commands in RMGPhysics have been restricted to the PreInit state.
    see G4DeexPrecoParameters::IsLocked() which just silently discards any changes to the G4DeexPrecoParameters if the state is not PreInit.
  • Some guidance and parameter name changes.

* Refactor out a helper function to initialize an interactive session.
  This allows to do a late intitialization of an interactive session.
  Before that change, using the command to use an interactive session
  just segfaulted with a null ptr deref.
* There is an upstream bug with bools in G4GenericMessenger, only
  numeric values work, other values like `true` will be silently ignored.
* Some commands in `RMGPhysics` have been restricted to the PreInit state.
  see `G4DeexPrecoParameters::IsLocked()` which just _silently_ discards
  any changes to the `G4DeexPrecoParameters` if the state is not PreInit.
* Some guidance and parameter name changes.
@ManuelHu ManuelHu merged commit 0691f18 into legend-exp:main Apr 11, 2024
5 checks passed
@ManuelHu ManuelHu deleted the messenger-refactor branch April 11, 2024 07:55
@ManuelHu
Copy link
Collaborator Author

see also upstream bug report https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2606

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