Message: Re: deleteaSource in General Particle Source Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: deleteaSource in General Particle Source 

Forum: Event and Track Management
Re: None deleteaSource in General Particle Source (Paola Marini)
Date: 14 Oct, 2010
From: Gumplinger Peter <Gumplinger Peter>

> However I'm running a simulation in which I need to call the General Particle

> Constructor inside my GeneratePrimaries() method.

Why do you think you need to do that? In all the examples I know off the constructor is called only once and that is in the constructor of the PrimaryGeneratorAction.

But yes, you may well have found dangling pointers that aren't deleted by the destructor of the class where they are made. Not very consequential if that destructor (as in the case of PrimaryGeneratorAction) is only called at the end of run.

Note, you can reconfigure the internal properties of the (one) GeneralParticleSource you have differently for every event!

 Add Message Add Message
to: "Re: deleteaSource in General Particle Source"

 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 ]