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

Remove deprecated functions #91

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Conversation

tmadlener
Copy link
Contributor

@tmadlener tmadlener commented Aug 23, 2024

BEGINRELEASENOTES

  • Remove deprecated conversion functions now that all downstream consumers have switched.
  • Remove association (and derived terms) from documentation, variable names and comments.

ENDRELEASENOTES

These were introduced in #86 and #54 to decouple the changes from necessary fixes in k4MarlinWrapper.

@@ -191,13 +168,6 @@ std::unique_ptr<lcio::LCCollectionVec>
convertSimTrackerHits(const edm4hep::SimTrackerHitCollection* const edmCollection, const CellIDStrType& cellIDstr,
SimTrHitMapT& simTrHitMap);

template <typename SimTrHitMapT, typename MCParticleMapT>
[[deprecated("Use convertSimTrackerHits instead")]] lcio::LCCollectionVec*
convSimTrackerHits(const edm4hep::SimTrackerHitCollection* const simtrackerhits_coll, const CellIDStrType& cellIDstr,
Copy link
Member

@jmcarcell jmcarcell Sep 9, 2024

Choose a reason for hiding this comment

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

@@ -310,13 +229,6 @@ std::unique_ptr<lcio::LCCollectionVec>
convertReconstructedParticles(const edm4hep::ReconstructedParticleCollection* const edmCollection,
RecoParticleMapT& recoParticleMap);

template <typename RecoPartMapT, typename TrackMapT, typename VertexMapT, typename ClusterMapT>
[[deprecated("Use convertReconstructedParticle instead")]] lcio::LCCollectionVec*
convReconstructedParticles(const edm4hep::ReconstructedParticleCollection* const recos_coll,
Copy link
Member

Choose a reason for hiding this comment

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

@@ -145,13 +145,6 @@ template <typename ObjectMappingT>
std::vector<CollNamePair> createLinks(const ObjectMappingT& typeMapping,
const std::vector<std::pair<std::string, EVENT::LCCollection*>>& LCRelation);

template <typename ObjectMappingT>
[[deprecated("use createLinks instead")]] std::vector<CollNamePair>
createAssociations(const ObjectMappingT& typeMapping,
Copy link
Member

Choose a reason for hiding this comment

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

@jmcarcell
Copy link
Member

jmcarcell commented Sep 9, 2024

Somehow related to the change from Association to Link, Association is still used in several places in tests:

tests/src/CompareEDM4hepLCIO.h
235:bool compareVertexRecoAssociation(const EVENT::Vertex* lcioVtx, const edm4hep::VertexRecoParticleLink& association,

tests/src/CompareEDM4hepLCIO.cc
477:// bool compareStartVertexRelations(const edm4hep::VertexRecoParticleLinkCollection& startVtxAssociations, const
479://   for (const auto& assoc : startVtxAssociations) {
497:bool compareVertexRecoAssociation(const EVENT::Vertex*, const edm4hep::VertexRecoParticleLink&, const ObjectMappings&) {

tests/src/EDM4hep2LCIOUtilities.cc
352:AssocCollT createAssociationCollection(const CollT& collA, const CollU& collB) {
370:  return createAssociationCollection<edm4hep::RecoMCParticleLinkCollection>(mcParticles, recoParticles);
376:  return createAssociationCollection<edm4hep::CaloHitSimCaloHitLinkCollection>(simHits, caloHits);

tests/src/CompareEDM4hepEDM4hep.h
44:template <typename AssociationCollT>
45:bool compare(const AssociationCollT& origColl, const AssociationCollT& roundtripColl) {


tests/src/CompareEDM4hepLCIO.h
235:bool compareVertexRecoAssociation(const EVENT::Vertex* lcioVtx, const edm4hep::VertexRecoParticleLink& association,

And then in some other places related to documentation:

k4EDM4hep2LcioConv/src/k4Lcio2EDM4hepConv.cpp
89:      // We handle Relations (aka Associations) once we have converted all the
115:  // AssociationCollections.

k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h
440: * Create an LCRelation collection from the passed Association Collection

doc/LCIO2EDM4hep.md
131:The AssociationCollections in EDM4hep are then created using `createAssociations`.

@tmadlener
Copy link
Contributor Author

There were also quite a few assoc and other similar thing. I think I got most of them.

@tmadlener tmadlener merged commit acbcac3 into key4hep:main Sep 9, 2024
4 of 6 checks passed
@tmadlener tmadlener deleted the rm-deprecated-funcs branch September 9, 2024 09:37
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