Geant4-11
Public Member Functions | Protected Attributes | Private Attributes | Friends
G4tgrElementFromIsotopes Class Reference

#include <G4tgrElementFromIsotopes.hh>

Inheritance diagram for G4tgrElementFromIsotopes:
G4tgrElement

Public Member Functions

 G4tgrElementFromIsotopes ()
 
 G4tgrElementFromIsotopes (const std::vector< G4String > &wl)
 
G4double GetAbundance (G4int n) const
 
const G4StringGetComponent (G4int n) const
 
const G4StringGetName () const
 
G4int GetNumberOfIsotopes () const
 
const G4StringGetSymbol () const
 
const G4StringGetType () const
 
 ~G4tgrElementFromIsotopes ()
 

Protected Attributes

G4String theName
 
G4String theSymbol
 
G4String theType
 

Private Attributes

std::vector< G4doubletheAbundances
 
std::vector< G4StringtheComponents
 
G4int theNoIsotopes = 0
 

Friends

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

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";
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
std::vector< G4String > theComponents
std::vector< G4double > theAbundances
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

References G4tgrUtils::CheckWLsize(), G4cout, G4endl, G4tgrUtils::GetDouble(), G4tgrUtils::GetInt(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), theAbundances, theComponents, G4tgrElement::theName, theNoIsotopes, G4tgrElement::theSymbol, G4tgrElement::theType, and WLSIZE_GE.

Member Function Documentation

◆ GetAbundance()

G4double G4tgrElementFromIsotopes::GetAbundance ( G4int  n) const
inline

◆ GetComponent()

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

Definition at line 55 of file G4tgrElementFromIsotopes.hh.

55{ return theComponents[n]; }

References CLHEP::detail::n, and theComponents.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

◆ GetName()

const G4String & G4tgrElement::GetName ( ) const
inlineinherited

◆ GetNumberOfIsotopes()

G4int G4tgrElementFromIsotopes::GetNumberOfIsotopes ( ) const
inline

Definition at line 54 of file G4tgrElementFromIsotopes.hh.

54{ return theNoIsotopes; }

References theNoIsotopes.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

◆ GetSymbol()

const G4String & G4tgrElement::GetSymbol ( ) const
inlineinherited

◆ GetType()

const G4String & G4tgrElement::GetType ( ) const
inlineinherited

Definition at line 48 of file G4tgrElement.hh.

48{ return theType; }

References G4tgrElement::theType.

Referenced by G4tgbElement::GetType().

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}

Field Documentation

◆ theAbundances

std::vector<G4double> G4tgrElementFromIsotopes::theAbundances
private

Definition at line 65 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgrElementFromIsotopes(), and GetAbundance().

◆ theComponents

std::vector<G4String> G4tgrElementFromIsotopes::theComponents
private

Definition at line 64 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgrElementFromIsotopes(), and GetComponent().

◆ theName

G4String G4tgrElement::theName
protectedinherited

◆ theNoIsotopes

G4int G4tgrElementFromIsotopes::theNoIsotopes = 0
private

Definition at line 63 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgrElementFromIsotopes(), and GetNumberOfIsotopes().

◆ theSymbol

G4String G4tgrElement::theSymbol
protectedinherited

◆ theType

G4String G4tgrElement::theType
protectedinherited

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