Import Geant4 10.3.1 source tree

This commit is contained in:
Gabriele Cosmo
2017-02-28 16:16:20 +01:00
parent a3452e42ac
commit 4597adb7c4
267 changed files with 14761 additions and 24650 deletions
+18 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4UIcommand.cc 89953 2015-05-06 08:09:12Z gcosmo $
// $Id: G4UIcommand.cc 102562 2017-02-09 08:27:31Z gcosmo $
//
//
@@ -37,6 +37,7 @@
#include "G4Tokenizer.hh"
#include "G4ios.hh"
#include <sstream>
#include <iomanip>
G4UIcommand::G4UIcommand()
: messenger(0), toBeBroadcasted(false), toBeFlushed(false), workerThreadOnly(false),
@@ -386,7 +387,10 @@ G4String G4UIcommand::ConvertToString(G4int intValue)
G4String G4UIcommand::ConvertToString(G4double doubleValue)
{
std::ostringstream os;
os << doubleValue;
if(G4UImanager::DoublePrecisionStr())
{ os << std::setprecision(17) << doubleValue; }
else
{ os << doubleValue; }
G4String vl = os.str();
return vl;
}
@@ -397,7 +401,10 @@ G4String G4UIcommand::ConvertToString(G4double doubleValue,const char* unitName)
G4double uv = ValueOf(unitName);
std::ostringstream os;
os << doubleValue/uv << " " << unitName;
if(G4UImanager::DoublePrecisionStr())
{ os << std::setprecision(17) << doubleValue/uv << " " << unitName; }
else
{ os << doubleValue/uv << " " << unitName; }
G4String vl = os.str();
return vl;
}
@@ -405,7 +412,10 @@ G4String G4UIcommand::ConvertToString(G4double doubleValue,const char* unitName)
G4String G4UIcommand::ConvertToString(G4ThreeVector vec)
{
std::ostringstream os;
os << vec.x() << " " << vec.y() << " " << vec.z();
if(G4UImanager::DoublePrecisionStr())
{ os << std::setprecision(17) << vec.x() << " " << vec.y() << " " << vec.z(); }
else
{ os << vec.x() << " " << vec.y() << " " << vec.z(); }
G4String vl = os.str();
return vl;
}
@@ -416,8 +426,10 @@ G4String G4UIcommand::ConvertToString(G4ThreeVector vec,const char* unitName)
G4double uv = ValueOf(unitName);
std::ostringstream os;
os << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv
<< " " << unitName;
if(G4UImanager::DoublePrecisionStr())
{ os << std::setprecision(17) << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv << " " << unitName; }
else
{ os << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv << " " << unitName; }
G4String vl = os.str();
return vl;
}