G3PartTable Class Reference

#include <G3PartTable.hh>


Public Member Functions

 G3PartTable ()
virtual ~G3PartTable ()
G4ParticleDefinitionGet (G4int partid)
void Put (G4int partid, G4ParticleDefinition *partpt)
void PrintAll ()


Detailed Description

Definition at line 43 of file G3PartTable.hh.


Constructor & Destructor Documentation

G3PartTable::G3PartTable (  ) 

Definition at line 38 of file G3PartTable.cc.

00038                         {
00039 }

G3PartTable::~G3PartTable (  )  [virtual]

Definition at line 41 of file G3PartTable.cc.

00041                          {
00042   if (PTD.size()>0){
00043     //    G4cout << "Deleting PTD" << G4endl;
00044     for (PTDiterator i=PTD.begin(); i != PTD.end(); i++) {
00045       delete (*i).second;
00046     }
00047     PTD.clear();
00048   }
00049 }


Member Function Documentation

G4ParticleDefinition * G3PartTable::Get ( G4int  partid  ) 

Definition at line 52 of file G3PartTable.cc.

00052                             {
00053   G4String ShashID; // static
00054   HashID(partid, ShashID);
00055   PTDiterator i = PTD.find(ShashID);
00056   return (*i).second;
00057 }

void G3PartTable::PrintAll (  ) 

Definition at line 79 of file G3PartTable.cc.

References G4cout, G4endl, and G4ParticleDefinition::GetParticleName().

Referenced by G4BuildGeom().

00079                      {
00080   if (PTD.size()>0){
00081     G4int count=0;
00082     G4cout << "Dump of PTD - " << PTD.size() << " entries: " << G4endl;
00083     for (PTDiterator i=PTD.begin(); i != PTD.end(); i++) {
00084       count++;
00085       G4ParticleDefinition* aPTD = (*i).second;
00086       G4cout << "PTD entry " << std::setw(3) << count << " particle name: " 
00087              << aPTD->GetParticleName() << G4endl;
00088     }
00089   }
00090 }

void G3PartTable::Put ( G4int  partid,
G4ParticleDefinition partpt 
)

Definition at line 60 of file G3PartTable.cc.

00060                                                           {
00061   G4String ShashID; // static
00062   HashID(partid, ShashID);
00063   PTD[ShashID]=partpt;
00064 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:23 2013 for Geant4 by  doxygen 1.4.7