Message: puzzled by exrdmPhysicsList in "extended examples" Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question puzzled by exrdmPhysicsList in "extended examples" 

Keywords: example exrdmPhysicsList
Forum: Documentation and Examples
Date: 05 Jan, 2005
From: Alain Ferragut <Alain Ferragut>

Hi, I do not understand some code lines in exrdm example. It is located in the physics list , SelectPhysicsList() method.

1/ "if (!hadPhysicsList) delete hadPhysicsList;" . What is the purpose of deleting a NULL pointer ? We need to delete it if the corresponding object already exists, so that a new one can be created...Or do I miss something.....

2/ "if (!hadPhysicsList) delete emPhysicsList;". I get even more confused here. Why deleting emPhysicsList if hadPhysicsList is NULL ? Isn't it "if (emPhysicsList) delete emPhysicsList;"

Thanks,

              Alain

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

1 None: Re: puzzled by exrdmPhysicsList in "extended examples"   (Vladimir IVANTCHENKO - 05 Jan, 2005)
 Add Message Add Message
to: "puzzled by exrdmPhysicsList in "extended examples""

 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 ]