Skip to content
Snippets Groups Projects
Commit 24b03b68 authored by Dave Casper's avatar Dave Casper
Browse files

Add option to dump GDML

parent b56f451c
No related branches found
No related tags found
No related merge requests found
...@@ -200,12 +200,14 @@ void G4FaserAlg::initializeOnce() ...@@ -200,12 +200,14 @@ void G4FaserAlg::initializeOnce()
if(m_userLimitsSvc.retrieve().isFailure()) { if(m_userLimitsSvc.retrieve().isFailure()) {
throw std::runtime_error("Could not initialize ATLAS UserLimitsSvc!"); throw std::runtime_error("Could not initialize ATLAS UserLimitsSvc!");
} }
G4LogicalVolumeStore* store = G4LogicalVolumeStore::GetInstance(); if (!m_gdmlFilename.empty())
G4LogicalVolume* world = store->GetVolume("Faser::Faser"); {
G4GDMLParser parser {}; G4LogicalVolumeStore* store = G4LogicalVolumeStore::GetInstance();
parser.Write("Faser.gdml", world); G4LogicalVolume* world = store->GetVolume("Faser::Faser");
ATH_MSG_ALWAYS("Wrote detector geometry to GDML file"); G4GDMLParser parser {};
parser.Write(m_gdmlFilename.value(), world);
}
if (m_activateParallelGeometries) { if (m_activateParallelGeometries) {
G4VModularPhysicsList* thePhysicsList=dynamic_cast<G4VModularPhysicsList*>(m_physListSvc->GetPhysicsList()); G4VModularPhysicsList* thePhysicsList=dynamic_cast<G4VModularPhysicsList*>(m_physListSvc->GetPhysicsList());
......
...@@ -120,6 +120,8 @@ private: ...@@ -120,6 +120,8 @@ private:
/// Activate multi-threading configuration /// Activate multi-threading configuration
Gaudi::Property<bool> m_useMT{this,"MultiThreading", false, "Multi-threading specific settings"}; Gaudi::Property<bool> m_useMT{this,"MultiThreading", false, "Multi-threading specific settings"};
Gaudi::Property<bool> m_activateParallelGeometries{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"}; Gaudi::Property<bool> m_activateParallelGeometries{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"};
/// Dump GDML file
Gaudi::Property<std::string> m_gdmlFilename{this, "GDMLfile", "", "GDML geometry file to write"};
/// Random number service /// Random number service
ServiceHandle<IAthRNGSvc> m_rndmGenSvc{this, "AtRndmGenSvc", "AthRNGSvc", ""}; // TODO rename property ServiceHandle<IAthRNGSvc> m_rndmGenSvc{this, "AtRndmGenSvc", "AthRNGSvc", ""}; // TODO rename property
/// Random Stream Name /// Random Stream Name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment