Skip to content

Commit

Permalink
Use setFrom and setTo to fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 2, 2024
1 parent 5969b93 commit 4ffdb36
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions scripts/createEDM4hepFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,50 +272,50 @@
links = edm4hep.RecoMCParticleLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(reco_particle)
link.setSim(particle)
link.setFrom(reco_particle)
link.setTo(particle)
frame.put(links, "RecoMCParticleLinkCollection")

links = edm4hep.CaloHitSimCaloHitLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(calo_hit)
link.setSim(simcalo_hit)
link.setFrom(calo_hit)
link.setTo(simcalo_hit)
frame.put(links, "CaloHitSimCaloHitLinkCollection")

links = edm4hep.TrackerHitSimTrackerHitLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(tracker_hit)
link.setSim(simtracker_hit)
link.setFrom(tracker_hit)
link.setTo(simtracker_hit)
frame.put(links, "TrackerHitSimTrackerHitLinkCollection")

links = edm4hep.CaloHitMCParticleLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(calo_hit)
link.setSim(particle)
link.setFrom(calo_hit)
link.setTo(particle)
frame.put(links, "CaloHitMCParticleLinkCollection")

links = edm4hep.ClusterMCParticleLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(cluster)
link.setSim(particle)
link.setFrom(cluster)
link.setTo(particle)
frame.put(links, "ClusterMCParticleLinkCollection")

links = edm4hep.TrackMCParticleLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(track)
link.setSim(particle)
link.setFrom(track)
link.setTo(particle)
frame.put(links, "TrackMCParticleLinkCollection")

links = edm4hep.VertexRecoParticleLinkCollection()
link = links.create()
link.setWeight(next(counter))
link.setRec(reco_particle)
link.setVertex(v)
link.setTo(reco_particle)
link.setFrom(v)
frame.put(links, "MCVertexRecoParticleLinkCollection")

timeseries = edm4hep.TimeSeriesCollection()
Expand Down

0 comments on commit 4ffdb36

Please sign in to comment.