Problem 1244 - Constructor of G4MaterialPropertyVector leaves uninitialized variables
Summary: Constructor of G4MaterialPropertyVector leaves uninitialized variables
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: materials (show other problems)
Version: 9.2
Hardware: All All
: P5 normal
Assignee: Marc.Verderi
URL:
Depends on:
Blocks:
 
Reported: 2011-08-24 21:02 CEST by David Jaffe
Modified: 2011-08-31 15:13 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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