From f157ea03016b54852be6ebe4d1e759c79b914640 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Thu, 17 Oct 2024 14:48:27 +0200 Subject: [PATCH] Use podio::collMetadataParamName and fix a few headers --- k4Reco/Overlay/components/OverlayTiming.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/k4Reco/Overlay/components/OverlayTiming.cpp b/k4Reco/Overlay/components/OverlayTiming.cpp index 48802ed..609c51c 100644 --- a/k4Reco/Overlay/components/OverlayTiming.cpp +++ b/k4Reco/Overlay/components/OverlayTiming.cpp @@ -19,10 +19,14 @@ #include "OverlayTiming.h" #include -#include "podio/Frame.h" +#include "podio/FrameCategories.h" +#include "edm4hep/CaloHitContributionCollection.h" #include "edm4hep/Constants.h" -#include "edm4hep/MutableCaloHitContribution.h" +#include "edm4hep/EventHeaderCollection.h" +#include "edm4hep/MCParticleCollection.h" +#include "edm4hep/SimCalorimeterHitCollection.h" +#include "edm4hep/SimTrackerHitCollection.h" #include "k4FWCore/MetadataUtils.h" @@ -30,6 +34,8 @@ #include #include +#include +#include template inline float time_of_flight(const T& pos) { // Returns the time of flight to the radius in ns @@ -387,12 +393,13 @@ StatusCode OverlayTiming::finalize() { {std::make_pair(inputLocations("SimTrackerHits"), outputLocations("OutputSimTrackerHits")), std::make_pair(inputLocations("SimCalorimeterHits"), outputLocations("OutputSimCalorimeterHits"))}) { for (size_t i = 0; i < input.size(); ++i) { - auto name = input[i]; - auto value = k4FWCore::getParameter(name + "__" + edm4hep::labels::CellIDEncoding, this); + auto value = k4FWCore::getParameter( + podio::collMetadataParamName(input[i], edm4hep::labels::CellIDEncoding), this); if (value.has_value()) { - k4FWCore::putParameter(output[i] + "__" + edm4hep::labels::CellIDEncoding, value.value(), this); + k4FWCore::putParameter(podio::collMetadataParamName(output[i], edm4hep::labels::CellIDEncoding), + value.value(), this); } else { - warning() << "No metadata found for " << name << " when copying CellID metadata was requested" << endmsg; + warning() << "No metadata found for " << input[i] << " when copying CellID metadata was requested" << endmsg; } } }