Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4Element.cc File Reference
#include <iomanip>
#include <sstream>
#include "G4Element.hh"
#include "G4AtomicShells.hh"
#include "G4NistManager.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Log.hh"
Include dependency graph for G4Element.cc:

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 432 of file G4Element.cc.

433 {
434  std::ios::fmtflags mode = flux.flags();
435  flux.setf(std::ios::fixed,std::ios::floatfield);
436  G4long prec = flux.precision(3);
437 
438  flux
439  << " Element: " << element->fName << " (" << element->fSymbol << ")"
440  << " Z = " << std::setw(4) << std::setprecision(1) << element->fZeff
441  << " N = " << std::setw(5) << std::setprecision(1)
442  << G4lrint(element->fNeff)
443  << " A = " << std::setw(6) << std::setprecision(3)
444  << (element->fAeff)/(g/mole) << " g/mole";
445 
446  for (G4int i=0; i<element->fNumberOfIsotopes; i++)
447  flux
448  << "\n ---> " << (*(element->theIsotopeVector))[i]
449  << " abundance: " << std::setw(6) << std::setprecision(3)
450  << (element->fRelativeAbundanceVector[i])/perCent << " %";
451 
452  flux.precision(prec);
453  flux.setf(mode,std::ios::floatfield);
454  return flux;
455 }
static constexpr double perCent
Definition: G4SIunits.hh:332
long G4long
Definition: G4Types.hh:80
static constexpr double g
Definition: G4SIunits.hh:183
int G4int
Definition: G4Types.hh:78
static const double prec
Definition: RanecuEngine.cc:58
int G4lrint(double ad)
Definition: templates.hh:163
inflate_mode mode
Definition: inflate.h:82
static constexpr double mole
Definition: G4SIunits.hh:286

Here is the call graph for this function:

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

Definition at line 459 of file G4Element.cc.

460 {
461  flux << &element;
462  return flux;
463 }
std::ostream& operator<< ( std::ostream &  flux,
G4ElementTable  ElementTable 
)

Definition at line 467 of file G4Element.cc.

468 {
469  //Dump info for all known elements
470  flux << "\n***** Table : Nb of elements = " << ElementTable.size()
471  << " *****\n" << G4endl;
472 
473  for (size_t i=0; i<ElementTable.size(); i++) flux << ElementTable[i]
474  << G4endl << G4endl;
475 
476  return flux;
477 }
#define G4endl
Definition: G4ios.hh:61