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

Refactoring: Storage of Podio data #365

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

nathanwbrei
Copy link
Collaborator

No description provided.

@veprbl
Copy link
Contributor

veprbl commented Sep 19, 2024

Would it be possible to get rid of need for the visitor https://github.com/eic/EICrecon/blob/ae5ce863c38e1f7bc1ce7de414f4a3c96f0867dc/src/services/io/podio/JEventSourcePODIO.cc#L48 ? From what I understand, this is only used to populate vector<PodioT> data, which we don't even want to use.

@nathanwbrei
Copy link
Collaborator Author

Would it be possible to get rid of need for the visitor https://github.com/eic/EICrecon/blob/ae5ce863c38e1f7bc1ce7de414f4a3c96f0867dc/src/services/io/podio/JEventSourcePODIO.cc#L48 ? From what I understand, this is only used to populate vector<PodioT> data, which we don't even want to use.

I was thinking something similar. When I redid the example Podio file reader (https://github.com/JeffersonLab/JANA2/blob/master/src/examples/PodioFileReader/PodioFileReader.cc) I replaced the visitor with a much more obvious chain of if statements. We could probably do the same thing for EICrecon's JEventSourcePodio if we wanted.

@nathanwbrei
Copy link
Collaborator Author

I'm guessing you're hoping for an untyped JEvent::InsertCollectionAlreadyInFrame(const podio::CollectionBase* collection, std::string name) so we can skip the if-statement chain completely. What we have right now doesn't quite go that far, but I think it's pretty doable once this PR merges.

@veprbl
Copy link
Contributor

veprbl commented Sep 20, 2024

I was thinking something similar. When I redid the example Podio file reader (https://github.com/JeffersonLab/JANA2/blob/master/src/examples/PodioFileReader/PodioFileReader.cc) I replaced the visitor with a much more obvious chain of if statements. We could probably do the same thing for EICrecon's JEventSourcePodio if we wanted.

Right, but the real issue is the presence of the codegen due to reliance on RTTI. Other than being (possibly) unnecessary, that makes it impossible to use other PODIO models, that are not seen by codegen.

@JeffersonLab JeffersonLab deleted a comment from DraTeots Sep 20, 2024
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.

2 participants