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

Allow for relations between two arbitrary types #255

Closed
tmadlener opened this issue Dec 9, 2021 · 0 comments · Fixed by #257
Closed

Allow for relations between two arbitrary types #255

tmadlener opened this issue Dec 9, 2021 · 0 comments · Fixed by #257
Assignees

Comments

@tmadlener
Copy link
Collaborator

Currently to relate two collections or objects of two collections a dedicated type is necessary. This datatype usually has a float weight as single datamember and then two OneToOneRelations to connect two objects.

E.g. from EDM4hep

  edm4hep::MCRecoParticleAssociation:
    Description: "Used to keep track of the correspondence between MC and reconstructed particles"
    Author: "C. Bernet, B. Hegner"
    Members:
      - float weight                        // weight of this association
    OneToOneRelations :
     - edm4hep::ReconstructedParticle  rec  // reference to the reconstructed particle
     - edm4hep::MCParticle sim              // reference to the Monte-Carlo particle

LCIO allows for arbitrary relations between two objects, via the LCRelation. In order to handle all of the relations that are used in the wild many new Association types have to be introduced to EDM4hep, e.g.

It might be simpler to implement a generic (templated) association or relation type in podio that then allows to use (and persist) arbitrary relations between objects.

@tmadlener tmadlener changed the title Allow for arbitrary relations between two types Allow for relations between two arbitrary types Jan 24, 2022
@hegner hegner self-assigned this Sep 25, 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 a pull request may close this issue.

2 participants