00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00041
00042 inline
00043 void G4MaterialPropertiesTable::AddConstProperty(const char *key,
00044 G4double PropertyValue)
00045 {
00046
00047
00048
00049 MPTC [G4String(key)] = PropertyValue;
00050 }
00051
00052 inline
00053 G4MaterialPropertyVector* G4MaterialPropertiesTable::AddProperty(
00054 const char *key,
00055 G4double *PhotonEnergies,
00056 G4double *PropertyValues,
00057 G4int NumEntries)
00058 {
00059
00060
00061
00062 G4MaterialPropertyVector *mpv = new G4MaterialPropertyVector(PhotonEnergies,
00063 PropertyValues, NumEntries);
00064 MPT [G4String(key)] = mpv;
00065
00066 return mpv;
00067 }
00068
00069 inline
00070 void G4MaterialPropertiesTable::
00071 AddProperty(const char *key, G4MaterialPropertyVector *mpv)
00072 {
00073
00074
00075
00076 MPT [G4String(key)] = mpv;
00077 }
00078
00079 inline
00080 void G4MaterialPropertiesTable::RemoveConstProperty(const char *key)
00081 {
00082 MPTC.erase(G4String(key));
00083 }
00084
00085 inline
00086 void G4MaterialPropertiesTable::RemoveProperty(const char *key)
00087 {
00088 MPT.erase(G4String(key));
00089 }
00090
00091 inline
00092 G4double G4MaterialPropertiesTable::GetConstProperty(const char *key)
00093 {
00094
00095
00096 MPTCiterator j;
00097 j = MPTC.find(G4String(key));
00098 if ( j != MPTC.end() ) return j->second;
00099 G4Exception("G4MaterialPropertiesTable::GetConstProperty()","mat202",
00100 FatalException, "Constant Material Property not found.");
00101 return 0.;
00102 }
00103
00104 inline
00105 G4bool G4MaterialPropertiesTable::ConstPropertyExists(const char *key)
00106 {
00107
00108
00109 MPTCiterator j;
00110 j = MPTC.find(G4String(key));
00111 if ( j != MPTC.end() ) return true;
00112 return false;
00113 }
00114
00115 inline G4MaterialPropertyVector*
00116 G4MaterialPropertiesTable::GetProperty(const char *key)
00117 {
00118
00119
00120 MPTiterator i;
00121 i = MPT.find(G4String(key));
00122 if ( i != MPT.end() ) return i->second;
00123 if (G4String(key) == "GROUPVEL") return SetGROUPVEL();
00124 return NULL;
00125 }
00126
00127 inline
00128 void G4MaterialPropertiesTable::AddEntry(const char *key,
00129 G4double aPhotonEnergy,
00130 G4double aPropertyValue)
00131 {
00132
00133
00134
00135 G4MaterialPropertyVector *targetVector=MPT [G4String(key)];
00136 if (targetVector != 0)
00137 {
00138 targetVector->InsertValues(aPhotonEnergy, aPropertyValue);
00139 }
00140 else
00141 {
00142 G4Exception("G4MaterialPropertiesTable::AddEntry()", "mat203",
00143 FatalException, "Material Property Vector not found.");
00144 }
00145 }