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

Fix looping over omgeo maps #29

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Fix looping over omgeo maps #29

merged 3 commits into from
Jan 22, 2025

Conversation

pweigel
Copy link
Contributor

@pweigel pweigel commented Jan 22, 2025

In icetray v1.13.0, an old method of accessing maps was removed, which affects looping over the om geometries.

This PR just changes some loops over frame["I3Geometry"].omgeo since they used the removed method and no longer work with the latest version of icetray.

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@b314abd). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             master     #29   +/-   ##
========================================
  Coverage          ?   0.04%           
========================================
  Files             ?      34           
  Lines             ?    4239           
  Branches          ?     817           
========================================
  Hits              ?       2           
  Misses            ?    4236           
  Partials          ?       1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mhuen
Copy link
Collaborator

mhuen commented Jan 22, 2025

Thanks for creating the PR and fixing this. I'll merge once the print statement is removed.

@mhuen
Copy link
Collaborator

mhuen commented Jan 22, 2025

Do the older icetray versions support this indexing? Otherwise I think we will need to add some compatibility for that

@pweigel
Copy link
Contributor Author

pweigel commented Jan 22, 2025

Oops, that was from some testing I was doing earlier.

As far as I understand, the .items() method should have always worked and should be backward compatible. The old __iter__ method for these objects acted like a std::map/similar to .items() and yielded the tuples rather than acting like a python dictionary (just the keys). Here is the icetray PR that changed this behavior: https://github.com/icecube/icetray/pull/3576

@mhuen
Copy link
Collaborator

mhuen commented Jan 22, 2025

Ok, then this should be good to go

@mhuen mhuen merged commit fe15fb5 into master Jan 22, 2025
5 checks passed
@mhuen mhuen deleted the fix_omgeo_map branch January 22, 2025 22:25
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.

3 participants