From c0bbab011219c3b6489d2dd7c4ea0b16bb1e08af Mon Sep 17 00:00:00 2001 From: Kolja Date: Sat, 9 Aug 2025 15:52:52 +0000 Subject: [PATCH] Fix handling for CONST properties in CreateOpticalSurfaceN method (cherry picked from commit b3c06177378fb735d7a6adce0f9fe64e8ac41090) --- geom/gdml/src/TGDMLWrite.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/geom/gdml/src/TGDMLWrite.cxx b/geom/gdml/src/TGDMLWrite.cxx index 03c335441cd79..f94a1b1d6d535 100644 --- a/geom/gdml/src/TGDMLWrite.cxx +++ b/geom/gdml/src/TGDMLWrite.cxx @@ -1944,6 +1944,14 @@ XMLNodePointer_t TGDMLWrite::CreateOpticalSurfaceN(TGeoOpticalSurface *geoSurf) while ((property = (TNamed *)next())) fGdmlE->AddChild(mainN, CreatePropertyN(*property)); } + // Write CONST properties + TList const &const_properties = geoSurf->GetConstProperties(); + if (const_properties.GetSize()) { + TIter next(&const_properties); + TNamed *property; + while ((property = (TNamed *)next())) + fGdmlE->AddChild(mainN, CreatePropertyN(*property)); + } return mainN; }