602{
606
607 G4int ksup(-1), kinf(-1);
610
611
614 std::fabs(a.
Value[2]));
615
616
617 if ((a.
Category ==
"Energy") && (value == 0.)) {
619 flux << a.
Value[j] <<
" ";
620 }
621 std::ios::fmtflags oldform = flux.flags();
622 flux.setf(std::ios::left, std::ios::adjustfield);
623 flux << std::setw(len) << "eV";
624 flux.flags(oldform);
625 return flux;
626 }
627
628
629 for(std::size_t k = 0; k < List.size(); ++k)
630 {
631 G4double unit = List[k]->GetValue();
633 {
634 if(unit > umax)
635 {
636 umax = unit;
637 ksup = k;
638 }
639 }
641 {
642 if(unit < umin)
643 {
644 umin = unit;
645 kinf = k;
646 }
647 }
648 else
649 {
651 if((ratio >= 1.) && (ratio < rsup))
652 {
653 rsup = ratio;
654 ksup = k;
655 }
656 if((ratio < 1.) && (ratio > rinf))
657 {
658 rinf = ratio;
659 kinf = k;
660 }
661 }
662 }
663
665 if(index == -1)
666 {
667 index = kinf;
668 }
669 if(index == -1)
670 {
671 index = 0;
672 }
673
675 {
676 flux << a.
Value[j] / (List[index]->GetValue()) <<
" ";
677 }
678
679 std::ios::fmtflags oldform = flux.flags();
680
681 flux.setf(std::ios::left, std::ios::adjustfield);
682 flux << std::setw(len) << List[index]->GetSymbol();
683 flux.flags(oldform);
684
685 return flux;
686}
std::vector< G4UnitDefinition * > G4UnitsContainer
std::vector< G4UnitsCategory * > G4UnitsTable
std::size_t IndexOfCategory
static G4UnitsTable & GetUnitsTable()
T max(const T t1, const T t2)
brief Return the largest of the two arguments