Skip to content

Commit

Permalink
Set default extension to top level placement (TGeoManager::GetTopVolu…
Browse files Browse the repository at this point in the history
…me())
  • Loading branch information
MarkusFrankATcernch committed Feb 8, 2024
1 parent 43aa0cf commit e8cba55
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 115 deletions.
7 changes: 7 additions & 0 deletions DDCore/src/DetectorImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,13 @@ void DetectorImp::endDocument(bool close_geometry) {
// Since we allow now for anonymous shapes,
// we will rename them to use the name of the volume they are assigned to
mgr->CloseGeometry();
PlacedVolume pv = mgr->GetTopNode();
auto* extension = pv->GetUserExtension();
if ( nullptr == extension ) {
extension = new PlacedVolume::Object();
pv->SetUserExtension(extension);
}
m_world.setPlacement(pv);
}
// Patching shape names of anaonymous shapes
ShapePatcher patcher(m_volManager, m_world);
Expand Down
Loading

0 comments on commit e8cba55

Please sign in to comment.