Import Geant4 3.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:03:00 +02:00
parent cfcb558cfe
commit 137e303ecc
2843 changed files with 37082 additions and 38426 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIbatch.cc,v 1.2 1999/12/15 14:50:40 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#include "G4UIbatch.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWith3Vector.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWith3VectorAndUnit.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithABool.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithADouble.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithADoubleAndUnit.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithAString.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithAnInteger.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithoutParameter.cc,v 1.2 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+49 -48
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UIcommand.cc,v 1.5 1999/12/15 14:50:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4UIcommand.cc,v 1.7 2001/03/08 17:00:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -39,11 +39,11 @@ G4UIcommand::G4UIcommand(const char * theCommandPath,
G4UIcommandCommonConstructorCode (comStr);
G4String nullString;
availabelStateList.clear();
availabelStateList.insert(PreInit);
availabelStateList.insert(Init);
availabelStateList.insert(Idle);
availabelStateList.insert(GeomClosed);
availabelStateList.insert(EventProc);
availabelStateList.push_back(PreInit);
availabelStateList.push_back(Init);
availabelStateList.push_back(Idle);
availabelStateList.push_back(GeomClosed);
availabelStateList.push_back(EventProc);
}
void G4UIcommand::G4UIcommandCommonConstructorCode
@@ -62,9 +62,10 @@ G4UIcommand::~G4UIcommand()
G4UImanager* fUImanager = G4UImanager::GetUIpointer();
if(fUImanager) fUImanager->RemoveCommand(this);
int n_parameterEntry = parameter.entries();
int n_parameterEntry = parameter.size();
for( int i_thParameter=0; i_thParameter < n_parameterEntry; i_thParameter++ )
{ delete parameter[i_thParameter]; }
parameter.clear();
}
int G4UIcommand::operator==(const G4UIcommand &right) const
@@ -80,7 +81,7 @@ int G4UIcommand::operator!=(const G4UIcommand &right) const
G4int G4UIcommand::DoIt(G4String parameterList)
{
G4String correctParameters;
int n_parameterEntry = parameter.entries();
int n_parameterEntry = parameter.size();
if( n_parameterEntry != 0 )
{
G4String aToken;
@@ -160,15 +161,15 @@ G4String G4UIcommand::GetCurrentValue()
void G4UIcommand::AvailableForStates(G4ApplicationState s1)
{
availabelStateList.clear();
availabelStateList.insert(s1);
availabelStateList.push_back(s1);
}
void G4UIcommand::AvailableForStates(G4ApplicationState s1,
G4ApplicationState s2)
{
availabelStateList.clear();
availabelStateList.insert(s1);
availabelStateList.insert(s2);
availabelStateList.push_back(s1);
availabelStateList.push_back(s2);
}
void G4UIcommand::AvailableForStates(G4ApplicationState s1,
@@ -176,9 +177,9 @@ void G4UIcommand::AvailableForStates(G4ApplicationState s1,
G4ApplicationState s3)
{
availabelStateList.clear();
availabelStateList.insert(s1);
availabelStateList.insert(s2);
availabelStateList.insert(s3);
availabelStateList.push_back(s1);
availabelStateList.push_back(s2);
availabelStateList.push_back(s3);
}
void G4UIcommand::AvailableForStates(G4ApplicationState s1,
@@ -187,10 +188,10 @@ void G4UIcommand::AvailableForStates(G4ApplicationState s1,
G4ApplicationState s4)
{
availabelStateList.clear();
availabelStateList.insert(s1);
availabelStateList.insert(s2);
availabelStateList.insert(s3);
availabelStateList.insert(s4);
availabelStateList.push_back(s1);
availabelStateList.push_back(s2);
availabelStateList.push_back(s3);
availabelStateList.push_back(s4);
}
void G4UIcommand::AvailableForStates(G4ApplicationState s1,
@@ -200,11 +201,11 @@ void G4UIcommand::AvailableForStates(G4ApplicationState s1,
G4ApplicationState s5)
{
availabelStateList.clear();
availabelStateList.insert(s1);
availabelStateList.insert(s2);
availabelStateList.insert(s3);
availabelStateList.insert(s4);
availabelStateList.insert(s5);
availabelStateList.push_back(s1);
availabelStateList.push_back(s2);
availabelStateList.push_back(s3);
availabelStateList.push_back(s4);
availabelStateList.push_back(s5);
}
G4bool G4UIcommand::IsAvailable()
@@ -213,7 +214,7 @@ G4bool G4UIcommand::IsAvailable()
G4ApplicationState currentState
= G4StateManager::GetStateManager()->GetCurrentState();
int nState = availabelStateList.entries();
int nState = availabelStateList.size();
for(int i=0;i<nState;i++)
{
if(availabelStateList[i]==currentState)
@@ -243,16 +244,16 @@ G4String G4UIcommand::UnitsList(G4String unitCategory)
G4String retStr;
G4UnitsTable& UTbl = G4UnitDefinition::GetUnitsTable();
G4int i;
for(i=0;i<UTbl.entries();i++)
for(i=0;i<UTbl.size();i++)
{ if(UTbl[i]->GetName()==unitCategory) break; }
if(i==UTbl.entries())
if(i==UTbl.size())
{
G4cerr << "Unit category <" << unitCategory << "> is not defined." << G4endl;
return retStr;
}
G4UnitsContainer& UCnt = UTbl[i]->GetUnitsList();
retStr = UCnt[0]->GetSymbol();
G4int je = UCnt.entries();
G4int je = UCnt.size();
for(int j=1;j<je;j++)
{
retStr += " ";
@@ -273,12 +274,12 @@ void G4UIcommand::List()
if(commandPath(commandPath.length()-1)!='/')
{ G4cout << "Command " << commandPath << G4endl; }
G4cout << "Guidance :" << G4endl;
int n_guidanceEntry = commandGuidance.entries();
int n_guidanceEntry = commandGuidance.size();
for( int i_thGuidance=0; i_thGuidance < n_guidanceEntry; i_thGuidance++ )
{ G4cout << commandGuidance[i_thGuidance] << G4endl; }
if( ! rangeString.isNull() )
{ G4cout << " Range of parameters : " << rangeString << G4endl; }
int n_parameterEntry = parameter.entries();
int n_parameterEntry = parameter.size();
if( n_parameterEntry > 0 )
{
for( int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ )
@@ -315,9 +316,9 @@ TypeCheck(G4String newValues)
char type;
const char* t = newValues;
G4std::istrstream is((char*)t);
for (unsigned i=0; i< parameter.entries(); i++) {
for (unsigned i=0; i< parameter.size(); i++) {
is >> aNewValue;
type = toupper(parameter(i)->GetParameterType());
type = toupper(parameter[i]->GetParameterType());
switch ( type ) {
case 'D':
if( IsDouble(aNewValue)==0 ){
@@ -450,11 +451,11 @@ RangeCheck(G4String newValue) {
bp = 0; // reset buffer pointer for G4UIpGetc()
const char* t = newValue;
G4std::istrstream is((char*)t);
for (unsigned i=0; i< parameter.entries(); i++) {
type= toupper(parameter(i)->GetParameterType());
for (unsigned i=0; i< parameter.size(); i++) {
type= toupper(parameter[i]->GetParameterType());
switch ( type ) {
case 'D': is >> newVal(i).D; break;
case 'I': is >> newVal(i).I; break;
case 'D': is >> newVal[i].D; break;
case 'I': is >> newVal[i].I; break;
case 'S':
case 'B':
default: ;
@@ -728,11 +729,11 @@ Eval2(yystype arg1, int op, yystype arg2)
if( arg1.type == IDENTIFIER) {
unsigned i = IndexOf( arg1.S );
newValtype = toupper(parameter(i)->GetParameterType());
newValtype = toupper(parameter[i]->GetParameterType());
switch ( newValtype ) {
case 'I':
if( arg2.type == CONSTINT ) {
return CompareInt( newVal(i).I, op, arg2.I );
return CompareInt( newVal[i].I, op, arg2.I );
} else {
G4cerr << "integer operand expected for "
<< rangeString
@@ -740,21 +741,21 @@ Eval2(yystype arg1, int op, yystype arg2)
} break;
case 'D':
if( arg2.type == CONSTDOUBLE ) {
return CompareDouble( newVal(i).D, op, arg2.D );
return CompareDouble( newVal[i].D, op, arg2.D );
} else
if ( arg2.type == CONSTINT ) { // integral promotion
return CompareDouble( newVal(i).D, op, arg2.I );
return CompareDouble( newVal[i].D, op, arg2.I );
} break;
default: ;
}
}
if( arg2.type == IDENTIFIER) {
unsigned i = IndexOf( arg2.S );
newValtype = toupper(parameter(i)->GetParameterType());
newValtype = toupper(parameter[i]->GetParameterType());
switch ( newValtype ) {
case 'I':
if( arg1.type == CONSTINT ) {
return CompareInt( arg1.I, op, newVal(i).I );
return CompareInt( arg1.I, op, newVal[i].I );
} else {
G4cerr << "integer operand expected for "
<< rangeString
@@ -762,10 +763,10 @@ Eval2(yystype arg1, int op, yystype arg2)
} break;
case 'D':
if( arg1.type == CONSTDOUBLE ) {
return CompareDouble( arg1.D, op, newVal(i).D );
return CompareDouble( arg1.D, op, newVal[i].D );
} else
if ( arg1.type == CONSTINT ) { // integral promotion
return CompareDouble( arg1.I, op, newVal(i).D );
return CompareDouble( arg1.I, op, newVal[i].D );
} break;
default: ;
}
@@ -829,9 +830,9 @@ IndexOf( G4String nam)
{
unsigned i;
G4String pname;
for( i=0; i<parameter.entries(); i++)
for( i=0; i<parameter.size(); i++)
{
pname = parameter(i)-> GetParameterName();
pname = parameter[i]-> GetParameterName();
if( pname == nam ) {
return i;
}
@@ -846,9 +847,9 @@ unsigned G4UIcommand::
IsParameter(G4String nam)
{
G4String pname;
for(unsigned i=0; i<parameter.entries(); i++)
for(unsigned i=0; i<parameter.size(); i++)
{
pname = parameter(i)-> GetParameterName();
pname = parameter[i]-> GetParameterName();
if( pname == nam ) return 1;
}
return 0;
+19 -19
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UIcommandTree.cc,v 1.4 2000/02/14 12:24:42 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4UIcommandTree.cc,v 1.5 2001/02/08 06:07:20 asaim Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
#include "G4UIcommandTree.hh"
@@ -31,7 +31,7 @@ G4UIcommandTree::G4UIcommandTree(const char * thePathName)
G4UIcommandTree::~G4UIcommandTree()
{
int i;
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( i=0; i < n_treeEntry; i++ )
{ delete tree[i]; }
}
@@ -60,13 +60,13 @@ void G4UIcommandTree::AddNewCommand(G4UIcommand *newCommand)
if( i == G4std::string::npos )
{
// Find command
int n_commandEntry = command.entries();
int n_commandEntry = command.size();
for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
{
if( remainingPath == command[i_thCommand]->GetCommandName() )
{ return; }
}
command.insert( newCommand );
command.push_back( newCommand );
return;
}
else
@@ -74,7 +74,7 @@ void G4UIcommandTree::AddNewCommand(G4UIcommand *newCommand)
// Find path
G4String nextPath = pathName;
nextPath.append(remainingPath(0,i+1));
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
{
if( nextPath == tree[i_thTree]->GetPathName() )
@@ -84,7 +84,7 @@ void G4UIcommandTree::AddNewCommand(G4UIcommand *newCommand)
}
}
G4UIcommandTree * newTree = new G4UIcommandTree( nextPath );
tree.insert( newTree );
tree.push_back( newTree );
newTree->AddNewCommand( newCommand );
return;
}
@@ -105,12 +105,12 @@ void G4UIcommandTree::RemoveCommand(G4UIcommand *aCommand)
if( i == G4std::string::npos )
{
// Find command
int n_commandEntry = command.entries();
int n_commandEntry = command.size();
for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
{
if( remainingPath == command[i_thCommand]->GetCommandName() )
{
command.remove(command[i_thCommand]);
command.erase(command.begin()+i_thCommand);
break;
}
}
@@ -120,7 +120,7 @@ void G4UIcommandTree::RemoveCommand(G4UIcommand *aCommand)
// Find path
G4String nextPath = pathName;
nextPath.append(remainingPath(0,i+1));
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
{
if( nextPath == tree[i_thTree]->GetPathName() )
@@ -130,7 +130,7 @@ void G4UIcommandTree::RemoveCommand(G4UIcommand *aCommand)
if(n_commandRemain==0)
{
G4UIcommandTree * emptyTree = tree[i_thTree];
tree.remove(tree[i_thTree]);
tree.erase(tree.begin()+i_thTree);
delete emptyTree;
}
break;
@@ -150,7 +150,7 @@ G4UIcommand * G4UIcommandTree::FindPath(G4String commandPath)
if( i == G4std::string::npos )
{
// Find command
int n_commandEntry = command.entries();
int n_commandEntry = command.size();
for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
{
if( remainingPath == command[i_thCommand]->GetCommandName() )
@@ -162,7 +162,7 @@ G4UIcommand * G4UIcommandTree::FindPath(G4String commandPath)
// Find path
G4String nextPath = pathName;
nextPath.append(remainingPath(0,i+1));
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
{
if( nextPath == tree[i_thTree]->GetPathName() )
@@ -178,14 +178,14 @@ void G4UIcommandTree::ListCurrent()
if( guidance != NULL ) guidance->List();
int i = 0;
G4cout << " Sub-directories : " << G4endl;
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
{
G4cout << " " << tree[i_thTree]->GetPathName()
<< " " << tree[i_thTree]->GetTitle() << G4endl;
}
G4cout << " Commands : " << G4endl;
int n_commandEntry = command.entries();
int n_commandEntry = command.size();
for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
{
G4cout << " " << command[i_thCommand]->GetCommandName()
@@ -199,7 +199,7 @@ void G4UIcommandTree::ListCurrentWithNum()
if( guidance != NULL ) guidance->List();
int i = 0;
G4cout << " Sub-directories : " << G4endl;
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
{
i++;
@@ -207,7 +207,7 @@ void G4UIcommandTree::ListCurrentWithNum()
<< " " << tree[i_thTree]->GetTitle() << G4endl;
}
G4cout << " Commands : " << G4endl;
int n_commandEntry = command.entries();
int n_commandEntry = command.size();
for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
{
i++;
@@ -219,12 +219,12 @@ void G4UIcommandTree::ListCurrentWithNum()
void G4UIcommandTree::List()
{
ListCurrent();
int n_commandEntry = command.entries();
int n_commandEntry = command.size();
for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
{
command[i_thCommand]->List();
}
int n_treeEntry = tree.entries();
int n_treeEntry = tree.size();
for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
{
tree[i_thTree]->List();
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcontrolMessenger.cc,v 1.2 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#include "G4UIcontrolMessenger.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIdirectory.cc,v 1.2 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UImanager.cc,v 1.6 2000/07/22 10:49:38 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4UImanager.cc,v 1.7 2001/02/08 06:07:20 asaim Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// ---------------------------------------------------------------------
@@ -233,7 +233,7 @@ int G4UImanager::ApplyCommand(G4String aCommand)
{ return fIllegalApplicationState; }
if(saveHistory) historyFile << aCommand << G4endl;
histVec.insert(aCommand);
histVec.push_back(aCommand);
return targetCommand->DoIt( commandParameter );
}
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UImessenger.cc,v 1.2 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#include "G4UImessenger.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIparameter.cc,v 1.4 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#include "G4UIparameter.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIsession.cc,v 1.3 1999/12/15 17:52:03 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// ---------------------------------------------------------------------
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UnitsMessenger.cc,v 1.2 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VGlobalFastSimulationManager.cc,v 1.2 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Abstract interface for GEANT4 Global Fast Simulation Manager.
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VVisManager.cc,v 1.3 1999/12/15 14:50:42 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Abstract interface for GEANT4 Visualization Manager.