G4Element.cc File Reference

#include <iomanip>
#include <sstream>
#include "G4Element.hh"
#include "G4AtomicShells.hh"
#include "G4NistManager.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &flux, G4Element *element)
std::ostream & operator<< (std::ostream &flux, G4Element &element)
std::ostream & operator<< (std::ostream &flux, G4ElementTable ElementTable)


Function Documentation

std::ostream& operator<< ( std::ostream &  flux,
G4ElementTable  ElementTable 
)

Definition at line 537 of file G4Element.cc.

References G4endl.

00538 {
00539  //Dump info for all known elements
00540    flux << "\n***** Table : Nb of elements = " << ElementTable.size() 
00541         << " *****\n" << G4endl;
00542         
00543    for (size_t i=0; i<ElementTable.size(); i++) flux << ElementTable[i] 
00544                                                      << G4endl << G4endl;
00545 
00546    return flux;
00547 }

std::ostream& operator<< ( std::ostream &  flux,
G4Element element 
)

Definition at line 529 of file G4Element.cc.

00530 {
00531   flux << &element;        
00532   return flux;
00533 }

std::ostream& operator<< ( std::ostream &  flux,
G4Element element 
)

Definition at line 503 of file G4Element.cc.

References G4Element::fAeff, G4Element::fName, G4Element::fNeff, G4Element::fNumberOfIsotopes, G4Element::fRelativeAbundanceVector, G4Element::fSymbol, G4Element::fZeff, and G4Element::theIsotopeVector.

00504 {
00505   std::ios::fmtflags mode = flux.flags();
00506   flux.setf(std::ios::fixed,std::ios::floatfield);
00507   G4long prec = flux.precision(3);
00508   
00509   flux
00510     << " Element: " << element->fName   << " (" << element->fSymbol << ")"
00511     << "   Z = " << std::setw(4) << std::setprecision(1) <<  element->fZeff 
00512     << "   N = " << std::setw(5) << std::setprecision(1) <<  element->fNeff
00513     << "   A = " << std::setw(6) << std::setprecision(2)
00514                  << (element->fAeff)/(g/mole) << " g/mole";
00515    
00516   for (size_t i=0; i<element->fNumberOfIsotopes; i++)
00517   flux 
00518     << "\n         ---> " << (*(element->theIsotopeVector))[i] 
00519     << "   abundance: " << std::setw(6) << std::setprecision(2) 
00520     << (element->fRelativeAbundanceVector[i])/perCent << " %";
00521     
00522   flux.precision(prec);        
00523   flux.setf(mode,std::ios::floatfield);         
00524   return flux;
00525 }


Generated on Mon May 27 17:50:42 2013 for Geant4 by  doxygen 1.4.7