Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
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,
G4Element element 
)

Definition at line 499 of file G4Element.cc.

References g(), python.hepunit::mole, and python.hepunit::perCent.

500 {
501  std::ios::fmtflags mode = flux.flags();
502  flux.setf(std::ios::fixed,std::ios::floatfield);
503  G4long prec = flux.precision(3);
504 
505  flux
506  << " Element: " << element->fName << " (" << element->fSymbol << ")"
507  << " Z = " << std::setw(4) << std::setprecision(1) << element->fZeff
508  << " N = " << std::setw(5) << std::setprecision(1) << element->fNeff
509  << " A = " << std::setw(6) << std::setprecision(2)
510  << (element->fAeff)/(g/mole) << " g/mole";
511 
512  for (size_t i=0; i<element->fNumberOfIsotopes; i++)
513  flux
514  << "\n ---> " << (*(element->theIsotopeVector))[i]
515  << " abundance: " << std::setw(6) << std::setprecision(2)
516  << (element->fRelativeAbundanceVector[i])/perCent << " %";
517 
518  flux.precision(prec);
519  flux.setf(mode,std::ios::floatfield);
520  return flux;
521 }
long G4long
Definition: G4Types.hh:80
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
float perCent
Definition: hepunit.py:239
std::ostream& operator<< ( std::ostream &  flux,
G4Element element 
)

Definition at line 525 of file G4Element.cc.

526 {
527  flux << &element;
528  return flux;
529 }
std::ostream& operator<< ( std::ostream &  flux,
G4ElementTable  ElementTable 
)

Definition at line 533 of file G4Element.cc.

References G4endl.

534 {
535  //Dump info for all known elements
536  flux << "\n***** Table : Nb of elements = " << ElementTable.size()
537  << " *****\n" << G4endl;
538 
539  for (size_t i=0; i<ElementTable.size(); i++) flux << ElementTable[i]
540  << G4endl << G4endl;
541 
542  return flux;
543 }
#define G4endl
Definition: G4ios.hh:61