From a87228b4517a2ac1cf6c68922d7774ab7ac57027 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Fri, 2 Jun 2023 12:19:24 +0200 Subject: [PATCH] Make podio type name calls future string_view proof --- DDDigi/io/DigiEdm4hepInput.cpp | 2 +- DDDigi/io/DigiEdm4hepOutput.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DDDigi/io/DigiEdm4hepInput.cpp b/DDDigi/io/DigiEdm4hepInput.cpp index fed8075e9..fae54e153 100644 --- a/DDDigi/io/DigiEdm4hepInput.cpp +++ b/DDDigi/io/DigiEdm4hepInput.cpp @@ -241,7 +241,7 @@ namespace dd4hep { data_io()._to_digi_if(*collection, hits, predicate); data_io()._to_digi(Key(nam, segment.id, mask), hits, out); info("%s+++ %-24s Converted %6ld Edm4hep %-14s to %6ld cell deposits", - context.event->id(), nam.c_str(), len, collection->getValueTypeName().c_str(), out.size()); + context.event->id(), nam.c_str(), len, collection->getValueTypeName().data(), out.size()); put_data(segment, Key(out.name, mask), std::move(out)); if ( m_keep_raw ) { put_data(segment, Key(nam+".edm4hep", mask, segment.id), std::move(hits)); diff --git a/DDDigi/io/DigiEdm4hepOutput.cpp b/DDDigi/io/DigiEdm4hepOutput.cpp index 49575df97..82d1653f5 100644 --- a/DDDigi/io/DigiEdm4hepOutput.cpp +++ b/DDDigi/io/DigiEdm4hepOutput.cpp @@ -100,7 +100,7 @@ namespace dd4hep { template T* DigiEdm4hepOutput::internals_t::register_collection(const std::string& nam, T* coll) { m_collections.emplace(nam, coll); m_store->registerCollection(nam, coll); - m_parent->debug("+++ created collection %s <%s>", nam.c_str(), coll->getTypeName().c_str()); + m_parent->debug("+++ created collection %s <%s>", nam.c_str(), coll->getTypeName().data()); return coll; } @@ -235,7 +235,7 @@ namespace dd4hep { std::size_t end = internals->m_particles->size(); info("%s+++ %-24s added %6ld/%6ld entries from mask: %04X to %s", ctxt.event->id(), cont.name.c_str(), end-start, end, cont.key.mask(), - coll->getTypeName().c_str()); + coll->getTypeName().data()); } template void @@ -288,7 +288,7 @@ namespace dd4hep { std::size_t end = coll->size(); info("%s+++ %-24s added %6ld/%6ld entries from mask: %04X to %s", ctxt.event->id(), cont.name.c_str(), end-start, end, cont.key.mask(), - coll->getTypeName().c_str()); + coll->getTypeName().data()); } void DigiEdm4hepOutputProcessor::convert_history(DigiContext& ctxt,