Message: Changing geometry between runs with GDML (Ex-G02 not allowing update) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Changing geometry between runs with GDML (Ex-G02 not allowing update) 

Forum: Persistency
Date: 02 Nov, 2014
From: Jonathan Wrobel <Jonathan Wrobel>

Hello,

Short version:
I'm looking to be able to update the detector geometry between runs, and it seems like the Persistency example G02 has that functionality. However, when I run the G02 example ($ ./geotest, without passed parameters) it will load the default geometry and do a short run. But then when I try to load a new GMDL geometry using the UI command "/mydet/readFile __.gdml" I get the following error:

  illegal application state -- command refused:"/mydet/readFile test2.gdml"

What do I need to do to get to a legal application state? Are there UI commands that I can issue?



Long version:
Basically I'd like to keep Geant4 up and running, changing the geometry between runs by issuing UI commands to read in new GDML files, rather than passing the GDML files as passed parameters in the initial function call. I know that it's necessary to do some cleaning between geometries:

  G4GeometryManager::GetInstance()->OpenGeometry();
  G4PhysicalVolumeStore::GetInstance()->Clean();
  G4LogicalVolumeStore::GetInstance()->Clean();
  G4SolidStore::GetInstance()->Clean();

however it looks like the GDMLParser takes care of this when it calls the G4GDMLMessenger.cc class. The problem is that I cannot get that far because of the "illegal application state" error. How do I exit a run and what is the legal application state that I'm trying to get to?

Thanks for any help!

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Michael H. Kelsey - 02 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Mike Kelsey - 03 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Mike Kelsey - 03 Nov, 2014)
(_ Question: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Makoto Asai - 03 Nov, 2014)
(_ Question: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
 Add Message Add Message
to: "Changing geometry between runs with GDML (Ex-G02 not allowing update)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]