Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
+13 -13
View File
@@ -5,15 +5,15 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G3PartTable.cc,v 1.7 1999/12/05 17:50:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G3PartTable.cc,v 1.9 2000/03/02 17:54:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
#include "g4std/strstream"
#include "g4std/iomanip"
#include "G3PartTable.hh"
typedef G4std::map<G4String, G4ParticleDefinition*, less<G4String> >
typedef G4std::map<G4String, G4ParticleDefinition*, G4std::less<G4String> >
::iterator PTDiterator;
G3PartTable::G3PartTable(){
@@ -21,7 +21,7 @@ G3PartTable::G3PartTable(){
G3PartTable::~G3PartTable(){
if (PTD.size()>0){
// G4cout << "Deleting PTD" << endl;
// G4cout << "Deleting PTD" << G4endl;
for (PTDiterator i=PTD.begin(); i != PTD.end(); i++) {
delete (*i).second;
}
@@ -35,38 +35,38 @@ G3PartTable::Get(G4int partid){
HashID(partid, ShashID);
PTDiterator i = PTD.find(ShashID);
return (*i).second;
};
}
void
G3PartTable::Put(G4int partid, G4ParticleDefinition *partpt){
G4String ShashID; // static
HashID(partid, ShashID);
PTD[ShashID]=partpt;
};
}
void
G3PartTable::HashID(G4int partid, G4String& theHashID){
char s[20];
ostrstream ostr(s, sizeof s);
ostr << "Part" << partid << ends;
G4std::ostrstream ostr(s, sizeof s);
ostr << "Part" << partid << G4std::ends;
theHashID = s;
};
}
void
G3PartTable::HashID(G4int partid, G4String* theHashID){
HashID(partid, *theHashID);
};
}
void
G3PartTable::PrintAll(){
if (PTD.size()>0){
G4int count=0;
G4cout << "Dump of PTD - " << PTD.size() << " entries: " << endl;
G4cout << "Dump of PTD - " << PTD.size() << " entries: " << G4endl;
for (PTDiterator i=PTD.begin(); i != PTD.end(); i++) {
count++;
G4ParticleDefinition* aPTD = (*i).second;
G4cout << "PTD entry " << setw(3) << count << " particle name: "
<< aPTD->GetParticleName() << endl;
G4cout << "PTD entry " << G4std::setw(3) << count << " particle name: "
<< aPTD->GetParticleName() << G4endl;
}
}
}