#include <iomanip>
#include <sstream>
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
Go to the source code of this file.
◆ operator<<()
std::ostream& operator<< |
( |
std::ostream & |
flux, |
|
|
G4BestUnit |
a |
|
) |
| |
Definition at line 489 of file G4UnitsTable.cc.
496 G4int ksup(-1), kinf(-1);
502 std::fabs(a.
Value[1])),
503 std::fabs(a.
Value[2]));
505 for (
size_t k=0; k<List.size(); k++)
507 G4double unit = List[k]->GetValue();
509 {
if(unit>umax) {umax=unit; ksup=k;}}
511 {
if(unit<umin) {umin=unit; kinf=k;}}
515 if ((ratio>=1.)&&(ratio<rsup)) {rsup=ratio; ksup=k;}
516 if ((ratio< 1.)&&(ratio>rinf)) {rinf=ratio; kinf=k;}
521 if(index==-1) { index=kinf; }
522 if(index==-1) { index=0; }
525 { flux << a.
Value[j]/(List[
index]->GetValue()) <<
" "; }
527 std::ios::fmtflags oldform = flux.flags();
530 flux << std::setw(len) << List[
index]->GetSymbol();
std::vector< G4UnitsCategory * > G4UnitsTable
static G4UnitsTable & GetUnitsTable()
std::vector< G4UnitDefinition * > G4UnitsContainer