From 434f1a922835cb5f9c9f354ddaac1f60de1fab0b Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 30 Nov 2023 14:47:35 +0100 Subject: [PATCH 1/2] Remove std::cout in favour of edm::LogVerbatim in Fireworks/Geometry --- Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc b/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc index 7108add425b4f..96a7b0dad648b 100644 --- a/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc +++ b/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc @@ -138,8 +138,7 @@ TGeoMgrFromDdd::ReturnType TGeoMgrFromDdd::produce(const DisplayGeomRecord& iRec gGeoIdentity = new TGeoIdentity("Identity"); } - std::cout << "about to initialize the DDCompactView walker" - << " with a root node " << viewH->root() << std::endl; + edm::LogVerbatim("TGeoMgrFromDdd") << "about to initialize the DDCompactView walker with a root node " << viewH->root() << std::endl; auto walker = viewH->walker(); auto info = walker.current(); @@ -170,10 +169,9 @@ TGeoMgrFromDdd::ReturnType TGeoMgrFromDdd::produce(const DisplayGeomRecord& iRec auto info = walker.current(); if (m_verbose) { - std::cout << "parentStack of size " << parentStack.size() << std::endl; + edm::LogVerbatim("TGeoMgrFromDdd") << "parentStack of size " << parentStack.size(); auto num = (info.second != nullptr) ? info.second->copyno() : 0; - std::cout << info.first.name() << " " << num << " " << DDSolidShapesName::name(info.first.solid().shape()) - << std::endl; + edm::LogVerbatim("TGeoMgrFromDdd") << info.first.name() << " " << num << " " << DDSolidShapesName::name(info.first.solid().shape()); } std::string name = m_fullname ? info.first.name().fullname() : info.first.name().name(); @@ -614,7 +612,7 @@ TGeoVolume* TGeoMgrFromDdd::createVolume(const std::string& iName, const DDSolid TGeoMaterial* TGeoMgrFromDdd::createMaterial(const DDMaterial& iMaterial) { std::string mat_name = m_fullname ? iMaterial.name().fullname() : iMaterial.name().name(); - edm::LogVerbatim("TGeoMgrFromDdd") << "createMateriale with name: " << mat_name; + edm::LogVerbatim("TGeoMgrFromDdd") << "createMaterial with name: " << mat_name; TGeoMaterial* mat = nameToMaterial_[mat_name]; if (mat == nullptr) { From 23e9fb808e4e0b0acca2f3f899b794b16a1120d2 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 30 Nov 2023 15:22:48 +0100 Subject: [PATCH 2/2] Code checks --- Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc b/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc index 96a7b0dad648b..28a50775ceb48 100644 --- a/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc +++ b/Fireworks/Geometry/plugins/TGeoMgrFromDdd.cc @@ -138,7 +138,8 @@ TGeoMgrFromDdd::ReturnType TGeoMgrFromDdd::produce(const DisplayGeomRecord& iRec gGeoIdentity = new TGeoIdentity("Identity"); } - edm::LogVerbatim("TGeoMgrFromDdd") << "about to initialize the DDCompactView walker with a root node " << viewH->root() << std::endl; + edm::LogVerbatim("TGeoMgrFromDdd") << "about to initialize the DDCompactView walker with a root node " + << viewH->root() << std::endl; auto walker = viewH->walker(); auto info = walker.current(); @@ -171,7 +172,8 @@ TGeoMgrFromDdd::ReturnType TGeoMgrFromDdd::produce(const DisplayGeomRecord& iRec if (m_verbose) { edm::LogVerbatim("TGeoMgrFromDdd") << "parentStack of size " << parentStack.size(); auto num = (info.second != nullptr) ? info.second->copyno() : 0; - edm::LogVerbatim("TGeoMgrFromDdd") << info.first.name() << " " << num << " " << DDSolidShapesName::name(info.first.solid().shape()); + edm::LogVerbatim("TGeoMgrFromDdd") << info.first.name() << " " << num << " " + << DDSolidShapesName::name(info.first.solid().shape()); } std::string name = m_fullname ? info.first.name().fullname() : info.first.name().name();