Geant4-11
Functions
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"

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, const G4ElementTable &ElementTable)
 
std::ostream & operator<< (std::ostream &flux, const G4ElementVector &ElementVector)
 

Function Documentation

◆ operator<<() [1/4]

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

Definition at line 458 of file G4Element.cc.

459{
460 flux << &element;
461 return flux;
462}

◆ operator<<() [2/4]

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

Definition at line 431 of file G4Element.cc.

432{
433 std::ios::fmtflags mode = flux.flags();
434 flux.setf(std::ios::fixed,std::ios::floatfield);
435 G4long prec = flux.precision(3);
436
437 flux
438 << " Element: " << element->fName << " (" << element->fSymbol << ")"
439 << " Z = " << std::setw(4) << std::setprecision(1) << element->fZeff
440 << " N = " << std::setw(5) << std::setprecision(1)
441 << G4lrint(element->fNeff)
442 << " A = " << std::setw(6) << std::setprecision(3)
443 << (element->fAeff)/(g/mole) << " g/mole";
444
445 for (G4int i=0; i<element->fNumberOfIsotopes; i++)
446 flux
447 << "\n ---> " << (*(element->theIsotopeVector))[i]
448 << " abundance: " << std::setw(6) << std::setprecision(3)
449 << (element->fRelativeAbundanceVector[i])/perCent << " %";
450
451 flux.precision(prec);
452 flux.setf(mode,std::ios::floatfield);
453 return flux;
454}
static constexpr double perCent
Definition: G4SIunits.hh:325
static constexpr double mole
Definition: G4SIunits.hh:279
static constexpr double g
Definition: G4SIunits.hh:168
long G4long
Definition: G4Types.hh:87
int G4int
Definition: G4Types.hh:85
G4String fSymbol
Definition: G4Element.hh:234
G4String fName
Definition: G4Element.hh:233
G4IsotopeVector * theIsotopeVector
Definition: G4Element.hh:246
G4double fZeff
Definition: G4Element.hh:235
G4double * fRelativeAbundanceVector
Definition: G4Element.hh:247
G4int fNumberOfIsotopes
Definition: G4Element.hh:245
G4double fAeff
Definition: G4Element.hh:237
G4double fNeff
Definition: G4Element.hh:236
static const double prec
Definition: RanecuEngine.cc:61
int G4lrint(double ad)
Definition: templates.hh:134

◆ operator<<() [3/4]

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

Definition at line 466 of file G4Element.cc.

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

◆ operator<<() [4/4]

std::ostream & operator<< ( std::ostream &  flux,
const G4ElementVector ElementVector 
)

Definition at line 480 of file G4Element.cc.

481{
482 //Dump info for all known elements
483 flux << "\n***** Vector : Nb of elements = " << ElementVector.size()
484 << " *****\n" << G4endl;
485
486 for (size_t i=0; i<ElementVector.size(); i++) flux << ElementVector[i]
487 << G4endl << G4endl;
488
489 return flux;
490}