Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
+10 -10
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DataVector.cc,v 1.5 2002/05/30 11:56:40 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4DataVector.cc,v 1.6 2003/06/06 16:17:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,20 +35,20 @@
// --------------------------------------------------------------
#include "G4DataVector.hh"
#include "g4std/iomanip"
#include <iomanip>
G4DataVector::G4DataVector()
: G4std::vector<G4double>()
: std::vector<G4double>()
{
}
G4DataVector::G4DataVector(size_t capacity)
: G4std::vector<G4double>(capacity, 0.0)
: std::vector<G4double>(capacity, 0.0)
{
}
G4DataVector::G4DataVector(size_t capacity, G4double value)
: G4std::vector<G4double>(capacity, value)
: std::vector<G4double>(capacity, value)
{
}
@@ -56,7 +56,7 @@ G4DataVector::~G4DataVector()
{
}
G4bool G4DataVector::Store(G4std::ofstream& fOut, G4bool ascii)
G4bool G4DataVector::Store(std::ofstream& fOut, G4bool ascii)
{
// Ascii mode
if (ascii) {
@@ -79,7 +79,7 @@ G4bool G4DataVector::Store(G4std::ofstream& fOut, G4bool ascii)
return true;
}
G4bool G4DataVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
G4bool G4DataVector::Retrieve(std::ifstream& fIn, G4bool ascii)
{
clear();
size_t sizeV;
@@ -118,12 +118,12 @@ G4bool G4DataVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
return true;
}
G4std::ostream& operator<<(G4std::ostream& out, const G4DataVector& pv)
std::ostream& operator<<(std::ostream& out, const G4DataVector& pv)
{
size_t i;
out << pv.size() << G4endl;
for(i = 0; i < pv.size(); i++) {
out << G4std::setprecision(12) << pv[i] << G4endl;
out << std::setprecision(12) << pv[i] << G4endl;
}
return out;
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Exception.cc,v 1.15 2002/12/05 02:32:21 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4Exception.cc,v 1.16 2003/06/06 16:17:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ----------------------------------------------------------------------
@@ -74,7 +74,7 @@ void G4Exception(const char* originOfException,
}
}
void G4Exception(G4std::string s)
void G4Exception(std::string s)
{
G4Exception(s.c_str());
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4LPhysicsFreeVector.cc,v 1.8 2001/07/11 10:00:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------------
+16 -20
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OrderedTable.cc,v 1.2 2002/04/19 07:10:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OrderedTable.cc,v 1.3 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -34,18 +34,18 @@
#include "G4DataVector.hh"
#include "G4OrderedTable.hh"
#include "g4std/iostream"
#include "g4std/fstream"
#include "g4std/iomanip"
#include <iostream>
#include <fstream>
#include <iomanip>
G4OrderedTable::G4OrderedTable()
: G4std::vector<G4DataVector*>()
: std::vector<G4DataVector*>()
{
}
G4OrderedTable::G4OrderedTable(size_t capacity)
: G4std::vector<G4DataVector*>(capacity, (G4DataVector*)(0) )
: std::vector<G4DataVector*>(capacity, (G4DataVector*)(0) )
{
}
@@ -56,15 +56,13 @@ G4OrderedTable::~G4OrderedTable()
G4bool G4OrderedTable::Store(const G4String& fileName,
G4bool ascii)
{
G4std::ofstream fOut;
std::ofstream fOut;
// open output file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii)
fOut.open(fileName, G4std::ios::out|G4std::ios::binary);
fOut.open(fileName, std::ios::out|std::ios::binary);
else
#endif
fOut.open(fileName, G4std::ios::out);
fOut.open(fileName, std::ios::out);
// check if the file has been opened successfully
if (!fOut) {
@@ -104,14 +102,12 @@ G4bool G4OrderedTable::Store(const G4String& fileName,
G4bool G4OrderedTable::Retrieve(const G4String& fileName,
G4bool ascii)
{
G4std::ifstream fIn;
std::ifstream fIn;
// open input file //
#ifdef G4USE_STD_NAMESPACE
if (ascii)
fIn.open(fileName,G4std::ios::in|G4std::ios::binary);
fIn.open(fileName,std::ios::in|std::ios::binary);
else
#endif
fIn.open(fileName,G4std::ios::in);
fIn.open(fileName,std::ios::in);
// check if the file has been opened successfully
if (!fIn) {
@@ -172,14 +168,14 @@ G4bool G4OrderedTable::Retrieve(const G4String& fileName,
return true;
}
G4std::ostream& operator<<(G4std::ostream& out,
G4OrderedTable& right)
std::ostream& operator<<(std::ostream& out,
G4OrderedTable& right)
{
// Printout Data Vector
G4OrderedTableIterator itr;
size_t i=0;
for (itr=right.begin(); itr!=right.end(); ++itr) {
out << G4std::setw(8) << i << "-th Vector ";
out << std::setw(8) << i << "-th Vector ";
out << ": Type " << G4DataVector::T_G4DataVector << G4endl;
out << *(*itr);
i +=1;
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsFreeVector.cc,v 1.8 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//--------------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsLinearVector.cc,v 1.9 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4PhysicsLinearVector.cc,v 1.10 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//--------------------------------------------------------------------
@@ -107,7 +107,7 @@ G4PhysicsLinearVector::G4PhysicsLinearVector(G4double theEmin,
G4PhysicsLinearVector::~G4PhysicsLinearVector(){}
G4bool G4PhysicsLinearVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
G4bool G4PhysicsLinearVector::Retrieve(std::ifstream& fIn, G4bool ascii)
{
G4bool success = G4PhysicsVector::Retrieve(fIn, ascii);
if (success){
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsLnVector.cc,v 1.11 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4PhysicsLnVector.cc,v 1.12 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -103,7 +103,7 @@ G4PhysicsLnVector::G4PhysicsLnVector(G4double theEmin,
G4PhysicsLnVector::~G4PhysicsLnVector(){}
G4bool G4PhysicsLnVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
G4bool G4PhysicsLnVector::Retrieve(std::ifstream& fIn, G4bool ascii)
{
G4bool success = G4PhysicsVector::Retrieve(fIn, ascii);
if (success){
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsLogVector.cc,v 1.9 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4PhysicsLogVector.cc,v 1.10 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -107,7 +107,7 @@ G4PhysicsLogVector::G4PhysicsLogVector(G4double theEmin,
G4PhysicsLogVector::~G4PhysicsLogVector(){}
G4bool G4PhysicsLogVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
G4bool G4PhysicsLogVector::Retrieve(std::ifstream& fIn, G4bool ascii)
{
G4bool success = G4PhysicsVector::Retrieve(fIn, ascii);
if (success){
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsOrderedFreeVector.cc,v 1.8 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
////////////////////////////////////////////////////////////////////////
// PhysicsOrderedFreeVector Class Implementation
+14 -18
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsTable.cc,v 1.7 2003/03/25 14:56:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4PhysicsTable.cc,v 1.8 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -34,9 +34,9 @@
#include "G4PhysicsVector.hh"
#include "G4PhysicsTable.hh"
#include "g4std/iostream"
#include "g4std/fstream"
#include "g4std/iomanip"
#include <iostream>
#include <fstream>
#include <iomanip>
G4PhysicsTable::G4PhysicsTable()
: G4PhysCollection()
@@ -77,15 +77,13 @@ G4PhysicsTable::~G4PhysicsTable()
G4bool G4PhysicsTable::StorePhysicsTable(const G4String& fileName,
G4bool ascii)
{
G4std::ofstream fOut;
std::ofstream fOut;
// open output file //
#ifdef G4USE_STD_NAMESPACE
if (!ascii)
fOut.open(fileName, G4std::ios::out|G4std::ios::binary);
fOut.open(fileName, std::ios::out|std::ios::binary);
else
#endif
fOut.open(fileName, G4std::ios::out);
fOut.open(fileName, std::ios::out);
// check if the file has been opened successfully
if (!fOut) {
@@ -125,14 +123,12 @@ G4bool G4PhysicsTable::StorePhysicsTable(const G4String& fileName,
G4bool G4PhysicsTable::RetrievePhysicsTable(const G4String& fileName,
G4bool ascii)
{
G4std::ifstream fIn;
std::ifstream fIn;
// open input file //
#ifdef G4USE_STD_NAMESPACE
if (ascii)
fIn.open(fileName,G4std::ios::in|G4std::ios::binary);
fIn.open(fileName,std::ios::in|std::ios::binary);
else
#endif
fIn.open(fileName,G4std::ios::in);
fIn.open(fileName,std::ios::in);
// check if the file has been opened successfully
if (!fIn) {
@@ -192,14 +188,14 @@ G4bool G4PhysicsTable::RetrievePhysicsTable(const G4String& fileName,
return true;
}
G4std::ostream& operator<<(G4std::ostream& out,
G4PhysicsTable& right)
std::ostream& operator<<(std::ostream& out,
G4PhysicsTable& right)
{
// Printout Physics Vector
G4PhysicsTableIterator itr;
size_t i=0;
for (itr=right.begin(); itr!=right.end(); ++itr) {
out << G4std::setw(8) << i << "-th Vector ";
out << std::setw(8) << i << "-th Vector ";
out << ": Type " << G4int((*itr)->GetType()) << G4endl;
out << *(*itr);
i +=1;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsVector.cc,v 1.14 2001/11/29 18:59:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4PhysicsVector.cc,v 1.15 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -41,7 +41,7 @@
// --------------------------------------------------------------
#include "G4PhysicsVector.hh"
#include "g4std/iomanip"
#include <iomanip>
G4PhysicsVector::G4PhysicsVector()
: edgeMin(0.), edgeMax(0.), numberOfBin(0),
@@ -96,7 +96,7 @@ G4double G4PhysicsVector::GetLowEdgeEnergy(size_t binNumber) const
return binVector[binNumber];
}
G4bool G4PhysicsVector::Store(G4std::ofstream& fOut, G4bool ascii)
G4bool G4PhysicsVector::Store(std::ofstream& fOut, G4bool ascii)
{
// Ascii mode
if (ascii) {
@@ -125,7 +125,7 @@ G4bool G4PhysicsVector::Store(G4std::ofstream& fOut, G4bool ascii)
return true;
}
G4bool G4PhysicsVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
G4bool G4PhysicsVector::Retrieve(std::ifstream& fIn, G4bool ascii)
{
// clear properties;
lastEnergy=0.;
@@ -184,17 +184,18 @@ G4bool G4PhysicsVector::Retrieve(G4std::ifstream& fIn, G4bool ascii)
return true;
}
G4std::ostream& operator<<(G4std::ostream& out, const G4PhysicsVector& pv)
std::ostream& operator<<(std::ostream& out, const G4PhysicsVector& pv)
{
// binning
out << G4std::setprecision(12) << pv.edgeMin;
out << std::setprecision(12) << pv.edgeMin;
out <<" " << pv.edgeMax <<" " << pv.numberOfBin << G4endl;
// contents
size_t i;
out << pv.dataVector.size() << G4endl;
for(i = 0; i < pv.dataVector.size(); i++) {
out << G4std::setprecision(12) << pv.binVector[i] <<" " << pv.dataVector[i] << G4endl;
out << std::setprecision(12) << pv.binVector[i] << " "
<< pv.dataVector[i] << G4endl;
}
return out;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4StateManager.cc,v 1.8 2002/12/05 02:32:21 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4StateManager.cc,v 1.9 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -54,7 +54,7 @@ G4StateManager::~G4StateManager()
{
state = theDependentsList.back();
theDependentsList.pop_back();
for (G4std::vector<G4VStateDependent*>::iterator
for (std::vector<G4VStateDependent*>::iterator
i=theDependentsList.begin(); i!=theDependentsList.end(); i++)
{
if (*i==state)
@@ -134,7 +134,7 @@ G4bool
G4StateManager::DeregisterDependent(G4VStateDependent* aDependent)
{
G4VStateDependent* tmp = 0;
G4std::vector<G4VStateDependent*>::iterator i;
std::vector<G4VStateDependent*>::iterator i;
for (i=theDependentsList.begin(); i!=theDependentsList.end(); i++)
{
if (**i==*aDependent)
@@ -198,7 +198,7 @@ G4VStateDependent*
G4StateManager::RemoveDependent(const G4VStateDependent* aDependent)
{
G4VStateDependent* tmp = 0;
G4std::vector<G4VStateDependent*>::iterator i;
std::vector<G4VStateDependent*>::iterator i;
for (i=theDependentsList.begin(); i!=theDependentsList.end(); i++)
{
if (**i==*aDependent)
+4 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Timer.cc,v 1.10 2002/01/17 10:49:02 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4Timer.cc,v 1.11 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ----------------------------------------------------------------------
@@ -77,8 +77,8 @@ void G4Exception(const char* s=0);
}
#endif /* WIN32 */
// Print timer status n G4std::ostream
G4std::ostream& operator << (G4std::ostream& os, const G4Timer& t)
// Print timer status n std::ostream
std::ostream& operator << (std::ostream& os, const G4Timer& t)
{
if (t.IsValid())
{
+10 -14
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UnitsTable.cc,v 1.17 2002/11/20 11:25:15 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UnitsTable.cc,v 1.18 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//
@@ -39,7 +39,7 @@
#include "G4UnitsTable.hh"
#include "g4std/iomanip"
#include <iomanip>
G4UnitsTable G4UnitDefinition::theUnitsTable;
@@ -160,8 +160,8 @@ void G4UnitDefinition::PrintDefinition()
{
G4int nameL = theUnitsTable[CategoryIndex]->GetNameMxLen();
G4int symbL = theUnitsTable[CategoryIndex]->GetSymbMxLen();
G4cout << G4std::setw(nameL) << Name << " ("
<< G4std::setw(symbL) << SymbolName << ") = " << Value << G4endl;
G4cout << std::setw(nameL) << Name << " ("
<< std::setw(symbL) << SymbolName << ") = " << Value << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -397,7 +397,7 @@ G4BestUnit::~G4BestUnit()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4std::ostream& operator<<(G4std::ostream& flux, G4BestUnit a)
std::ostream& operator<<(std::ostream& flux, G4BestUnit a)
{
G4UnitsTable& theUnitsTable = G4UnitDefinition::GetUnitsTable();
G4UnitsContainer& List = theUnitsTable[a.IndexOfCategory]
@@ -409,7 +409,7 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4BestUnit a)
G4double rsup(DBL_MAX), rinf(0.);
//for a ThreeVector, choose the best unit for the biggest value
G4double value = G4std::max(G4std::max(fabs(a.Value[0]),fabs(a.Value[1])),
G4double value = std::max(std::max(fabs(a.Value[0]),fabs(a.Value[1])),
fabs(a.Value[2]));
for (size_t k=0; k<List.size(); k++)
@@ -429,14 +429,10 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4BestUnit a)
for (G4int j=0; j<a.nbOfVals; j++)
{flux << a.Value[j]/(List[index]->GetValue()) << " ";}
#ifdef G4USE_STD_NAMESPACE
std::ios::fmtflags oldform = flux.flags();
#else
G4long oldform = flux.flags();
#endif
std::ios::fmtflags oldform = flux.flags();
flux.setf(G4std::ios::left,G4std::ios::adjustfield);
flux << G4std::setw(len) << List[index]->GetSymbol();
flux.setf(std::ios::left,std::ios::adjustfield);
flux << std::setw(len) << List[index]->GetSymbol();
flux.flags(oldform);
return flux;
@@ -22,7 +22,7 @@
//
//
// $Id: G4VExceptionHandler.cc,v 1.1 2002/08/19 18:20:12 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VStateDependent.cc,v 1.3 2001/07/11 10:00:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
+4 -6
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ios.cc,v 1.5 2001/07/11 10:00:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ios.cc,v 1.6 2003/06/06 16:17:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -33,14 +33,12 @@
// History 1998 Nov. 3 Masayasu Nagamatu
#include "G4ios.hh"
#include "G4strstreambuf.hh"
G4strstreambuf G4coutbuf;
G4strstreambuf G4cerrbuf;
G4std::ostream G4cout(&G4coutbuf);
G4std::ostream G4cerr(&G4cerrbuf);
std::ostream G4cout(&G4coutbuf);
std::ostream G4cerr(&G4cerrbuf);