From 05f2792bec1fb5d2c4b70652327ff93b91afcbf9 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 11 Nov 2023 12:49:57 -0600 Subject: [PATCH] fix: mv id() to getObjectID().index because id() now returns ObjectID, not uint_t This adds forward compatibility with podio v0.17.1 See https://github.com/AIDASoft/podio/pull/493 (cherry picked from commit 8989cf75d3f541f18ed1d0f58e73fd4a0bbe7cd5) --- src/algorithms/calorimetry/CalorimeterTruthClustering.cc | 2 +- src/algorithms/calorimetry/ImagingClusterReco.h | 2 +- src/algorithms/digi/PhotoMultiplierHitDigi.cc | 4 ++-- src/algorithms/pid/ConvertParticleID.h | 2 +- src/algorithms/pid/MergeParticleID.cc | 2 +- src/algorithms/pid/ParticlesWithPID.cc | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/algorithms/calorimetry/CalorimeterTruthClustering.cc b/src/algorithms/calorimetry/CalorimeterTruthClustering.cc index ddb9b14153..382d24d78d 100644 --- a/src/algorithms/calorimetry/CalorimeterTruthClustering.cc +++ b/src/algorithms/calorimetry/CalorimeterTruthClustering.cc @@ -66,7 +66,7 @@ std::unique_ptr CalorimeterTruthClustering::pro } } - const auto &trackID = mc[mcIndex].getContributions(0).getParticle().id(); + const auto &trackID = mc[mcIndex].getContributions(0).getParticle().getObjectID().index; // Create a new protocluster if we don't have one for this trackID if (protoIndex.count(trackID) == 0) { output->create(); diff --git a/src/algorithms/calorimetry/ImagingClusterReco.h b/src/algorithms/calorimetry/ImagingClusterReco.h index 21fc4dec5b..2f5c0715bf 100644 --- a/src/algorithms/calorimetry/ImagingClusterReco.h +++ b/src/algorithms/calorimetry/ImagingClusterReco.h @@ -131,7 +131,7 @@ namespace eicrecon { // debug output for (const auto& cl: *clusters) { - m_log->debug("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.id(), + m_log->debug("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.getObjectID().index, cl.getEnergy() * 1000., cl.getIntrinsicTheta() / M_PI * 180., cl.getIntrinsicPhi() / M_PI * 180. ); diff --git a/src/algorithms/digi/PhotoMultiplierHitDigi.cc b/src/algorithms/digi/PhotoMultiplierHitDigi.cc index 7159ef0deb..6d85803d7f 100644 --- a/src/algorithms/digi/PhotoMultiplierHitDigi.cc +++ b/src/algorithms/digi/PhotoMultiplierHitDigi.cc @@ -109,7 +109,7 @@ eicrecon::PhotoMultiplierHitDigiResult eicrecon::PhotoMultiplierHitDigi::Algorit // cell time, signal amplitude, truth photon m_log->trace(" -> hit accepted"); - m_log->trace(" -> MC hit id={}", sim_hit.id()); + m_log->trace(" -> MC hit id={}", sim_hit.getObjectID().index); auto time = sim_hit.getTime(); double amp = m_cfg.speMean + m_rngNorm() * m_cfg.speError; @@ -130,7 +130,7 @@ eicrecon::PhotoMultiplierHitDigiResult eicrecon::PhotoMultiplierHitDigi::Algorit for(auto &hit : hitVec) { m_log->trace("hit_group: pixel id={:#018X} -> npe={} signal={} time={}", id, hit.npe, hit.signal, hit.time); for(auto i : hit.sim_hit_indices) - m_log->trace(" - MC hit: EDep={}, id={}", sim_hits->at(i).getEDep(), sim_hits->at(i).id()); + m_log->trace(" - MC hit: EDep={}, id={}", sim_hits->at(i).getEDep(), sim_hits->at(i).getObjectID().index); } } diff --git a/src/algorithms/pid/ConvertParticleID.h b/src/algorithms/pid/ConvertParticleID.h index 7d2716f5be..6ee30965c6 100644 --- a/src/algorithms/pid/ConvertParticleID.h +++ b/src/algorithms/pid/ConvertParticleID.h @@ -64,7 +64,7 @@ namespace eicrecon { // create output `ParticleID` object auto out_index = out_pids.size(); auto out_pid = out_pids.create(); - out_indices.insert({out_index, out_pid.id()}); + out_indices.insert({out_index, out_pid.getObjectID().index}); // fill scalars out_pid.setPDG( static_cast (in_hyp.PDG) ); diff --git a/src/algorithms/pid/MergeParticleID.cc b/src/algorithms/pid/MergeParticleID.cc index d331adc003..8e6839732e 100644 --- a/src/algorithms/pid/MergeParticleID.cc +++ b/src/algorithms/pid/MergeParticleID.cc @@ -94,7 +94,7 @@ std::unique_ptr eicrecon::MergeParticleI m_log->error("PID object found with no charged particle"); continue; } - auto id_particle = charged_particle_track_segment.id(); + auto id_particle = charged_particle_track_segment.getObjectId().index; auto idx_paired = std::make_pair(idx_coll, idx_pid); m_log->trace(" idx_pid={} id_particle={}", idx_pid, id_particle); diff --git a/src/algorithms/pid/ParticlesWithPID.cc b/src/algorithms/pid/ParticlesWithPID.cc index 46d2ab53f4..393ec33e40 100644 --- a/src/algorithms/pid/ParticlesWithPID.cc +++ b/src/algorithms/pid/ParticlesWithPID.cc @@ -335,7 +335,7 @@ namespace eicrecon { // relate matched ParticleID objects to output particle for (const auto& [out_pids_index, out_pids_id] : out_pid_index_map) { const auto& out_pid = out_pids->at(out_pids_index); - if (out_pid.id() != out_pids_id) { // sanity check + if (out_pid.getObjectID().index != out_pids_id) { // sanity check m_log->error("indexing error in `edm4eic::ParticleID` collection"); return false; }