Problem 1244

Summary: Constructor of G4MaterialPropertyVector leaves uninitialized variables
Product: Geant4 Reporter: David Jaffe <djaffe>
Component: materialsAssignee: Marc.Verderi
Status: RESOLVED INVALID    
Severity: normal CC: gum
Priority: P5    
Version: 9.2   
Hardware: All   
OS: All   

Description David Jaffe 2011-08-24 21:02:13 CEST
If the constructor,
	
	G4MaterialPropertyVector(G4double *PhotonEnergies, 
		  	   	 G4double *PropertyValues,
				 G4int     NumElements);

is used, then the Last... variables that are normally initialized with the other constructor,

	G4MaterialPropertyVector() : MPV(0) 
	{
		CurrentEntry = -1;
		NumEntries   = 0;
		LastRequestedPhotonEnergy = -1;
		LastReturnedValue = 0;
	};

are left uninitialized. The latter constructor is used by GiGa.
Comment 1 gum 2011-08-31 00:49:33 CEST
Hi David,

What version of Geant4 are you using? The variables LastRequestedPhotonEnergy and  LastReturnedValue do not look familiar to me? Can it be that you are using a GiGa modified version?

Cheers, Peter
Comment 2 David Jaffe 2011-08-31 15:13:57 CEST
Hi Peter,

 We have indeed applied a patch to Geant4.9.2.p01's G4MaterialPropertyVector, so this is not a G4 bug.

 My apologies!

- David