Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G3EleTable Class Reference

#include <G3EleTable.hh>

Public Member Functions

 G3EleTable ()
 
virtual ~G3EleTable ()
 
G4ElementGetEle (G4double Z)
 

Detailed Description

Definition at line 48 of file G3EleTable.hh.

Constructor & Destructor Documentation

G3EleTable::G3EleTable ( )

Definition at line 39 of file G3EleTable.cc.

39  :_MaxEle(109){
40  _EleNames = new char*[_MaxEle];
41  // create an array of pointers to elements
42  _Ele = new G4Element*[_MaxEle];
43  LoadUp();
44 }
G3EleTable::~G3EleTable ( )
virtual

Definition at line 46 of file G3EleTable.cc.

46  {
47  delete [] _EleNames;
48  delete [] _Ele;
49 }

Member Function Documentation

G4Element * G3EleTable::GetEle ( G4double  Z)

Definition at line 52 of file G3EleTable.cc.

52  {
53  G4double A;
54  char name[20], sym[3];
55  G4int index = (G4int) Z-1;
56  if (!parse(Z, name, sym, A)) {
57  G4String na(name);
58  G4String sy(sym);
59  if (_Ele[index] == 0) {
60  // add an element to the element table here
61  _Ele[index] = new G4Element(na, sy, Z, A*g/mole);
62  }
63  }
64  return _Ele[index];
65 }
const XML_Char * name
Definition: expat.h:151
static constexpr double g
Definition: G4SIunits.hh:183
int G4int
Definition: G4Types.hh:78
double A(double temperature)
double G4double
Definition: G4Types.hh:76
static constexpr double mole
Definition: G4SIunits.hh:286

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: