#include <G4tgrMaterialSimple.hh>
Inheritance diagram for G4tgrMaterialSimple:
Public Member Functions | |
G4tgrMaterialSimple (const G4String &matType, const std::vector< G4String > &wl) | |
G4tgrMaterialSimple & | operator= (const G4tgrMaterialSimple &) |
G4double | GetA () const |
G4double | GetZ () const |
const G4String & | GetComponent (G4int i) const |
G4double | GetFraction (G4int i) |
G4tgrMaterialSimple () | |
~G4tgrMaterialSimple () | |
Friends | |
std::ostream & | operator<< (std::ostream &, const G4tgrMaterialSimple &) |
Definition at line 50 of file G4tgrMaterialSimple.hh.
G4tgrMaterialSimple::G4tgrMaterialSimple | ( | const G4String & | matType, | |
const std::vector< G4String > & | wl | |||
) |
Definition at line 57 of file G4tgrMaterialSimple.cc.
References G4tgrUtils::CheckWLsize(), G4cout, G4endl, G4tgrUtils::GetDouble(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), G4tgrMaterial::theDensity, G4tgrMaterial::theMateType, G4tgrMaterial::theName, G4tgrMaterial::theNoComponents, and WLSIZE_EQ.
00059 : name("MaterialSimple") 00060 { 00061 //---------- Check for miminum number of words read 00062 G4tgrUtils::CheckWLsize( wl, 5, WLSIZE_EQ, 00063 "G4tgrMaterialSimple::G4tgrMaterialSimple"); 00064 00065 theMateType = matType; 00066 00067 //---------- Fill private data 00068 theName = G4tgrUtils::GetString( wl[1] ); 00069 theZ = G4tgrUtils::GetDouble( wl[2] ); 00070 theA = G4tgrUtils::GetDouble( wl[3], g/mole); 00071 theDensity = G4tgrUtils::GetDouble( wl[4], g/cm3); 00072 theNoComponents = 0; 00073 #ifdef G4VERBOSE 00074 if( G4tgrMessenger::GetVerboseLevel() >= 1 ) 00075 { 00076 G4cout << " Created " << *this << G4endl; 00077 } 00078 #endif 00079 }
G4tgrMaterialSimple::G4tgrMaterialSimple | ( | ) |
G4tgrMaterialSimple::~G4tgrMaterialSimple | ( | ) |
G4double G4tgrMaterialSimple::GetA | ( | ) | const [inline, virtual] |
Implements G4tgrMaterial.
Definition at line 62 of file G4tgrMaterialSimple.hh.
Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().
Implements G4tgrMaterial.
Definition at line 83 of file G4tgrMaterialSimple.cc.
References G4UIcommand::ConvertToString(), FatalException, and G4Exception().
00084 { 00085 G4String ErrMessage = "Should never be called for a MaterialSimple - i:" 00086 + G4UIcommand::ConvertToString(ii); 00087 G4Exception("G4tgrMaterialSimple::GetComponent()", 00088 "InvalidCall", FatalException, ErrMessage); 00089 00090 return name; // dummy, to avoid compilation warnings... 00091 }
Implements G4tgrMaterial.
Definition at line 95 of file G4tgrMaterialSimple.cc.
References G4UIcommand::ConvertToString(), FatalException, and G4Exception().
00096 { 00097 G4String ErrMessage = "Should never be called for a MaterialSimple - i:" 00098 + G4UIcommand::ConvertToString(ii); 00099 G4Exception("G4tgrMaterialSimple::GetFraction()", 00100 "InvalidCall", FatalException, ErrMessage); 00101 00102 return 0.; // dummy, to avoid compilation warnings... 00103 }
G4double G4tgrMaterialSimple::GetZ | ( | ) | const [inline, virtual] |
Implements G4tgrMaterial.
Definition at line 63 of file G4tgrMaterialSimple.hh.
Referenced by G4tgbMaterialSimple::G4tgbMaterialSimple().
G4tgrMaterialSimple& G4tgrMaterialSimple::operator= | ( | const G4tgrMaterialSimple & | ) |
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4tgrMaterialSimple & | mate | |||
) | [friend] |
Definition at line 107 of file G4tgrMaterialSimple.cc.
00108 { 00109 os << "G4tgrMaterialSimple= " << mate.theName 00110 << " Z " << mate.theZ << " A " << mate.theA 00111 << "density= " << mate.theDensity/g*cm3 00112 << " g/cm3. Number of Components: " << mate.theNoComponents << G4endl; 00113 return os; 00114 }