Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIaliasList.cc,v 1.5 2002/04/26 22:03:35 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIaliasList.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIbatch.cc,v 1.13 2005/05/19 16:40:45 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIbatch.hh"
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWith3Vector.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWith3Vector.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWith3Vector.hh"
#include <strstream>
G4UIcmdWith3Vector::G4UIcmdWith3Vector
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -21,15 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWith3VectorAndUnit.cc,v 1.7 2004/05/16 20:42:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWith3VectorAndUnit.cc,v 1.8 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWith3VectorAndUnit.hh"
#include "G4Tokenizer.hh"
#include "G4UnitsTable.hh"
#include <strstream>
#include <sstream>
G4UIcmdWith3VectorAndUnit::G4UIcmdWith3VectorAndUnit
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -57,7 +57,7 @@ G4ThreeVector G4UIcmdWith3VectorAndUnit::GetNew3VectorRawValue(const char* param
G4double vy;
G4double vz;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vx >> vy >> vz >> unts;
return G4ThreeVector(vx,vy,vz);
}
@@ -68,7 +68,7 @@ G4double G4UIcmdWith3VectorAndUnit::GetNewUnitValue(const char* paramString)
G4double vy;
G4double vz;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vx >> vy >> vz >> unts;
G4String unt = unts;
return ValueOf(unt);
@@ -80,11 +80,11 @@ G4String G4UIcmdWith3VectorAndUnit::ConvertToStringWithBestUnit(G4ThreeVector ve
G4String canList = unitParam->GetParameterCandidates();
G4Tokenizer candidateTokenizer(canList);
G4String aToken = candidateTokenizer();
char strg[120];
std::ostrstream os(strg,120);
os << G4BestUnit(vec,CategoryOf(aToken)) << '\0';
G4String st = strg;
std::ostringstream os;
os << G4BestUnit(vec,CategoryOf(aToken));
G4String st = os.str();
return st;
}
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithABool.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithABool.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithABool.hh"
#include <strstream>
G4UIcmdWithABool::G4UIcmdWithABool
(const char * theCommandPath,G4UImessenger * theMessenger)
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithADouble.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithADouble.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithADouble.hh"
#include <strstream>
G4UIcmdWithADouble::G4UIcmdWithADouble
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -21,15 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithADoubleAndUnit.cc,v 1.7 2004/05/16 20:42:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithADoubleAndUnit.cc,v 1.8 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4Tokenizer.hh"
#include "G4UnitsTable.hh"
#include <strstream>
#include <sstream>
G4UIcmdWithADoubleAndUnit::G4UIcmdWithADoubleAndUnit
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -52,7 +52,7 @@ G4double G4UIcmdWithADoubleAndUnit::GetNewDoubleRawValue(const char* paramString
G4double vl;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vl >> unts;
return vl;
@@ -63,7 +63,7 @@ G4double G4UIcmdWithADoubleAndUnit::GetNewUnitValue(const char* paramString)
G4double vl;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vl >> unts;
G4String unt = unts;
@@ -76,11 +76,10 @@ G4String G4UIcmdWithADoubleAndUnit::ConvertToStringWithBestUnit(G4double val)
G4String canList = unitParam->GetParameterCandidates();
G4Tokenizer candidateTokenizer(canList);
G4String aToken = candidateTokenizer();
char strg[60];
std::ostrstream os(strg,60);
os << G4BestUnit(val,CategoryOf(aToken)) << '\0';
std::ostringstream os;
os << G4BestUnit(val,CategoryOf(aToken));
G4String st = strg;
G4String st = os.str();
return st;
}
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithAString.cc,v 1.4 2003/06/16 16:55:41 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithAString.cc,v 1.5 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithAString.hh"
#include <strstream>
G4UIcmdWithAString::G4UIcmdWithAString
(const char * theCommandPath,G4UImessenger * theMessenger)
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithAnInteger.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithAnInteger.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithAnInteger.hh"
#include <strstream>
G4UIcmdWithAnInteger::G4UIcmdWithAnInteger
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithoutParameter.cc,v 1.3 2001/07/11 10:01:16 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+26 -31
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UIcommand.cc,v 1.23 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcommand.cc,v 1.24 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -34,6 +34,7 @@
#include "G4UnitsTable.hh"
#include "G4Tokenizer.hh"
#include "G4ios.hh"
#include <sstream>
G4UIcommand::G4UIcommand()
:messenger(0),token(IDENTIFIER),paramERR(0)
@@ -351,19 +352,17 @@ G4String G4UIcommand::ConvertToString(G4bool boolVal)
G4String G4UIcommand::ConvertToString(G4int intValue)
{
char st[20];
std::ostrstream os(st,20);
os << intValue << '\0';
G4String vl = st;
std::ostringstream os;
os << intValue;
G4String vl = os.str();
return vl;
}
G4String G4UIcommand::ConvertToString(G4double doubleValue)
{
char st[40];
std::ostrstream os(st,40);
os << doubleValue << '\0';
G4String vl = st;
std::ostringstream os;
os << doubleValue;
G4String vl = os.str();
return vl;
}
@@ -372,19 +371,17 @@ G4String G4UIcommand::ConvertToString(G4double doubleValue,const char* unitName)
G4String unt = unitName;
G4double uv = ValueOf(unitName);
char st[60];
std::ostrstream os(st,60);
os << doubleValue/uv << " " << unitName << '\0';
G4String vl = st;
std::ostringstream os;
os << doubleValue/uv << " " << unitName;
G4String vl = os.str();
return vl;
}
G4String G4UIcommand::ConvertToString(G4ThreeVector vec)
{
char st[100];
std::ostrstream os(st,100);
os << vec.x() << " " << vec.y() << " " << vec.z() << '\0';
G4String vl = st;
std::ostringstream os;
os << vec.x() << " " << vec.y() << " " << vec.z();
G4String vl = os.str();
return vl;
}
@@ -393,11 +390,10 @@ G4String G4UIcommand::ConvertToString(G4ThreeVector vec,const char* unitName)
G4String unt = unitName;
G4double uv = ValueOf(unitName);
char st[120];
std::ostrstream os(st,120);
std::ostringstream os;
os << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv
<< " " << unitName << '\0';
G4String vl = st;
<< " " << unitName;
G4String vl = os.str();
return vl;
}
@@ -414,7 +410,7 @@ G4bool G4UIcommand::ConvertToBool(const char* st)
G4int G4UIcommand::ConvertToInt(const char* st)
{
G4int vl;
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vl;
return vl;
}
@@ -422,7 +418,7 @@ G4int G4UIcommand::ConvertToInt(const char* st)
G4double G4UIcommand::ConvertToDouble(const char* st)
{
G4double vl;
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vl;
return vl;
}
@@ -432,7 +428,7 @@ G4double G4UIcommand::ConvertToDimensionedDouble(const char* st)
G4double vl;
char unts[30];
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vl >> unts;
G4String unt = unts;
@@ -444,7 +440,7 @@ G4ThreeVector G4UIcommand::ConvertTo3Vector(const char* st)
G4double vx;
G4double vy;
G4double vz;
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vx >> vy >> vz;
return G4ThreeVector(vx,vy,vz);
}
@@ -455,7 +451,7 @@ G4ThreeVector G4UIcommand::ConvertToDimensioned3Vector(const char* st)
G4double vy;
G4double vz;
char unts[30];
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vx >> vy >> vz >> unts;
G4String unt = unts;
G4double uv = ValueOf(unt);
@@ -467,7 +463,6 @@ G4ThreeVector G4UIcommand::ConvertToDimensioned3Vector(const char* st)
#include <ctype.h> // isalpha(), toupper()
#include <strstream>
//#include "checkNewValue_debug.icc"
//#define DEBUG 1
@@ -489,7 +484,7 @@ TypeCheck(const char * t)
{
G4String aNewValue;
char type;
std::istrstream is((char*)t);
std::istringstream is(t);
for (unsigned i=0; i< parameter.size(); i++) {
is >> aNewValue;
type = toupper(parameter[i]->GetParameterType());
@@ -623,7 +618,7 @@ RangeCheck(const char* t) {
yystype result;
char type;
bp = 0; // reset buffer pointer for G4UIpGetc()
std::istrstream is((char*)t);
std::istringstream is(t);
for (unsigned i=0; i< parameter.size(); i++) {
type= toupper(parameter[i]->GetParameterType());
switch ( type ) {
@@ -1050,7 +1045,7 @@ Yylex() // reads input and returns token number, KR486
c=='e' || c=='E' || c=='+' || c=='-');
G4UIpUngetc(c);
const char* t = buf;
std::istrstream is((char*)t);
std::istringstream is(t);
if ( IsInt(buf.data(),20) ) {
is >> yylval.I;
return CONSTINT;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcommandTree.cc,v 1.12 2003/06/16 16:55:44 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIcommandTree.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcontrolMessenger.cc,v 1.9 2002/05/15 06:51:32 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include <stdlib.h>
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIdirectory.cc,v 1.3 2001/07/11 10:01:16 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+11 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UImanager.cc,v 1.29 2003/06/16 16:55:45 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UImanager.cc,v 1.30 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ---------------------------------------------------------------------
@@ -40,7 +40,7 @@
#include "G4UIaliasList.hh"
#include "G4Tokenizer.hh"
#include <strstream>
#include <sstream>
G4UImanager * G4UImanager::fUImanager = 0;
@@ -161,7 +161,7 @@ const char * aParameterName, G4bool reGet)
GetCurrentStringValue( aCommand, aParameterName, reGet );
G4int value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -173,7 +173,7 @@ G4int parameterNumber, G4bool reGet)
GetCurrentStringValue( aCommand, parameterNumber, reGet );
G4int value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -185,7 +185,7 @@ const char * aParameterName, G4bool reGet)
GetCurrentStringValue( aCommand, aParameterName, reGet );
G4double value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -197,7 +197,7 @@ G4int parameterNumber, G4bool reGet)
GetCurrentStringValue( aCommand, parameterNumber, reGet );
G4double value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -233,7 +233,7 @@ void G4UImanager::LoopS(const char* valueList)
c1 += " ";
c1 += parameterToken();
const char* t1 = c1;
std::istrstream is((char*)t1);
std::istringstream is(t1);
G4double d1;
G4double d2;
G4double d3;
@@ -247,10 +247,9 @@ void G4UImanager::Loop(const char * macroFile,const char * variableName,
G4String cd;
for(G4double d=initialValue;d<=finalValue;d+=stepSize)
{
char st[20];
std::ostrstream os(st,20);
os << d << '\0';
cd += st;
std::ostringstream os;
os << d;
cd += os.str();
cd += " ";
}
Foreach(macroFile,variableName,cd);
+11 -15
View File
@@ -21,17 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UImessenger.cc,v 1.5 2003/06/16 16:55:46 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UImessenger.cc,v 1.6 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UImessenger.hh"
#include "G4UImanager.hh"
#include "G4UIcommand.hh"
#include <string.h>
#include "G4ios.hh"
#include <strstream>
#include <sstream>
G4UImessenger::G4UImessenger() { }
@@ -53,18 +51,16 @@ G4bool G4UImessenger::operator == (const G4UImessenger& messenger) const {
G4String G4UImessenger::ItoS(G4int i)
{
char defVal[20];
std::ostrstream os(defVal,20);
os << i << '\0';
return G4String(defVal);
std::ostringstream os;
os << i;
return G4String(os.str());
}
G4String G4UImessenger::DtoS(G4double a)
{
char defVal[40];
std::ostrstream os(defVal,40);
os << a << '\0';
return G4String(defVal);
std::ostringstream os;
os << a;
return G4String(os.str());
}
G4String G4UImessenger::BtoS(G4bool b)
@@ -78,7 +74,7 @@ G4int G4UImessenger::StoI(G4String s)
{
G4int vl;
const char* t = s;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> vl;
return vl;
}
@@ -87,7 +83,7 @@ G4double G4UImessenger::StoD(G4String s)
{
G4double vl;
const char* t = s;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> vl;
return vl;
}
+13 -14
View File
@@ -21,16 +21,17 @@
// ********************************************************************
//
//
// $Id: G4UIparameter.cc,v 1.12 2003/06/16 16:55:47 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIparameter.cc,v 1.13 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIparameter.hh"
#include "G4UIcommandStatus.hh"
#include "G4Tokenizer.hh"
#include "G4ios.hh"
#include <sstream>
G4UIparameter::G4UIparameter():paramERR(0)
{
G4String nullString;
@@ -108,18 +109,16 @@ void G4UIparameter::List()
void G4UIparameter::SetDefaultValue(G4int theDefaultValue)
{
char defVal[20];
std::ostrstream os(defVal,20);
os << theDefaultValue << '\0';
defaultValue = defVal;
std::ostringstream os;
os << theDefaultValue;
defaultValue = os.str();
}
void G4UIparameter::SetDefaultValue(G4double theDefaultValue)
{
char defVal[20];
std::ostrstream os(defVal,20);
os << theDefaultValue << '\0';
defaultValue = defVal;
std::ostringstream os;
os << theDefaultValue;
defaultValue = os.str();
}
@@ -158,7 +157,7 @@ G4int G4UIparameter::
RangeCheck(const char* newValue) {
yystype result;
bp = 0; // reset buffer pointer for G4UIpGetc()
std::istrstream is((char*)newValue);
std::istringstream is(newValue);
char type = toupper( parameterType );
switch (type) {
case 'D': { is >> newVal.D; } break;
@@ -674,7 +673,7 @@ Yylex() // reads input and returns token number KR486
c=='e' || c=='E' || c=='+' || c=='-');
G4UIpUngetc(c);
const char* t = buf;
std::istrstream is((char*)t);
std::istringstream is(t);
if ( IsInt(buf.data(),20) ) {
is >> yylval.I;
return CONSTINT;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIsession.cc,v 1.6 2003/06/16 16:55:48 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ---------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UnitsMessenger.cc,v 1.6 2005/05/03 17:30:29 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VGlobalFastSimulationManager.cc,v 1.4 2002/11/20 14:46:01 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Abstract interface for GEANT4 Global Fast Simulation Manager.
-45
View File
@@ -1,45 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VVisManager.cc,v 1.5 2002/11/20 14:46:01 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
//
// Abstract interface for GEANT4 Visualization Manager.
// John Allison 19/Oct/1996.
#include "G4VVisManager.hh"
G4VVisManager::~G4VVisManager () {}
G4VVisManager* G4VVisManager::fpConcreteInstance = 0;
G4VVisManager* G4VVisManager::GetConcreteInstance ()
{
return fpConcreteInstance;
}
void G4VVisManager::SetConcreteInstance (G4VVisManager* m)
{
fpConcreteInstance = m;
}