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 sequence stop on not finding more events to process #42

Merged
merged 6 commits into from
Sep 27, 2021

Conversation

fdplacido
Copy link
Contributor

BEGINRELEASENOTES

  • When indicating to process more events than available, algorithm will create empty event and fail by trying to continue.
  • If no more events to read are found, the processing will stop
    ENDRELEASENOTES

@fdplacido
Copy link
Contributor Author

Fixes #36

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fdplacido,
Thanks for taking care of this. Looks good to me.

I have two minor questions that only concern the tests: Wouldn't it be possible to run the tests via k4run [...] --num-events=[number of events]? In that way only one options file and bash script would be necessary to cover both currently present tests. Also I think it would be nice to add a comparison of the number of events in the input file and the output file via lcio_event_counter (just to be really sure that there is no empty event).

@fdplacido
Copy link
Contributor Author

I changed it to use k4run as you suggested. For the number of events comparison: I agree, that is a good test to have, so I'll create a simple options file that creates some output to be able to compare.

@fdplacido fdplacido changed the title Add sequence stop on not finding more events to process [WIP] Add sequence stop on not finding more events to process Sep 15, 2021
@fdplacido
Copy link
Contributor Author

I added a test to check that using lcio_event_counter, thanks for the suggestion @tmadlener

@fdplacido fdplacido changed the title [WIP] Add sequence stop on not finding more events to process Add sequence stop on not finding more events to process Sep 15, 2021
@fdplacido fdplacido requested a review from tmadlener September 15, 2021 15:19
@fdplacido fdplacido requested a review from tmadlener September 27, 2021 15:27
@fdplacido
Copy link
Contributor Author

I updated as you suggested, checking now for correct number of output events with -1, and testing for any number of events.

Copy link
Collaborator

@andresailer andresailer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@fdplacido fdplacido force-pushed the stop_gracefully_read_events branch from cc960a0 to 9299082 Compare September 27, 2021 15:50
@fdplacido fdplacido merged commit ed444e5 into key4hep:master Sep 27, 2021
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.

"EOF" is not handled gracefully by LcioEvent and the MarlinProcessorWrapper combination
3 participants