From 257e761e4f6b4799184512c01ae208acbcf7720b Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 20 Feb 2024 15:30:21 +0100 Subject: [PATCH] Switch to the non-deprecated overloads --- .../k4MarlinWrapper/converters/EDM4hep2Lcio.h | 9 ++++----- .../src/components/EDM4hep2Lcio.cpp | 19 ++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/k4MarlinWrapper/k4MarlinWrapper/converters/EDM4hep2Lcio.h b/k4MarlinWrapper/k4MarlinWrapper/converters/EDM4hep2Lcio.h index 12dcc2a2..1b21cb2c 100644 --- a/k4MarlinWrapper/k4MarlinWrapper/converters/EDM4hep2Lcio.h +++ b/k4MarlinWrapper/k4MarlinWrapper/converters/EDM4hep2Lcio.h @@ -85,15 +85,14 @@ class EDM4hep2LcioTool : public GaudiTool, virtual public IEDMConverter { void convertRawCalorimeterHits(RawCaloHitMap& raw_calo_hits_vec, const std::string& e4h_coll_name, const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event); - void convertSimCalorimeterHits(SimCaloHitMap& sim_calo_hits_vec, const MCParticleMap& mcparticles, - const std::string& e4h_coll_name, const std::string& lcio_coll_name, - lcio::LCEventImpl* lcio_event); + void convertSimCalorimeterHits(SimCaloHitMap& sim_calo_hits_vec, const std::string& e4h_coll_name, + const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event); void convertTPCHits(TPCHitMap& tpc_hits_vec, const std::string& e4h_coll_name, const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event); - void convertClusters(ClusterMap& cluster_vec, const CaloHitMap& calohits_vec, const std::string& e4h_coll_name, - const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event); + void convertClusters(ClusterMap& cluster_vec, const std::string& e4h_coll_name, const std::string& lcio_coll_name, + lcio::LCEventImpl* lcio_event); void convertVertices(VertexMap& vertex_vec, const RecoParticleMap& recoparticles_vec, const std::string& e4h_name, const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event); diff --git a/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp b/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp index 9a4a8139..3b777a50 100644 --- a/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp +++ b/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp @@ -156,9 +156,8 @@ void EDM4hep2LcioTool::convertRawCalorimeterHits(RawCaloHitMap& raw_calo_hits_ve // Convert EDM4hep Sim Calorimeter Hits to LCIO // Add converted LCIO ptr and original EDM4hep collection to vector of pairs // Add converted LCIO Collection Vector to LCIO event -void EDM4hep2LcioTool::convertSimCalorimeterHits(SimCaloHitMap& sim_calo_hits_vec, const MCParticleMap& mcparticles, - const std::string& e4h_coll_name, const std::string& lcio_coll_name, - lcio::LCEventImpl* lcio_event) { +void EDM4hep2LcioTool::convertSimCalorimeterHits(SimCaloHitMap& sim_calo_hits_vec, const std::string& e4h_coll_name, + const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event) { DataHandle sim_calohit_handle{e4h_coll_name, Gaudi::DataHandle::Reader, this}; const auto simcalohit_coll = sim_calohit_handle.get(); @@ -166,7 +165,7 @@ void EDM4hep2LcioTool::convertSimCalorimeterHits(SimCaloHitMap& sim_calo_hits_ve const auto cellIDstr = cellIDHandle.get(); // TODO mcparticles_vdc - auto* conv_simcalohits = convSimCalorimeterHits(simcalohit_coll, cellIDstr, sim_calo_hits_vec, mcparticles); + auto* conv_simcalohits = convSimCalorimeterHits(simcalohit_coll, cellIDstr, sim_calo_hits_vec); // Add all Sim Calorimeter Hits to event lcio_event->addCollection(conv_simcalohits, lcio_coll_name); @@ -189,13 +188,12 @@ void EDM4hep2LcioTool::convertTPCHits(TPCHitMap& tpc_hits_vec, const std::string // Convert EDM4hep Clusters to LCIO // Add converted LCIO ptr and original EDM4hep collection to vector of pairs // Add converted LCIO Collection Vector to LCIO event -void EDM4hep2LcioTool::convertClusters(ClusterMap& cluster_vec, const CaloHitMap& calohits_vec, - const std::string& e4h_coll_name, const std::string& lcio_coll_name, - lcio::LCEventImpl* lcio_event) { +void EDM4hep2LcioTool::convertClusters(ClusterMap& cluster_vec, const std::string& e4h_coll_name, + const std::string& lcio_coll_name, lcio::LCEventImpl* lcio_event) { DataHandle cluster_handle{e4h_coll_name, Gaudi::DataHandle::Reader, this}; const auto cluster_coll = cluster_handle.get(); - auto* conv_clusters = convClusters(cluster_coll, cluster_vec, calohits_vec); + auto* conv_clusters = convClusters(cluster_coll, cluster_vec); // Add clusters to event lcio_event->addCollection(conv_clusters, lcio_coll_name); @@ -284,12 +282,11 @@ void EDM4hep2LcioTool::convertAdd(const std::string& e4h_coll_name, const std::s } else if (fulltype == "edm4hep::RawCalorimeterHit") { convertRawCalorimeterHits(collection_pairs.rawCaloHits, e4h_coll_name, lcio_coll_name, lcio_event); } else if (fulltype == "edm4hep::SimCalorimeterHit") { - convertSimCalorimeterHits(collection_pairs.simCaloHits, collection_pairs.mcParticles, e4h_coll_name, lcio_coll_name, - lcio_event); + convertSimCalorimeterHits(collection_pairs.simCaloHits, e4h_coll_name, lcio_coll_name, lcio_event); } else if (fulltype == "edm4hep::RawTimeSeries") { convertTPCHits(collection_pairs.tpcHits, e4h_coll_name, lcio_coll_name, lcio_event); } else if (fulltype == "edm4hep::Cluster") { - convertClusters(collection_pairs.clusters, collection_pairs.caloHits, e4h_coll_name, lcio_coll_name, lcio_event); + convertClusters(collection_pairs.clusters, e4h_coll_name, lcio_coll_name, lcio_event); } else if (fulltype == "edm4hep::Vertex") { convertVertices(collection_pairs.vertices, collection_pairs.recoParticles, e4h_coll_name, lcio_coll_name, lcio_event);