Skip to content

Commit c3a1ba7

Browse files
committed
Fix handling for CONST properties in CreateOpticalSurfaceN method
1 parent 85d6faf commit c3a1ba7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

geom/gdml/src/TGDMLWrite.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,14 @@ XMLNodePointer_t TGDMLWrite::CreateOpticalSurfaceN(TGeoOpticalSurface *geoSurf)
19441944
while ((property = (TNamed *)next()))
19451945
fGdmlE->AddChild(mainN, CreatePropertyN(*property));
19461946
}
1947+
// Write CONST properties
1948+
TList const &const_properties = geoSurf->GetConstProperties();
1949+
if (const_properties.GetSize()) {
1950+
TIter next(&const_properties);
1951+
TNamed *property;
1952+
while ((property = (TNamed *)next()))
1953+
fGdmlE->AddChild(mainN, CreatePropertyN(*property));
1954+
}
19471955
return mainN;
19481956
}
19491957

0 commit comments

Comments
 (0)