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

#include <G3MedTable.hh>

Public Member Functions

 G3MedTable ()
 
virtual ~G3MedTable ()
 
G3MedTableEntryget (G4int id) const
 
void put (G4int id, G4Material *material, G4MagneticField *field, G4UserLimits *limits, G4int isvol)
 
G4int GetSize () const
 
G3MedTableEntryGetMTE (G4int i) const
 
void Clear ()
 

Detailed Description

Definition at line 57 of file G3MedTable.hh.

Constructor & Destructor Documentation

G3MedTable::G3MedTable ( )

Definition at line 33 of file G3MedTable.cc.

34 {
35  fMedVector = new G3MediumVector();
36 }
std::vector< G3MedTableEntry * > G3MediumVector
Definition: G3MedTable.hh:53
G3MedTable::~G3MedTable ( )
virtual

Definition at line 38 of file G3MedTable.cc.

39 {
40  Clear();
41  delete fMedVector;
42 }
void Clear()
Definition: G3MedTable.cc:74

Here is the call graph for this function:

Member Function Documentation

void G3MedTable::Clear ( )

Definition at line 74 of file G3MedTable.cc.

75 {
76  G3MedTableEntry* a;
77  while (fMedVector->size()>0) {
78  a = fMedVector->back();
79  fMedVector->pop_back();
80  for (G3MediumVector::iterator i=fMedVector->begin();
81  i!=fMedVector->end();){
82  if (*i==a) {
83  i = fMedVector->erase(i);
84  }
85  else {
86  ++i;
87  }
88  }
89  if ( a ) delete a;
90  }
91 }

Here is the caller graph for this function:

G3MedTableEntry * G3MedTable::get ( G4int  id) const

Definition at line 44 of file G3MedTable.cc.

45 {
46  for (size_t i=0; i< fMedVector->size(); i++) {
47  G3MedTableEntry* mte = (*fMedVector)[i];
48  if (id == mte->GetID()) return mte;
49  }
50  return 0;
51 }
G4int GetID() const

Here is the call graph for this function:

Here is the caller graph for this function:

G3MedTableEntry * G3MedTable::GetMTE ( G4int  i) const

Definition at line 61 of file G3MedTable.cc.

62 {
63  if (i<0 || i>= G4int(fMedVector->size()))
64  return 0;
65 
66  return (*fMedVector)[i];
67 }
int G4int
Definition: G4Types.hh:78
G4int G3MedTable::GetSize ( ) const

Definition at line 69 of file G3MedTable.cc.

70 {
71  return fMedVector->size();
72 }
void G3MedTable::put ( G4int  id,
G4Material material,
G4MagneticField field,
G4UserLimits limits,
G4int  isvol 
)

Definition at line 53 of file G3MedTable.cc.

55 {
56  G3MedTableEntry* mte
57  = new G3MedTableEntry(id, material, field, limits, isvol);
58  fMedVector->push_back(mte);
59 }

Here is the caller graph for this function:


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