From 3cb358330b2709e988e954c2415a45da1ee2d887 Mon Sep 17 00:00:00 2001 From: Leonhard Reichenbach Date: Wed, 15 Nov 2023 09:20:37 +0100 Subject: [PATCH] Replace "EventHeader" by edm4hep::EventHeaderName --- k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp | 2 +- k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp b/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp index 1d4b883d..52e49002 100644 --- a/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp +++ b/k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp @@ -320,7 +320,7 @@ StatusCode EDM4hep2LcioTool::convertCollections(lcio::LCEventImpl* lcio_event) { // Start off with the pre-defined collection name mappings auto collsToConvert{m_collNames.value()}; // We *always* want to convert the EventHeader - collsToConvert.emplace("EventHeader", "EventHeader"); + collsToConvert.emplace(edm4hep::EventHeaderName, ""); if (m_convertAll) { info() << "Converting all collections from EDM4hep to LCIO" << endmsg; // And simply add the rest, exploiting the fact that emplace will not diff --git a/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp b/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp index e5cadfdf..d0f7222e 100644 --- a/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp +++ b/k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp @@ -143,8 +143,8 @@ namespace { StatusCode Lcio2EDM4hepTool::convertCollections(lcio::LCEventImpl* the_event) { // Convert Event Header outside the collections loop - if (!collectionExist("EventHeader")) { - registerCollection("EventHeader", LCIO2EDM4hepConv::createEventHeader(the_event)); + if (!collectionExist(edm4hep::EventHeaderName)) { + registerCollection(edm4hep::EventHeaderName, LCIO2EDM4hepConv::createEventHeader(the_event)); } // Start off with the pre-defined collection name mappings