Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4Exception.cc,v 1.4 1999/06/21 09:11:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Exception.cc,v 1.8 1999/11/29 10:17:46 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -20,40 +20,25 @@
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <stdlib.h>
|
||||
#include "g4rw/cstring.h"
|
||||
|
||||
void G4Exception(const char* s)
|
||||
{
|
||||
if (s)
|
||||
{
|
||||
G4cerr << s << endl;
|
||||
G4cerr << s << G4endl;
|
||||
}
|
||||
|
||||
G4cerr << endl << "*** G4Exception: Aborting execution ***" << endl;
|
||||
G4cerr << G4endl << "*** G4Exception: Aborting execution ***" << G4endl;
|
||||
abort();
|
||||
}
|
||||
|
||||
#ifdef G4USE_STL
|
||||
#include <string>
|
||||
void G4Exception(string s)
|
||||
void G4Exception(G4std::string s)
|
||||
{
|
||||
G4Exception(s.c_str());
|
||||
}
|
||||
// Other typedefs
|
||||
#include <rw/cstring.h>
|
||||
typedef RWCString G4String;
|
||||
|
||||
void G4Exception(G4String s)
|
||||
{
|
||||
G4Exception(s.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4LPhysicsFreeVector.cc,v 1.1 1999/01/07 16:09:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4LPhysicsFreeVector.cc,v 1.2 1999/11/16 17:46:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4PhysicsFreeVector.cc,v 1.1 1999/01/07 16:09:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PhysicsFreeVector.cc,v 1.2 1999/11/16 17:46:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
@@ -123,10 +123,3 @@ void G4PhysicsFreeVector::PutValue( size_t theBinNumber, G4double theBinValue,
|
||||
edgeMin = binVector(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4PhysicsLinearVector.cc,v 1.1 1999/01/07 16:09:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PhysicsLinearVector.cc,v 1.2 1999/11/16 17:46:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
@@ -81,9 +81,3 @@ G4PhysicsLinearVector::G4PhysicsLinearVector(G4double theEmin,
|
||||
}
|
||||
|
||||
G4PhysicsLinearVector::~G4PhysicsLinearVector(){}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4PhysicsLogVector.cc,v 1.1 1999/01/07 16:09:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PhysicsLogVector.cc,v 1.2 1999/11/16 17:46:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -26,12 +26,8 @@
|
||||
|
||||
|
||||
G4PhysicsLogVector::G4PhysicsLogVector()
|
||||
{
|
||||
ptrNextTable = 0;
|
||||
edgeMin = 0.0;
|
||||
edgeMax = 0.0;
|
||||
numberOfBin = 0;
|
||||
}
|
||||
: dBin(0.), baseBin(0.)
|
||||
{}
|
||||
|
||||
|
||||
G4PhysicsLogVector::G4PhysicsLogVector(size_t theNbin)
|
||||
@@ -84,9 +80,3 @@ G4PhysicsLogVector::G4PhysicsLogVector(G4double theEmin,
|
||||
|
||||
|
||||
G4PhysicsLogVector::~G4PhysicsLogVector(){}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4PhysicsOrderedFreeVector.cc,v 1.1 1999/01/07 16:09:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PhysicsOrderedFreeVector.cc,v 1.2 1999/11/16 17:46:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// PhysicsOrderedFreeVector Class Implementation
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4PhysicsVector.cc,v 1.1 1999/01/07 16:09:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PhysicsVector.cc,v 1.4 1999/11/23 15:00:05 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -24,6 +24,12 @@
|
||||
|
||||
#include "G4PhysicsVector.hh"
|
||||
|
||||
G4PhysicsVector::G4PhysicsVector()
|
||||
: edgeMin(0.), edgeMax(0.), numberOfBin(0),
|
||||
lastEnergy(0.), lastValue(0.), lastBin(0),
|
||||
ptrNextTable(0) {}
|
||||
|
||||
G4PhysicsVector::~G4PhysicsVector() {}
|
||||
|
||||
G4int G4PhysicsVector::operator==(const G4PhysicsVector &right) const
|
||||
{
|
||||
@@ -64,7 +70,7 @@ G4bool G4PhysicsVector::IsFilledVectorExist() const
|
||||
return status;
|
||||
}
|
||||
|
||||
void G4PhysicsVector::LinkPhysicsTable(RWTPtrOrderedVector<G4PhysicsVector>& theTable)
|
||||
void G4PhysicsVector::LinkPhysicsTable(G4RWTPtrOrderedVector<G4PhysicsVector>& theTable)
|
||||
{
|
||||
ptrNextTable = &theTable;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4Timer.cc,v 1.3 1999/05/24 20:39:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Timer.cc,v 1.5 1999/11/23 15:00:05 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -60,7 +60,7 @@ void G4Exception(const char* s=0);
|
||||
#endif /* WIN32 */
|
||||
|
||||
// Print timer status n ostream
|
||||
ostream& operator << (ostream& os, const G4Timer& t)
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4Timer& t)
|
||||
{
|
||||
if (t.IsValid())
|
||||
{
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UnitsTable.cc,v 1.5 1999/04/13 15:23:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UnitsTable.cc,v 1.7 1999/11/23 15:00:05 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD Group
|
||||
//
|
||||
// ------------ class G4UnitsTable ------------
|
||||
//
|
||||
// 17-05-98: first version, M.Maire
|
||||
@@ -27,7 +24,7 @@
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include <iomanip.h>
|
||||
#include "g4std/iomanip"
|
||||
|
||||
G4UnitsTable G4UnitDefinition::theUnitsTable;
|
||||
|
||||
@@ -110,7 +107,7 @@ G4double G4UnitDefinition::GetValueOf(G4String string)
|
||||
}
|
||||
G4cout << "Warning from G4UnitDefinition::GetValueOf(" << string << ")."
|
||||
<< " The unit " << string << " does not exist in UnitsTable."
|
||||
<< " Return Value = 0." << endl;
|
||||
<< " Return Value = 0." << G4endl;
|
||||
return 0.;
|
||||
}
|
||||
|
||||
@@ -130,7 +127,7 @@ G4String G4UnitDefinition::GetCategory(G4String string)
|
||||
}
|
||||
G4cout << "Warning from G4UnitDefinition::GetCategory(" << string << ")."
|
||||
<< " The unit " << string << " does not exist in UnitsTable."
|
||||
<< " Return category = None" << endl;
|
||||
<< " Return category = None" << G4endl;
|
||||
name = "None";
|
||||
return name;
|
||||
}
|
||||
@@ -141,8 +138,8 @@ void G4UnitDefinition::PrintDefinition()
|
||||
{
|
||||
G4int nameL = theUnitsTable[CategoryIndex]->GetNameMxLen();
|
||||
G4int symbL = theUnitsTable[CategoryIndex]->GetSymbMxLen();
|
||||
G4cout << setw(nameL) << Name << " ("
|
||||
<< setw(symbL) << SymbolName << ") = " << Value << endl;
|
||||
G4cout << G4std::setw(nameL) << Name << " ("
|
||||
<< G4std::setw(symbL) << SymbolName << ") = " << Value << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -321,7 +318,7 @@ G4int G4UnitsCategory::operator!=(const G4UnitsCategory &right) const
|
||||
|
||||
void G4UnitsCategory::PrintCategory()
|
||||
{
|
||||
G4cout << "\n category: " << Name << endl;
|
||||
G4cout << "\n category: " << Name << G4endl;
|
||||
for(size_t i=0;i<UnitsList.entries();i++)
|
||||
UnitsList[i]->PrintDefinition();
|
||||
}
|
||||
@@ -338,7 +335,7 @@ G4BestUnit::G4BestUnit(G4double value,G4String category)
|
||||
((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) i++;
|
||||
if (i == nbCat)
|
||||
{ G4cout << " G4BestUnit: the category " << category
|
||||
<< " does not exist; --> G4Exception" << endl;
|
||||
<< " does not exist; --> G4Exception" << G4endl;
|
||||
G4Exception(" ");
|
||||
}
|
||||
//
|
||||
@@ -353,7 +350,7 @@ G4BestUnit::~G4BestUnit()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
ostream& operator<<(ostream& flux, G4BestUnit a)
|
||||
G4std::ostream& operator<<(G4std::ostream& flux, G4BestUnit a)
|
||||
{
|
||||
G4UnitsTable& theUnitsTable = G4UnitDefinition::GetUnitsTable();
|
||||
G4UnitsContainer& List = theUnitsTable[a.IndexOfCategory]
|
||||
@@ -381,9 +378,9 @@ ostream& operator<<(ostream& flux, G4BestUnit a)
|
||||
G4int index=ksup; if(index==-1) index=kinf; if(index==-1) index=0;
|
||||
|
||||
flux << a.Value/(List[index]->GetValue());
|
||||
G4long oldform = G4cout.setf(ios::left,ios::adjustfield);
|
||||
flux << " " << setw(len) << List[index]->GetSymbol();
|
||||
G4cout.setf(oldform,ios::adjustfield);
|
||||
G4long oldform = G4cout.setf(G4std::ios::left,G4std::ios::adjustfield);
|
||||
flux << " " << G4std::setw(len) << List[index]->GetSymbol();
|
||||
G4cout.setf(oldform,G4std::ios::adjustfield);
|
||||
|
||||
return flux;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
//History 1998 Nov. 3 Masayasu Nagamatu
|
||||
// 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: G4ios.cc,v 1.4 1999/11/23 15:00:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// G4ios.cc
|
||||
//
|
||||
// History 1998 Nov. 3 Masayasu Nagamatu
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
#ifdef G4STREAM
|
||||
|
||||
#include "G4strstreambuf.hh"
|
||||
|
||||
G4strstreambuf G4coutbuf;
|
||||
G4strstreambuf G4cerrbuf;
|
||||
ostream G4cout(&G4coutbuf);
|
||||
ostream G4cerr(&G4cerrbuf);
|
||||
|
||||
#endif
|
||||
G4std::ostream G4cout(&G4coutbuf);
|
||||
G4std::ostream G4cerr(&G4cerrbuf);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user