#include <G4UnitsTable.hh>
Definition at line 173 of file G4UnitsTable.hh.
Definition at line 484 of file G4UnitsTable.cc.
489 size_t nbCat = theUnitsTable.size();
491 while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
494 G4cout <<
" G4BestUnit: the category " << category
495 <<
" does not exist !!" <<
G4endl;
496 G4Exception(
"G4BestUnit::G4BestUnit()",
"InvalidCall",
std::vector< G4UnitsCategory * > G4UnitsTable
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4UnitsTable & GetUnitsTable()
Definition at line 508 of file G4UnitsTable.cc.
513 size_t nbCat = theUnitsTable.size();
515 while ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) { i++; }
518 G4cerr <<
" G4BestUnit: the category " << category
519 <<
" does not exist." <<
G4endl;
520 G4Exception(
"G4BestUnit::G4BestUnit()",
"InvalidCall",
524 Value[0] =
value.x();
525 Value[1] =
value.y();
526 Value[2] =
value.z();
std::vector< G4UnitsCategory * > G4UnitsTable
const XML_Char int const XML_Char * value
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4UnitsTable & GetUnitsTable()
G4GLOB_DLL std::ostream G4cerr
G4BestUnit::~G4BestUnit |
( |
| ) |
|
const G4String& G4BestUnit::GetCategory |
( |
| ) |
const |
|
inline |
size_t G4BestUnit::GetIndexOfCategory |
( |
| ) |
const |
|
inline |
std::ostream& operator<< |
( |
std::ostream & |
flux, |
|
|
G4BestUnit |
VU |
|
) |
| |
|
friend |
Definition at line 545 of file G4UnitsTable.cc.
550 G4int len = theUnitsTable[
a.IndexOfCategory]->GetSymbMxLen();
552 G4int ksup(-1), kinf(-1);
558 std::fabs(
a.Value[1])),
559 std::fabs(
a.Value[2]));
561 for (
size_t k=0; k<List.size(); k++)
563 G4double unit = List[k]->GetValue();
565 {
if(unit>umax) {umax=unit; ksup=k;}}
567 {
if(unit<umin) {umin=unit; kinf=k;}}
571 if ((ratio>=1.)&&(ratio<rsup)) {rsup=ratio; ksup=k;}
572 if ((ratio< 1.)&&(ratio>rinf)) {rinf=ratio; kinf=k;}
577 if(index==-1) { index=kinf; }
578 if(index==-1) { index=0; }
580 for (
G4int j=0; j<
a.nbOfVals; j++)
581 { flux <<
a.Value[j]/(List[index]->GetValue()) <<
" "; }
583 std::ios::fmtflags oldform = flux.flags();
586 flux << std::setw(len) << List[index]->GetSymbol();
std::vector< ExP01TrackerHit * > a
std::vector< G4UnitsCategory * > G4UnitsTable
const XML_Char int const XML_Char * value
static G4UnitsTable & GetUnitsTable()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
std::vector< G4UnitDefinition * > G4UnitsContainer
The documentation for this class was generated from the following files: