add option to filter by run number as well as event number - #105
Conversation
This is helpful for people like me who have massive samples of heavily-filtered simulations. The best way to generate these samples is across many runs but then merge the resulting files. This results in several runs per file and often an event from one run is aborted by the simulation while the same event number from a different run is the event I wish to resimulate.
EinarElen
left a comment
There was a problem hiding this comment.
Looks good (can you tell that my setup is biased towards production that you can run in one big file? :))
I do think the logic in produce is a bit complicated, if at all possible I think we should try to simplify it (or at least spread it our/refactor it). As it is, I wouldn't want a new developer to have to read through it
the translation of different format of runs provided by the user into the actual data structure used during processing is done within python now so it can be more transparent in error
|
Ok, I refactored how I implemented it and chose to move the deduction of a configuration from the parameters supplied by the user into the python. I haven't tested running yet, but I wanted to push it up here to see if others think it reads better. @EinarElen ? |
|
This looks reasonable to me, I would just move the check for whether an event should be resimulated into a member function rather than doing it inline with a lambda. i.e. it would read if (!resimulate_all) {
if skip_event(event) {
abort_event()
}
}
|
this is helpful isolation and makes it easier to document how an event ends up being re-simulated
This is helpful for people like me who have massive samples of heavily-filtered simulations. The best way to generate these samples is across many runs but then merge the resulting files. This results in several runs per file and often an event from one run is aborted by the simulation while the same event number from a different run is the event I wish to resimulate.