Geant4 11.1.1
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 43 of file G4tgrElementFromIsotopes.hh.

Constructor & Destructor Documentation

◆ G4tgrElementFromIsotopes() [1/2]

G4tgrElementFromIsotopes::G4tgrElementFromIsotopes ( )

Definition at line 36 of file G4tgrElementFromIsotopes.cc.

37{
38}

◆ ~G4tgrElementFromIsotopes()

G4tgrElementFromIsotopes::~G4tgrElementFromIsotopes ( )

Definition at line 41 of file G4tgrElementFromIsotopes.cc.

42{
43}

◆ G4tgrElementFromIsotopes() [2/2]

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

Definition at line 46 of file G4tgrElementFromIsotopes.cc.

48{
49 //---------- Check for miminum number of words read
51 "G4tgrElementFromIsotopes::G4tgrElementFromIsotopes");
52 //:ELEM_FROM_ISOT NAME SYMBOL N_ISOT (ISOT_NAME ISOT_ABUNDANCE)
53
54 theType = "ElementFromIsotopes";
57 theNoIsotopes = G4tgrUtils::GetInt(wl[3]);
58
59 for(G4int ii = 0; ii < theNoIsotopes; ++ii)
60 {
61 theComponents.push_back(G4tgrUtils::GetString(wl[4 + ii * 2]));
62 theAbundances.push_back(G4tgrUtils::GetDouble(wl[4 + ii * 2 + 1]));
63 }
64
65#ifdef G4VERBOSE
67 {
68 G4cout << " Created " << *this << G4endl;
69 }
70#endif
71}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
@ WLSIZE_GE
Definition: G4tgrUtils.hh:51
G4String theName
Definition: G4tgrElement.hh:52
G4String theSymbol
Definition: G4tgrElement.hh:53
G4String theType
Definition: G4tgrElement.hh:54
static G4int GetVerboseLevel()
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:173
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:490
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:447
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:198

Member Function Documentation

◆ GetAbundance()

G4double G4tgrElementFromIsotopes::GetAbundance ( G4int  n) const
inline

Definition at line 56 of file G4tgrElementFromIsotopes.hh.

56{ return theAbundances[n]; }

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

◆ GetComponent()

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

Definition at line 55 of file G4tgrElementFromIsotopes.hh.

55{ return theComponents[n]; }

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

◆ GetNumberOfIsotopes()

G4int G4tgrElementFromIsotopes::GetNumberOfIsotopes ( ) const
inline

Definition at line 54 of file G4tgrElementFromIsotopes.hh.

54{ 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 74 of file G4tgrElementFromIsotopes.cc.

75{
76 os << "G4tgrElementFromIsotopes= " << obj.theName << " N isotopes "
77 << obj.theNoIsotopes << " COMPONENTS " << G4endl;
78 for(std::size_t ii = 0; ii < obj.theComponents.size(); ++ii)
79 {
80 os << obj.theComponents[ii] << " : " << obj.theAbundances[ii];
81 }
82 os << G4endl;
83
84 return os;
85}

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