feat: EDM4HEPSchema and Newstyle FCCSchema Development #1242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@lgray @davidlange6 @gomber
Here is a draft for the EDM4HEPSchema (edm4hep1) and FCCSchema based on the same. I have not yet managed to add many comments and descriptions, but I plan to add them eventually.
Workings:
The EDM4HEPSchema reads the
edm4hep.yaml
file from the assets directory. I felt this was necessary to add maximum functionality to the schema. Reading the specifications of all the 'components' and 'datatypes' from the yaml file helps to identify the 'members' (example,energy
is a member ofedm4hep::ReconstructedParticle
datatype) and which members correspond to the various types of cross-branch relations in EDM4HEP: vector members, OneToOneRelations, OneToManyRelations and Links.The Schema fetches the comments in the
edm4hep.yaml
file and assigns them as docstrings to the relevant branches.The EDM4HEPSchema supports all these relations (With Links needing some manual boilerplate code from the user).
The version of the
edm4hep.yaml
file used is here. Please note that the way Links are represented in EDM4HEP has changed in the latest commit. @tmadlener can comment more on this. In any case, it seems necessary to find a way to track the changes from edm4hep.yaml, so that the COFFEA EDM4HEPSchema does not become obsolete after a few version changes.Link to example Notebooks:
Tests:
Other comments:
ExtraCode
sections mentioned inedm4hep.yaml
. They appear to be declarations for C++ methods specific to certain collections.