diff --git a/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp b/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp index 6d16d05f..5e242891 100644 --- a/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp +++ b/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp @@ -19,6 +19,8 @@ #include "k4MarlinWrapper/converters/EDM4hep2Lcio.h" #include "GlobalConvertedObjectsMap.h" +#include "edm4hep/Constants.h" + #include "k4FWCore/DataHandle.h" #include "k4FWCore/MetaDataHandle.h" @@ -94,7 +96,7 @@ void EDM4hep2LcioTool::convertTrackerHits(TrackerHitMap& trackerhits_vec, const DataHandle trackerhits_handle{e4h_coll_name, Gaudi::DataHandle::Reader, this}; const auto trackerhits_coll = trackerhits_handle.get(); - MetaDataHandle cellIDStrHandle{trackerhits_handle, "CellIDEncoding", Gaudi::DataHandle::Reader}; + MetaDataHandle cellIDStrHandle{trackerhits_handle, edm4hep::CellIDEncoding, Gaudi::DataHandle::Reader}; auto* conv_trackerhits = convTrackerHits(trackerhits_coll, cellIDStrHandle.get(), trackerhits_vec); @@ -111,7 +113,7 @@ void EDM4hep2LcioTool::convertSimTrackerHits(SimTrackerHitMap& simtrackerhits_ve DataHandle simtrackerhits_handle{e4h_coll_name, Gaudi::DataHandle::Reader, this}; const auto simtrackerhits_coll = simtrackerhits_handle.get(); - MetaDataHandle cellIDHandle{simtrackerhits_handle, "CellIDEncoding", Gaudi::DataHandle::Reader}; + MetaDataHandle cellIDHandle{simtrackerhits_handle, edm4hep::CellIDEncoding, Gaudi::DataHandle::Reader}; const auto cellIDstr = cellIDHandle.get(); auto* conv_simtrackerhits = convSimTrackerHits(simtrackerhits_coll, cellIDstr, simtrackerhits_vec, mcparticles_vec); @@ -128,7 +130,7 @@ void EDM4hep2LcioTool::convertCalorimeterHits(CaloHitMap& calo_hits_vec, const s DataHandle calohit_handle{e4h_coll_name, Gaudi::DataHandle::Reader, this}; const auto calohit_coll = calohit_handle.get(); - MetaDataHandle cellIDHandle{calohit_handle, "CellIDEncoding", Gaudi::DataHandle::Reader}; + MetaDataHandle cellIDHandle{calohit_handle, edm4hep::CellIDEncoding, Gaudi::DataHandle::Reader}; const auto cellIDstr = cellIDHandle.get(); auto* conv_calohits = convCalorimeterHits(calohit_coll, cellIDstr, calo_hits_vec); @@ -160,7 +162,7 @@ void EDM4hep2LcioTool::convertSimCalorimeterHits(SimCaloHitMap& sim_calo_hits_ve DataHandle sim_calohit_handle{e4h_coll_name, Gaudi::DataHandle::Reader, this}; const auto simcalohit_coll = sim_calohit_handle.get(); - MetaDataHandle cellIDHandle{sim_calohit_handle, "CellIDEncoding", Gaudi::DataHandle::Reader}; + MetaDataHandle cellIDHandle{sim_calohit_handle, edm4hep::CellIDEncoding, Gaudi::DataHandle::Reader}; const auto cellIDstr = cellIDHandle.get(); // TODO mcparticles_vdc diff --git a/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp b/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp index 6c892b8b..88be478d 100644 --- a/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp +++ b/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -107,11 +108,11 @@ void Lcio2EDM4hepTool::registerCollection( lcioColl->getParameters().getStringKeys(string_keys); for (auto& elem : string_keys) { - if (elem == "CellIDEncoding") { + if (elem == edm4hep::CellIDEncoding) { const auto& lcio_coll_cellid_str = lcioColl->getParameters().getStringVal(lcio::LCIO::CellIDEncoding); auto& mdFrame = m_podioDataSvc->getMetaDataFrame(); - mdFrame.putParameter(podio::collMetadataParamName(name, "CellIDEncoding"), lcio_coll_cellid_str); - debug() << "Storing CellIDEncoding " << podio::collMetadataParamName(name, "CellIDEncoding") + mdFrame.putParameter(podio::collMetadataParamName(name, edm4hep::CellIDEncoding), lcio_coll_cellid_str); + debug() << "Storing CellIDEncoding " << podio::collMetadataParamName(name, edm4hep::CellIDEncoding) << " value: " << lcio_coll_cellid_str << endmsg; } else { // TODO: figure out where this actually needs to go