Problem 319 - printing out a material using 'G4cout' reduces precision of all following G4double variables...
Summary: printing out a material using 'G4cout' reduces precision of all following G4d...
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: global/management (show other problems)
Version: 2.0
Hardware: DEC HP-UX
: P2 normal
Assignee: Michel.Maire
URL:
Depends on:
Blocks:
 
Reported: 2001-11-14 06:03 CET by schwamm
Modified: 2001-11-14 08:39 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description schwamm 2001-11-14 06:03:12 CET
Printing out my starting material via

...
 _myStartingMaterial = G4Material::GetMaterial("Copper");
 G4cout << _myStartingMaterial << G4endl;"
...

leads to all the following 'G4double' variables being rounded to 'two-digit'
values, i.e. 2.455*MeV changes to 2.5*MeV, 0.0006643 changes to 0.0066,
672.7*keV changes to 6.7e+02*keV etc.!
Comment 1 Michel.Maire 2001-11-14 08:39:59 CET
It is done on purpose (setPrecision(3)), in order to give a compact
summary of the material properties.
If you wish better, do your own printing method.