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

Friends

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

Detailed Description

Definition at line 49 of file G4tgrElementFromIsotopes.hh.


Constructor & Destructor Documentation

G4tgrElementFromIsotopes::G4tgrElementFromIsotopes (  ) 

Definition at line 42 of file G4tgrElementFromIsotopes.cc.

00043   : theNoIsotopes(0)
00044 {
00045 }

G4tgrElementFromIsotopes::~G4tgrElementFromIsotopes (  ) 

Definition at line 48 of file G4tgrElementFromIsotopes.cc.

00049 {
00050 }

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.

00055 {
00056   //---------- Check for miminum number of words read 
00057   G4tgrUtils::CheckWLsize( wl, 6, WLSIZE_GE,
00058                           "G4tgrElementFromIsotopes::G4tgrElementFromIsotopes");
00059     //:ELEM_FROM_ISOT NAME SYMBOL N_ISOT (ISOT_NAME ISOT_ABUNDANCE)
00060 
00061   theType = "ElementFromIsotopes";
00062   theName = G4tgrUtils::GetString( wl[1] );
00063   theSymbol = G4tgrUtils::GetString( wl[2] );
00064   theNoIsotopes = G4tgrUtils::GetInt( wl[3] );
00065 
00066   for( G4int ii = 0; ii < theNoIsotopes; ii++ )
00067   {
00068     theComponents.push_back( G4tgrUtils::GetString( wl[4+ii*2] ) ); 
00069     theAbundances.push_back( G4tgrUtils::GetDouble( wl[4+ii*2+1] ) );
00070   }
00071 
00072 #ifdef G4VERBOSE
00073   if( G4tgrMessenger::GetVerboseLevel() >= 1 )
00074   {
00075     G4cout << " Created " << *this << G4endl;
00076   }
00077 #endif
00078 }


Member Function Documentation

G4double G4tgrElementFromIsotopes::GetAbundance ( G4int  n  )  const [inline]

Definition at line 62 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

00062 { return theAbundances[n]; }

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

Definition at line 61 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

00061 { return theComponents[n]; }

G4int G4tgrElementFromIsotopes::GetNumberOfIsotopes (  )  const [inline]

Definition at line 60 of file G4tgrElementFromIsotopes.hh.

Referenced by G4tgbElement::BuildG4ElementFromIsotopes().

00060 { 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.

00083 {
00084   os << "G4tgrElementFromIsotopes= " << obj.theName
00085      << " N isotopes " << obj.theNoIsotopes
00086      << " COMPONENTS " << G4endl;
00087   for(size_t ii = 0; ii < obj.theComponents.size(); ii++ )
00088   { 
00089     os << obj.theComponents[ii] << " : " << obj.theAbundances[ii];
00090   }
00091   os << G4endl;
00092 
00093   return os;
00094 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:30 2013 for Geant4 by  doxygen 1.4.7