Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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

◆ operator<<() [1/3]

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

Definition at line 529 of file G4Element.cc.

530{
531 flux << &element;
532 return flux;
533}

◆ operator<<() [2/3]

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

Definition at line 503 of file G4Element.cc.

504{
505 std::ios::fmtflags mode = flux.flags();
506 flux.setf(std::ios::fixed,std::ios::floatfield);
507 G4long prec = flux.precision(3);
508
509 flux
510 << " Element: " << element->fName << " (" << element->fSymbol << ")"
511 << " Z = " << std::setw(4) << std::setprecision(1) << element->fZeff
512 << " N = " << std::setw(5) << std::setprecision(1) << element->fNeff
513 << " A = " << std::setw(6) << std::setprecision(2)
514 << (element->fAeff)/(g/mole) << " g/mole";
515
516 for (size_t i=0; i<element->fNumberOfIsotopes; i++)
517 flux
518 << "\n ---> " << (*(element->theIsotopeVector))[i]
519 << " abundance: " << std::setw(6) << std::setprecision(2)
520 << (element->fRelativeAbundanceVector[i])/perCent << " %";
521
522 flux.precision(prec);
523 flux.setf(mode,std::ios::floatfield);
524 return flux;
525}
long G4long
Definition: G4Types.hh:68

◆ operator<<() [3/3]

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

Definition at line 537 of file G4Element.cc.

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