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
+16 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.15 2000/07/26 09:26:24 asaim Exp $
$Id: History,v 1.17 2001/03/08 17:00:46 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,21 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Mar 8, 2001, G.Cosmo (intercoms-V03-00-02)
- G4UIcommand.cc: replaced calls to entries() with size(), according
to migration to STL vectors for G4UnitsTable and related in tag
"global-V03-00-07".
Feb 8, 2001, M.Asai (intercoms-V03-00-01)
- Migration to STL vector classes
affected classes :
./intercoms/include/G4UIcommand.hh
./intercoms/include/G4UIcommandTree.hh
./intercoms/include/G4UImanager.hh
./intercoms/src/G4UIcommand.cc
./intercoms/src/G4UIcommandTree.cc
./intercoms/src/G4UImanager.cc
Jul 26, 00, M.Asai (tag intercoms-V02-00-01)
- Retagging with removing G4StateManager, G4VStateDependent and G4ApplicationState
classes.
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIbatch.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// $id$
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWith3Vector.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWith3VectorAndUnit.hh,v 1.3 1999/12/15 14:50:38 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.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithADouble.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithADoubleAndUnit.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithAString.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithAnInteger.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcmdWithoutParameter.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+16 -15
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UIcommand.hh,v 1.5 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4UIcommand.hh,v 1.6 2001/02/08 06:07:18 asaim Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
@@ -17,8 +17,9 @@
class G4UImessenger;
#include "globals.hh"
#include "G4ApplicationState.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
//#include "g4rw/tpordvec.h"
//#include "g4rw/tvordvec.h"
#include "g4std/vector"
#include "G4UItokenNum.hh"
// class description:
@@ -74,9 +75,9 @@ class G4UIcommand
G4String commandPath;
G4String commandName;
G4String rangeString;
G4RWTPtrOrderedVector<G4UIparameter> parameter;
G4RWTValOrderedVector<G4String> commandGuidance;
G4RWTValOrderedVector<G4ApplicationState> availabelStateList;
G4std::vector<G4UIparameter*> parameter;
G4std::vector<G4String> commandGuidance;
G4std::vector<G4ApplicationState> availabelStateList;
public: // with description
inline void SetRange(const char* rs)
@@ -90,7 +91,7 @@ class G4UIcommand
inline const G4String GetRange() const
{ return rangeString; };
inline G4int GetGuidanceEntries() const
{ return commandGuidance.entries(); }
{ return commandGuidance.size(); }
inline const G4String GetGuidanceLine(int i) const
{ return commandGuidance[i]; }
inline const G4String GetCommandPath() const
@@ -98,14 +99,14 @@ class G4UIcommand
inline const G4String GetCommandName() const
{ return commandName; }
inline G4int GetParameterEntries() const
{ return parameter.entries(); }
{ return parameter.size(); }
inline G4UIparameter * GetParameter(int i) const
{ return parameter[i]; }
public: // with description
inline void SetParameter(G4UIparameter *const newParameter)
{
parameter.insert( newParameter );
newVal.resize( parameter.entries() );
parameter.push_back( newParameter );
newVal.resize( parameter.size() );
}
// Defines a parameter. This method is used by the derived command classes
// but the user can directly use this command when he/she defines a command
@@ -114,7 +115,7 @@ class G4UIcommand
inline void SetGuidance(const char * aGuidance)
{
G4String * theGuidance = new G4String( aGuidance );
commandGuidance.insert( *theGuidance );
commandGuidance.push_back( *theGuidance );
}
// Adds a guidance line. Unlimitted number of invokation of this method is
// allowed. The given lines of guidance will appear for the help. The first
@@ -123,10 +124,10 @@ class G4UIcommand
public:
inline const G4String GetTitle() const
{
if(commandGuidance.entries() == 0)
if(commandGuidance.size() == 0)
{ return G4String("...Title not available..."); }
else
{ return commandGuidance(0); }
{ return commandGuidance[0]; }
}
protected:
@@ -168,7 +169,7 @@ class G4UIcommand
int bp; // buffer pointer for rangeBuf
tokenNum token;
yystype yylval;
G4RWTValOrderedVector<yystype> newVal;
G4std::vector<yystype> newVal;
int paramERR;
};
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcommandStatus.hh,v 1.2 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#ifndef G4UIcommandStatus_h
+9 -8
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UIcommandTree.hh,v 1.5 2000/02/14 12:24:41 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4UIcommandTree.hh,v 1.6 2001/02/08 06:07:18 asaim Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
#ifndef G4UIcommandTree_h
@@ -15,7 +15,8 @@
#include "G4UIcommand.hh"
#include "globals.hh"
#include "g4rw/tpordvec.h"
//#include "g4rw/tpordvec.h"
#include "g4std/vector"
// class description:
//
@@ -42,8 +43,8 @@ class G4UIcommandTree
void ListCurrentWithNum();
private:
G4RWTPtrOrderedVector<G4UIcommand> command;
G4RWTPtrOrderedVector<G4UIcommandTree> tree;
G4std::vector<G4UIcommand*> command;
G4std::vector<G4UIcommandTree*> tree;
G4UIcommand *guidance;
G4String pathName;
@@ -53,14 +54,14 @@ class G4UIcommandTree
inline const G4String GetPathName() const
{ return pathName; };
inline G4int GetTreeEntry() const
{ return tree.entries(); };
{ return tree.size(); };
inline G4int GetCommandEntry() const
{ return command.entries(); };
{ return command.size(); };
inline G4UIcommandTree * GetTree(int i)
{ return tree[i-1]; };
inline G4UIcommandTree * GetTree(G4String comName)
{
for( int i=0; i < tree.entries(); i++)
for( int i=0; i < tree.size(); i++)
{
if( comName == tree[i]->GetPathName() )
{ return tree[i]; }
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIcontrolMessenger.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#ifndef G4UIcontrolMessenger_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIdirectory.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
+7 -6
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UImanager.hh,v 1.6 2000/07/22 10:49:37 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4UImanager.hh,v 1.7 2001/02/08 06:07:18 asaim Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
#ifndef G4UImanager_h
@@ -14,7 +14,8 @@
#include "globals.hh"
#include "g4rw/ctoken.h"
#include "g4rw/tvordvec.h"
//#include "g4rw/tvordvec.h"
#include "g4std/vector"
#include "g4std/fstream"
#include "G4VStateDependent.hh"
class G4UIcommandTree;
@@ -105,7 +106,7 @@ class G4UImanager : public G4VStateDependent
G4int verboseLevel;
G4std::ofstream historyFile;
G4bool saveHistory;
G4RWTValOrderedVector<G4String> histVec;
G4std::vector<G4String> histVec;
G4bool pauseAtBeginOfEvent;
G4bool pauseAtEndOfEvent;
@@ -167,11 +168,11 @@ class G4UImanager : public G4VStateDependent
inline G4int GetVerboseLevel() const
{ return verboseLevel; };
inline G4int GetNumberOfHistory() const
{ return histVec.entries(); };
{ return histVec.size(); };
inline G4String GetPreviousCommand(G4int i) const
{
G4String st;
if(i>=0 && i<histVec.entries())
if(i>=0 && i<histVec.size())
{ st = histVec[i]; }
return st;
}
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UImessenger.hh,v 1.4 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
#ifndef G4UImessenger_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UIparameter.hh,v 1.3 1999/12/15 14:50:39 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: G4UIsession.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// $id$
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UItokenNum.hh,v 1.2 1999/12/15 14:50:39 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// G4UItokenNum.hh
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UnitsMessenger.hh,v 1.3 1999/12/15 14:50:40 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
// class description
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VFlavoredParallelWorld.hh,v 1.2 1999/12/15 14:50:40 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// Abstract interface for GEANT4 Flavored Parallel World.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VGlobalFastSimulationManager.hh,v 1.2 1999/12/15 14:50:40 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: G4VGraphicsScene.hh,v 1.5 2000/05/19 06:29:48 johna Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
// John Allison 19th July 1996
//
// Class Description:
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VVisManager.hh,v 1.4 1999/12/15 14:50:40 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// GEANT4 tag $Name: geant4-03-01 $
// John Allison 19/Oct/1996.
//
// Class Description:
+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.