#include <G4UnitsTable.hh>
Definition at line 148 of file G4UnitsTable.hh.
◆ G4BestUnit() [1/2]
Definition at line 428 of file G4UnitsTable.cc.
433 size_t nbCat = theUnitsTable.size();
435 while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
438 G4cout <<
" G4BestUnit: the category " << category
439 <<
" does not exist !!" <<
G4endl;
440 G4Exception(
"G4BestUnit::G4BestUnit()",
"InvalidCall",
std::vector< G4UnitsCategory * > G4UnitsTable
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4UnitsTable & GetUnitsTable()
◆ G4BestUnit() [2/2]
Definition at line 452 of file G4UnitsTable.cc.
457 size_t nbCat = theUnitsTable.size();
459 while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
462 G4cerr <<
" G4BestUnit: the category " << category
463 <<
" does not exist." <<
G4endl;
464 G4Exception(
"G4BestUnit::G4BestUnit()",
"InvalidCall",
468 Value[0] = value.x();
469 Value[1] = value.y();
470 Value[2] = value.z();
std::vector< G4UnitsCategory * > G4UnitsTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4UnitsTable & GetUnitsTable()
G4GLOB_DLL std::ostream G4cerr
◆ ~G4BestUnit()
G4BestUnit::~G4BestUnit |
( |
| ) |
|
◆ GetCategory()
const G4String& G4BestUnit::GetCategory |
( |
| ) |
const |
|
inline |
◆ GetIndexOfCategory()
size_t G4BestUnit::GetIndexOfCategory |
( |
| ) |
const |
|
inline |
◆ GetValue()
◆ operator G4String()
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
flux, |
|
|
G4BestUnit |
VU |
|
) |
| |
|
friend |
Definition at line 489 of file G4UnitsTable.cc.
494 G4int len = theUnitsTable[
a.IndexOfCategory]->GetSymbMxLen();
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; }
524 for (
G4int j=0; j<
a.nbOfVals; j++)
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
◆ Category
◆ IndexOfCategory
size_t G4BestUnit::IndexOfCategory |
|
private |
◆ nbOfVals
G4int G4BestUnit::nbOfVals |
|
private |
◆ Value
The documentation for this class was generated from the following files: