Skip to content

Refactor retrieval of EDM4hep event Frame into method #238

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tmadlener
Copy link
Contributor

@tmadlener tmadlener commented May 22, 2025

BEGINRELEASENOTES

  • Refactor the retrieval of the EDM4hep event (Frame) into standalone method

ENDRELEASENOTES

Another standalone outcome of #236

As far as I can tell there is no way that the optional is not engaged that didn't already break before. The behavior before was

  • If there is a PodioDataSvc, we get the event Frame from there
  • Otherwise we get the Frame from where the IOSvc puts it
    • In case it is not there we create an empty local Frame for which the reference_wrapper will immediately dangle.

Hence, we could probably remove both the optional and the reference_wrapper (which I didn't do yet).

@jmcarcell anything I missed here about the previous behavior?

@tmadlener
Copy link
Contributor Author

tmadlener commented May 22, 2025

Playing around with godbolt, it indeed looks like the previous version only worked by accident (if it worked at all) (reproducer).

I have switched to returning a const & and throwing an exception in case there is no valid Frame available. At least for our tests everything seems to work.

@tmadlener
Copy link
Contributor Author

Tests are passing for me locally. I have to investigate why they are failing here.

@tmadlener
Copy link
Contributor Author

Not sure why tests were passing for me locally, I can't seem to reproduce this. I have added the necessary functionality to put an empty Frame into the TES if none is there already.

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.

1 participant