478{
481 ->GetUnitsList();
482 G4int len = theUnitsTable[a.IndexOfCategory]->GetSymbMxLen();
483
484 G4int ksup(-1), kinf(-1);
487
488
489 G4double value = std::max(std::max(std::fabs(a.Value[0]),
490 std::fabs(a.Value[1])),
491 std::fabs(a.Value[2]));
492
493 for (size_t k=0; k<List.size(); k++)
494 {
495 G4double unit = List[k]->GetValue();
497 {if(unit>umax) {umax=unit; ksup=k;}}
499 {if(unit<umin) {umin=unit; kinf=k;}}
500 else
501 {
503 if ((ratio>=1.)&&(ratio<rsup)) {rsup=ratio; ksup=k;}
504 if ((ratio< 1.)&&(ratio>rinf)) {rinf=ratio; kinf=k;}
505 }
506 }
507
509 if(index==-1) { index=kinf; }
510 if(index==-1) { index=0; }
511
512 for (
G4int j=0; j<a.nbOfVals; j++)
513 { flux << a.Value[j]/(List[index]->GetValue()) << " "; }
514
515 std::ios::fmtflags oldform = flux.flags();
516
517 flux.setf(std::ios::left,std::ios::adjustfield);
518 flux << std::setw(len) << List[index]->GetSymbol();
519 flux.flags(oldform);
520
521 return flux;
522}
std::vector< G4UnitsCategory * > G4UnitsTable
std::vector< G4UnitDefinition * > G4UnitsContainer
static G4UnitsTable & GetUnitsTable()