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

Move to new link types to keep compatibility with EDM4hep in the future #217

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions k4FWCore/components/CollectionMerger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ struct CollectionMerger final : k4FWCore::Transformer<std::shared_ptr<podio::Col
m_map["edm4hep::VertexCollection"] = &CollectionMerger::mergeCollections<edm4hep::VertexCollection>;
m_map["edm4hep::ReconstructedParticleCollection"] =
&CollectionMerger::mergeCollections<edm4hep::ReconstructedParticleCollection>;
m_map["edm4hep::MCRecoParticleAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::MCRecoParticleAssociationCollection>;
m_map["edm4hep::MCRecoCaloAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::MCRecoCaloAssociationCollection>;
m_map["edm4hep::MCRecoTrackerAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::MCRecoTrackerAssociationCollection>;
m_map["edm4hep::MCRecoCaloParticleAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::MCRecoCaloParticleAssociationCollection>;
m_map["edm4hep::MCRecoClusterParticleAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::MCRecoClusterParticleAssociationCollection>;
m_map["edm4hep::MCRecoTrackParticleAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::MCRecoTrackParticleAssociationCollection>;
m_map["edm4hep::RecoParticleVertexAssociationCollection"] =
&CollectionMerger::mergeCollections<edm4hep::RecoParticleVertexAssociationCollection>;
m_map["edm4hep::RecoMCParticleLinkCollection"] =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here one could think that duplicating the lines to also have the old names in the map (mapped to merging the new ones) could be useful but files with the old names can have been produced with the latest release and are incompatible or with an older nightly which will also be incompatible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle the new typenames should be enough because they come from the collection in any case. So even if an older version / name was on disk, by the time it reaches this place, we will only ever have to deal with the actual / new typename.

&CollectionMerger::mergeCollections<edm4hep::RecoMCParticleLinkCollection>;
m_map["edm4hep::CaloHitSimCaloHitLinkCollection"] =
&CollectionMerger::mergeCollections<edm4hep::CaloHitSimCaloHitLinkCollection>;
m_map["edm4hep::TrackerHitSimTrackerHitLinkCollection"] =
&CollectionMerger::mergeCollections<edm4hep::TrackerHitSimTrackerHitLinkCollection>;
m_map["edm4hep::CaloHitMCParticleLinkCollection"] =
&CollectionMerger::mergeCollections<edm4hep::CaloHitMCParticleLinkCollection>;
m_map["edm4hep::ClusterMCParticleLinkCollection"] =
&CollectionMerger::mergeCollections<edm4hep::ClusterMCParticleLinkCollection>;
m_map["edm4hep::TrackMCParticleLinkCollection"] =
&CollectionMerger::mergeCollections<edm4hep::TrackMCParticleLinkCollection>;
m_map["edm4hep::VertexRecoParticleLinkCollection"] =
&CollectionMerger::mergeCollections<edm4hep::VertexRecoParticleLinkCollection>;
m_map["edm4hep::TimeSeriesCollection"] = &CollectionMerger::mergeCollections<edm4hep::TimeSeriesCollection>;
m_map["edm4hep::RecDqdxCollection"] = &CollectionMerger::mergeCollections<edm4hep::RecDqdxCollection>;
m_map["edm4hep::GeneratorEventParametersCollection"] =
Expand Down
Loading