Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4DataVector.cc,v 1.6 2003/06/06 16:17:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
+39 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Exception.cc,v 1.16 2003/06/06 16:17:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4Exception.cc,v 1.17 2003/10/31 17:44:47 asaim Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ----------------------------------------------------------------------
@@ -59,9 +59,44 @@ void G4Exception(const char* originOfException,
G4ExceptionSeverity severity,
const char* description)
{
G4bool toBeAborted =
G4StateManager::GetStateManager()->GetExceptionHandler()
G4VExceptionHandler* exceptionHandler
= G4StateManager::GetStateManager()->GetExceptionHandler();
G4bool toBeAborted = true;
if(exceptionHandler)
{
toBeAborted = exceptionHandler
->Notify(originOfException,exceptionCode,severity,description);
}
else
{
G4cerr << G4endl
<< "*** ExceptionHandler is not defined ***" << G4endl;
G4cerr << G4endl;
G4cerr << "*** G4Exception : " << exceptionCode << G4endl;
G4cerr << " issued by : " << originOfException << G4endl;
G4cerr << description << G4endl;
G4cerr << G4endl << "Severity : ";
switch(severity)
{
case FatalException:
G4cerr << "*** Fatal Exception ***";
break;
case FatalErrorInArgument:
G4cerr << "*** Fatal Error In Argument ***";
break;
case RunMustBeAborted:
G4cerr << "*** Run Must Be Aborted ***";
break;
case EventMustBeAborted:
G4cerr << "*** Event Must Be Aborted ***";
break;
default:
G4cerr << "*** This is just a warning message. ***";
toBeAborted = false;
break;
}
G4cerr << G4endl;
}
if(toBeAborted)
{
if(G4StateManager::GetStateManager()->SetNewState(G4State_Abort)) {
@@ -22,7 +22,7 @@
//
//
// $Id: G4LPhysicsFreeVector.cc,v 1.8 2001/07/11 10:00:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4OrderedTable.cc,v 1.3 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsFreeVector.cc,v 1.8 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
//--------------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsLinearVector.cc,v 1.10 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
//--------------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsLnVector.cc,v 1.12 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsLogVector.cc,v 1.10 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsOrderedFreeVector.cc,v 1.8 2001/07/11 10:00:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
////////////////////////////////////////////////////////////////////////
// PhysicsOrderedFreeVector Class Implementation
+17 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsTable.cc,v 1.8 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4PhysicsTable.cc,v 1.10 2003/11/04 12:17:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -119,12 +119,26 @@ G4bool G4PhysicsTable::StorePhysicsTable(const G4String& fileName,
}
G4bool G4PhysicsTable::ExistPhysicsTable(const G4String& fileName) const
{
std::ifstream fIn;
G4bool value=true;
// open input file
fIn.open(fileName,std::ios::in);
// check if the file has been opened successfully
if (!fIn) {
value = false;
}
fIn.close();
return value;
}
G4bool G4PhysicsTable::RetrievePhysicsTable(const G4String& fileName,
G4bool ascii)
{
std::ifstream fIn;
// open input file //
// open input file
if (ascii)
fIn.open(fileName,std::ios::in|std::ios::binary);
else
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicsVector.cc,v 1.15 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4StateManager.cc,v 1.9 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4StateManager.cc,v 1.10 2003/10/31 17:44:47 asaim Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -42,7 +42,8 @@ G4StateManager::G4StateManager()
thePreviousState(G4State_PreInit),
theBottomDependent(0),
suppressAbortion(0),
msgptr(0)
msgptr(0),
exceptionHandler(0)
{
}
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Timer.cc,v 1.11 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ----------------------------------------------------------------------
+17 -9
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UnitsTable.cc,v 1.18 2003/06/06 16:17:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4UnitsTable.cc,v 1.20 2003/11/24 11:34:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//
@@ -32,7 +32,7 @@
// 01-03-01: parsec, M.Maire
// 06-03-01: migration to STL vectors, G.Cosmo
// 06-05-02: BestUnit operator<< flux instead of G4cout (mma)
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -69,7 +69,12 @@ G4UnitDefinition::G4UnitDefinition(G4String name, G4String symbol,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4UnitDefinition::~G4UnitDefinition()
{}
{
for (size_t i=0;i<theUnitsTable.size();i++)
{
delete theUnitsTable[i];
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -174,6 +179,7 @@ void G4UnitDefinition::BuildUnitsTable()
new G4UnitDefinition( "meter","m" ,"Length",meter);
new G4UnitDefinition("centimeter","cm" ,"Length",centimeter);
new G4UnitDefinition("millimeter","mm" ,"Length",millimeter);
// new G4UnitDefinition("micrometer","um" ,"Length",micrometer);
new G4UnitDefinition("micrometer","mum" ,"Length",micrometer);
new G4UnitDefinition( "nanometer","nm" ,"Length",nanometer);
new G4UnitDefinition( "angstrom","Ang" ,"Length",angstrom);
@@ -287,27 +293,29 @@ void G4UnitDefinition::PrintUnitsTable()
{
G4cout << "\n ----- The Table of Units ----- \n";
for(size_t i=0;i<theUnitsTable.size();i++)
theUnitsTable[i]->PrintCategory();
{
theUnitsTable[i]->PrintCategory();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4UnitsCategory::G4UnitsCategory(G4String name)
:Name(name),NameMxLen(0),SymbMxLen(0)
:Name(name),UnitsList(),NameMxLen(0),SymbMxLen(0)
{
UnitsList = *(new G4UnitsContainer);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4UnitsCategory::~G4UnitsCategory()
{}
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4UnitsCategory::G4UnitsCategory(G4UnitsCategory& right)
{
*this = right;
*this = right;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -22,7 +22,7 @@
//
//
// $Id: G4VExceptionHandler.cc,v 1.1 2002/08/19 18:20:12 asaim Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VStateDependent.cc,v 1.3 2001/07/11 10:00:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4ios.cc,v 1.6 2003/06/06 16:17:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------