Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Isotope.cc File Reference
#include "G4Isotope.hh"
#include "G4NistManager.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include <iomanip>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &flux, const G4Isotope *isotope)
 
std::ostream & operator<< (std::ostream &flux, const G4Isotope &isotope)
 
std::ostream & operator<< (std::ostream &flux, const G4IsotopeTable &IsotopeTable)
 

Function Documentation

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream & flux,
const G4Isotope & isotope )

Definition at line 110 of file G4Isotope.cc.

111{
112 flux << &isotope;
113 return flux;
114}

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream & flux,
const G4Isotope * isotope )

Definition at line 88 of file G4Isotope.cc.

89{
90 std::ios::fmtflags mode = flux.flags();
91 flux.setf(std::ios::fixed, std::ios::floatfield);
92 G4long prec = flux.precision(3);
93
94 // clang-format off
95 flux
96 << " Isotope: " << std::setw(5) << isotope->fName
97 << " Z = " << std::setw(2) << isotope->fZ
98 << " N = " << std::setw(3) << isotope->fN
99 << " A = " << std::setw(6) << std::setprecision(2)
100 << (isotope->fA)/(g/mole) << " g/mole";
101 // clang-format on
102
103 flux.precision(prec);
104 flux.setf(mode, std::ios::floatfield);
105 return flux;
106}
long G4long
Definition G4Types.hh:87

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream & flux,
const G4IsotopeTable & IsotopeTable )

Definition at line 118 of file G4Isotope.cc.

119{
120 // Dump info for all known isotopes
121 flux << "\n***** Table : Nb of isotopes = " << IsotopeTable.size() << " *****\n" << G4endl;
122
123 for (auto& i : IsotopeTable) {
124 flux << i << G4endl;
125 }
126
127 return flux;
128}
#define G4endl
Definition G4ios.hh:67