From 706d87f2e386c8b9e7185d89389893ccb0e85417 Mon Sep 17 00:00:00 2001 From: Tapio Date: Mon, 21 Mar 2022 14:53:05 +0100 Subject: [PATCH] In printout, add newline before inputTag --- .../DropBoxMetaDataPayloadInspectorHelper.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CondCore/PhysicsToolsPlugins/interface/DropBoxMetaDataPayloadInspectorHelper.h b/CondCore/PhysicsToolsPlugins/interface/DropBoxMetaDataPayloadInspectorHelper.h index c38757cd17245..70a6d6c92fe93 100644 --- a/CondCore/PhysicsToolsPlugins/interface/DropBoxMetaDataPayloadInspectorHelper.h +++ b/CondCore/PhysicsToolsPlugins/interface/DropBoxMetaDataPayloadInspectorHelper.h @@ -238,13 +238,13 @@ namespace DBoxMetadataHelper { toAppend.clear(); for (unsigned int iPath = 0; iPath < pathsPrep.size(); ++iPath) { std::string thisString = pathsPrep[iPath]; - + // skip userText since we want to see actual contents, not metadata if (thisString.find("userText") == std::string::npos) { - // if the line to be added has less than colWidth chars append to current - if ((toAppend + thisString).length() < colWidth) { + // if the line to be added has less than colWidth chars, and is not a new tag ("inputTag"), append to current + if ((toAppend + thisString).length() < colWidth && thisString.find("inputTag") != 0) { toAppend += thisString; } else { - // else if the line exceeds colWidth chars, dump in the vector and resume from scratch + // else if the line exceeds colWidth chars or this is a new tag ("inputTag"), dump in the vector and resume from scratch output.push_back(toAppend); toAppend.clear(); toAppend += thisString; @@ -615,10 +615,10 @@ namespace DBoxMetadataHelper { toAppend.clear(); for (unsigned int iPath = 0; iPath < thePaths.size(); ++iPath) { std::string thisString = thePaths[iPath]; - // if the line to be added has less than colWidth chars append to current + // skip userText since we want to compare actual contents, not metadata if (thisString.find("userText") == std::string::npos) { - // if the line to be added has less than colWidth chars append to current - if ((toAppend + thisString).length() < colWidth) { + // if the line to be added has less than colWidth chars, and is not a new tag ("inputTag"), append to current + if ((toAppend + thisString).length() < colWidth && thisString.find("inputTag") != 0) { toAppend += thisString; } else { // else if the line exceeds colWidth chars, dump in the vector and resume from scrach