-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat: allow users of ddsim
to set e.g. stepping action
#1218
feat: allow users of ddsim
to set e.g. stepping action
#1218
Conversation
Test Results 6 files 6 suites 2h 18m 26s ⏱️ Results for commit 292bcea. ♻️ This comment has been updated with latest results. |
Thanks for this! Is it likely or possible that one would like to configure properties for these actions? |
It probably should at least be possible, but because the plugins can be anything I don't know what the best way to pass these options would be. Is this best done with a dict? |
For configuration something similar is done with the filters, if I remember correctly. Either just a name, like now, or a tuple of name and dict with properties. |
I'll implement this with parameters, otherwise it's pretty limited in its usefulness I'm realizing. |
I added the ability to specify parameters, and modified Geant4TestActions's Geant4TestBase to print out its properties on destructions to be able to test this. Now we can do:
and it will print
What I haven't been able to make work yet is something with two event actions, i.e. like this:
This just activates the last action only. I'm probably overlooking something obvious, but I'll look again later. For now, adding multiple event actions through a list is also possible:
which does give
|
1c926ae
to
83a89d3
Compare
for parameter, value in action_dict['parameter'].items(): | ||
setattr(action, parameter, value) | ||
kernel_Action().add(action) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to kernel.registerGlobalAction(action)
here to allow access by name later on(?).
Co-authored-by: Andre Sailer <[email protected]>
Co-authored-by: Andre Sailer <[email protected]>
Sorry for the slow progress on this (heavy teaching load this term). This now passes the unit test, BUT
|
After c452e5a no more duplication of inputs, and no more missing arguments. |
Explicity set namespace to TrackClassification in TestStackingAction::classifyNewTrack
For some studies we use DDG4 stepping (etc) action plugins in
ddsim
runs. For example, we are using this for fluence calculations by keeping track of where steps are activated.This now allows, e.g.
and the output indicates that the actions are called a suitably large number of times.
TODO:
examples/CLICSiD/scripts/CLICSiDAClick.C
which is only place that uses Geant4TestEventAction, but doesn't test ddsim calling interface?BEGINRELEASENOTES
ENDRELEASENOTES