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

Add command /RMG/Geometry/RegisterDetector #63

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

ManuelHu
Copy link
Collaborator

@ManuelHu ManuelHu commented Mar 27, 2024

  • We need our own messenger for this, as G4GenericMessenger only supports binding to functions with <= 2 arguments.
  • This also adds a safeguard against changing the list of active detectors after the detector has been constructed. Until now this silently failed/did nothing.
    This problem cannot be reached by the new command (it is bound to the PreInit state), but could be reached by custom C++ code.

@gipert
Copy link
Member

gipert commented Mar 27, 2024

Looks great, thanks Manuel.

@gipert gipert merged commit 6e91b6d into legend-exp:main Mar 27, 2024
5 checks passed
@ManuelHu ManuelHu deleted the register-det branch March 27, 2024 09:04
@ManuelHu
Copy link
Collaborator Author

ManuelHu commented Apr 1, 2024

Just a note: this still does not work, I am currently trying out how to fix it.

The analysis manager is set up before even loading the macro file, so it is disabled (and later crashes).

@ManuelHu
Copy link
Collaborator Author

ManuelHu commented Apr 1, 2024

follow-up: #65

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.

2 participants