Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends
G4tgrElementFromIsotopes Class Reference

#include <G4tgrElementFromIsotopes.hh>

Inheritance diagram for G4tgrElementFromIsotopes:
G4tgrElement

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::G4tgrElementFromIsotopes ( )

Definition at line 42 of file G4tgrElementFromIsotopes.cc.

43  : theNoIsotopes(0)
44 {
45 }
G4tgrElementFromIsotopes::~G4tgrElementFromIsotopes ( )

Definition at line 48 of file G4tgrElementFromIsotopes.cc.

49 {
50 }
G4tgrElementFromIsotopes::G4tgrElementFromIsotopes ( const std::vector< G4String > &  wl)

Definition at line 54 of file G4tgrElementFromIsotopes.cc.

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

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";
62  theName = G4tgrUtils::GetString( wl[1] );
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 }
G4String theType
Definition: G4tgrElement.hh:60
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:475
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:430
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:205
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:180
G4String theSymbol
Definition: G4tgrElement.hh:59
#define G4endl
Definition: G4ios.hh:61
G4String theName
Definition: G4tgrElement.hh:58

Member Function Documentation

G4double G4tgrElementFromIsotopes::GetAbundance ( G4int  n) const
inline

Definition at line 62 of file G4tgrElementFromIsotopes.hh.

References n.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

62 { return theAbundances[n]; }
const G4int n
const G4String& G4tgrElementFromIsotopes::GetComponent ( G4int  n) const
inline

Definition at line 61 of file G4tgrElementFromIsotopes.hh.

References n.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

61 { return theComponents[n]; }
const G4int n
G4int G4tgrElementFromIsotopes::GetNumberOfIsotopes ( ) const
inline

Definition at line 60 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

60 { return theNoIsotopes; }

Friends And Related Function Documentation

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 }
#define G4endl
Definition: G4ios.hh:61
G4String theName
Definition: G4tgrElement.hh:58

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