Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 14, 2025
1 parent 56b1450 commit 3e789ff
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,19 @@ StatusCode Lcio2EDM4hepTool::convertCollections(lcio::LCEventImpl* the_event) {
}

// Set the ParticleID meta information
auto& metadataFrame = m_podioDataSvc->getMetaDataFrame();
for (const auto& [collName, pidInfo] : pidInfos) {
edm4hep::utils::PIDHandler::setAlgoInfo(metadataFrame, collName, pidInfo);
// TODO: Clean up
if (m_podioDataSvc) {
auto& metadataFrame = m_podioDataSvc->getMetaDataFrame();
for (const auto& [collName, pidInfo] : pidInfos) {
edm4hep::utils::PIDHandler::setAlgoInfo(metadataFrame, collName, pidInfo);
}
}
else {
for (const auto& [collName, pidInfo] : pidInfos) {
k4FWCore::putParameter(podio::collMetadataParamName(collName, edm4hep::labels::PIDAlgoName), pidInfo.algoName);
k4FWCore::putParameter(podio::collMetadataParamName(collName, edm4hep::labels::PIDAlgoType), pidInfo.algoType());
k4FWCore::putParameter(podio::collMetadataParamName(collName, edm4hep::labels::PIDParameterNames), pidInfo.paramNames);
}
}

// We want one "global" map that is created the first time it is used in the event.
Expand Down

0 comments on commit 3e789ff

Please sign in to comment.