Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4tgrElementFromIsotopes Class Reference

#include <G4tgrElementFromIsotopes.hh>

+ Inheritance diagram for G4tgrElementFromIsotopes:

Public Member Functions

 G4tgrElementFromIsotopes ()
 
 ~G4tgrElementFromIsotopes ()
 
 G4tgrElementFromIsotopes (const std::vector< G4String > &wl)
 
G4int GetNumberOfIsotopes () const
 
const G4StringGetComponent (G4int n) const
 
G4double GetAbundance (G4int n) const
 
- Public Member Functions inherited from G4tgrElement
 G4tgrElement ()
 
virtual ~G4tgrElement ()
 
const G4StringGetName () const
 
const G4StringGetSymbol () const
 
const G4StringGetType () const
 

Friends

std::ostream & operator<< (std::ostream &, const G4tgrElementFromIsotopes &)
 

Additional Inherited Members

- Protected Attributes inherited from G4tgrElement
G4String theName
 
G4String theSymbol
 
G4String theType
 

Detailed Description

Definition at line 49 of file G4tgrElementFromIsotopes.hh.

Constructor & Destructor Documentation

◆ G4tgrElementFromIsotopes() [1/2]

G4tgrElementFromIsotopes::G4tgrElementFromIsotopes ( )

Definition at line 42 of file G4tgrElementFromIsotopes.cc.

43 : theNoIsotopes(0)
44{
45}

◆ ~G4tgrElementFromIsotopes()

G4tgrElementFromIsotopes::~G4tgrElementFromIsotopes ( )

Definition at line 48 of file G4tgrElementFromIsotopes.cc.

49{
50}

◆ G4tgrElementFromIsotopes() [2/2]

G4tgrElementFromIsotopes::G4tgrElementFromIsotopes ( const std::vector< G4String > &  wl)

Definition at line 53 of file G4tgrElementFromIsotopes.cc.

55{
56 //---------- Check for miminum number of words read
58 "G4tgrElementFromIsotopes::G4tgrElementFromIsotopes");
59 //:ELEM_FROM_ISOT NAME SYMBOL N_ISOT (ISOT_NAME ISOT_ABUNDANCE)
60
61 theType = "ElementFromIsotopes";
64 theNoIsotopes = G4tgrUtils::GetInt( wl[3] );
65
66 for( G4int ii = 0; ii < theNoIsotopes; ii++ )
67 {
68 theComponents.push_back( G4tgrUtils::GetString( wl[4+ii*2] ) );
69 theAbundances.push_back( G4tgrUtils::GetDouble( wl[4+ii*2+1] ) );
70 }
71
72#ifdef G4VERBOSE
74 {
75 G4cout << " Created " << *this << G4endl;
76 }
77#endif
78}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
@ WLSIZE_GE
Definition: G4tgrUtils.hh:52
G4String theName
Definition: G4tgrElement.hh:58
G4String theSymbol
Definition: G4tgrElement.hh:59
G4String theType
Definition: G4tgrElement.hh:60
static G4int GetVerboseLevel()
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:178
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:472
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:427
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:203

Member Function Documentation

◆ GetAbundance()

G4double G4tgrElementFromIsotopes::GetAbundance ( G4int  n) const
inline

Definition at line 62 of file G4tgrElementFromIsotopes.hh.

62{ return theAbundances[n]; }

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

◆ GetComponent()

const G4String & G4tgrElementFromIsotopes::GetComponent ( G4int  n) const
inline

Definition at line 61 of file G4tgrElementFromIsotopes.hh.

61{ return theComponents[n]; }

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

◆ GetNumberOfIsotopes()

G4int G4tgrElementFromIsotopes::GetNumberOfIsotopes ( ) const
inline

Definition at line 60 of file G4tgrElementFromIsotopes.hh.

60{ return theNoIsotopes; }

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4tgrElementFromIsotopes obj 
)
friend

Definition at line 82 of file G4tgrElementFromIsotopes.cc.

83{
84 os << "G4tgrElementFromIsotopes= " << obj.theName
85 << " N isotopes " << obj.theNoIsotopes
86 << " COMPONENTS " << G4endl;
87 for(size_t ii = 0; ii < obj.theComponents.size(); ii++ )
88 {
89 os << obj.theComponents[ii] << " : " << obj.theAbundances[ii];
90 }
91 os << G4endl;
92
93 return os;
94}

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