Geant4  10.02.p03
G4Element.cc File Reference
#include <iomanip>
#include <sstream>
#include "G4Element.hh"
#include "G4AtomicShells.hh"
#include "G4NistManager.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.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

◆ operator<<() [1/3]

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

Definition at line 499 of file G4Element.cc.

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) << G4lrint(element->fNeff)
509  << " A = " << std::setw(6) << std::setprecision(3)
510  << (element->fAeff)/(g/mole) << " g/mole";
511 
512  for (G4int i=0; i<element->fNumberOfIsotopes; i++)
513  flux
514  << "\n ---> " << (*(element->theIsotopeVector))[i]
515  << " abundance: " << std::setw(6) << std::setprecision(3)
516  << (element->fRelativeAbundanceVector[i])/perCent << " %";
517 
518  flux.precision(prec);
519  flux.setf(mode,std::ios::floatfield);
520  return flux;
521 }
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
long G4long
Definition: G4Types.hh:80
int G4int
Definition: G4Types.hh:78
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
static const double prec
Definition: RanecuEngine.cc:58
static const double perCent
Definition: G4SIunits.hh:329
G4String fSymbol
Definition: G4Element.hh:235
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
G4double fNeff
Definition: G4Element.hh:237
int G4lrint(double ad)
Definition: templates.hh:163
G4String fName
Definition: G4Element.hh:234
static const double mole
Definition: G4SIunits.hh:283
G4double fZeff
Definition: G4Element.hh:236
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
G4double fAeff
Definition: G4Element.hh:238
Here is the call graph for this function:

◆ operator<<() [2/3]

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

Definition at line 525 of file G4Element.cc.

526 {
527  flux << &element;
528  return flux;
529 }

◆ operator<<() [3/3]

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

Definition at line 533 of file G4Element.cc.

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