rest-for-physics / framework

The main project containing the core C++ classes defining framework behaviour and primordial analysis and helper tools. It centralises all other rest-for-physics repositories through submodules.
GNU General Public License v3.0
19 stars 11 forks source link

eventsToProcess #523

Open jgalan opened 2 months ago

jgalan commented 2 months ago

I would like to control the number of input events to be processed, this was the default behavior before when setting the value of eventsToProcess. Instead, now, eventsToProcess will control the number of events on the output file.

It is still possible to achieve the previous behavior? I.e. launch 1000 events processing and get the number of events that were accepted (between those 1000) in the output.

lobis commented 2 months ago

Looking at the code it appears it's been this way for a long time now (I wasn't the one who modified it).

I don't think it possible to set the number of events to be processed (which I also think the current name of this option is misleading) but it shouldn't be too hard to achieve.

I think "events to process" should work as you describe: the number of input file events to be processed. To maintain consistency with restG4 this should use the -n flag.

Another option, "events in output file" should do what the events to process does currently, stop when a given number of events in the output file is reached. This should use the -e option as it does right now.