Message: Ownership and persistence of G4UIcommands and G4UIdirectories? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Ownership and persistence of G4UIcommands and G4UIdirectories? 

Forum: (Graphical) User Interfaces
Date: 13 Dec, 2010
From: Michael H. Kelsey <Michael H. Kelsey>

I am developing a "modular" geometry model application to be used with the SuperCDMS experiment. In the code we're using, each geometry component builder has its own Messenger class, which it instantiates and owns, and which it then deletes in its destructor.

I discovered recently during testing that I cannot properly "switch" geometries in a single job (I wanted to write a macro to do overlaps checking for all the geometries in sequence). What happens when I switch from one detector to another is that the component builders all get deleted, and new ones created. If one of the "new" ones happens to have been present previously, the Messenger commands don't get properly reinstantiated.

When a Messenger class is created, are the G4UIcommands (and subclasses) owned by the Messenger itself, or does owner ship get transferred (invisibly) to the G4UIManager? Should I delete those commands (or the whole Messenger) myself or not?

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

1 None: RE: Ownership and persistence of G4UIcommands and G4UIdirectories?   (Asai, Makoto - 13 Dec, 2010)
(_ None: Re: Ownership and persistence of G4UIcommands and G4UIdirectories?   (Mike Kelsey - 13 Dec, 2010)
(_ None: RE: Ownership and persistence of G4UIcommands and G4UIdirectories?   (Asai, Makoto - 13 Dec, 2010)
 Add Message Add Message
to: "Ownership and persistence of G4UIcommands and G4UIdirectories?"

 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 ]