578{
581 G4int len = theUnitsTable[a.IndexOfCategory]->GetSymbMxLen();
582
583 G4int ksup(-1), kinf(-1);
586
587
589 std::max(std::max(std::fabs(a.Value[0]), std::fabs(a.Value[1])),
590 std::fabs(a.Value[2]));
591
592 for(std::size_t k = 0; k < List.size(); ++k)
593 {
594 G4double unit = List[k]->GetValue();
596 {
597 if(unit > umax)
598 {
599 umax = unit;
600 ksup = k;
601 }
602 }
604 {
605 if(unit < umin)
606 {
607 umin = unit;
608 kinf = k;
609 }
610 }
611 else
612 {
614 if((ratio >= 1.) && (ratio < rsup))
615 {
616 rsup = ratio;
617 ksup = k;
618 }
619 if((ratio < 1.) && (ratio > rinf))
620 {
621 rinf = ratio;
622 kinf = k;
623 }
624 }
625 }
626
628 if(index == -1)
629 {
630 index = kinf;
631 }
632 if(index == -1)
633 {
634 index = 0;
635 }
636
637 for(
G4int j = 0; j < a.nbOfVals; ++j)
638 {
639 flux << a.Value[j] / (List[index]->GetValue()) << " ";
640 }
641
642 std::ios::fmtflags oldform = flux.flags();
643
644 flux.setf(std::ios::left, std::ios::adjustfield);
645 flux << std::setw(len) << List[index]->GetSymbol();
646 flux.flags(oldform);
647
648 return flux;
649}
std::vector< G4UnitDefinition * > G4UnitsContainer