#include <ALIUnitsTable.h>
Definition at line 138 of file ALIUnitsTable.h.
ALIBestUnit::ALIBestUnit |
( |
const CLHEP::Hep3Vector & |
internalValue, |
|
|
ALIstring |
category |
|
) |
| |
ALIBestUnit::~ALIBestUnit |
( |
| ) |
|
size_t ALIBestUnit::GetIndexOfCategory |
( |
| ) |
const |
|
inline |
std::ostream& operator<< |
( |
std::ostream & |
flux, |
|
|
ALIBestUnit |
VU |
|
) |
| |
|
friend |
Definition at line 359 of file ALIUnitsTable.cc.
364 ALIint len = theUnitsTable[
a.IndexOfCategory]->GetSymbMxLen();
366 ALIint ksup(-1), kinf(-1);
374 for (
size_t k=0;
k<List.size();
k++)
377 if (value==1.E12) {
if(unit>umax) {umax=
unit; ksup=
k;}}
378 else if (value<=-1.E12) {
if(unit<umin) {umin=
unit; kinf=
k;}}
381 if ((ratio>=1.)&&(ratio<rsup)) {rsup=
ratio; ksup=
k;}
382 if ((ratio< 1.)&&(ratio>rinf)) {rinf=
ratio; kinf=
k;}
386 ALIint index=ksup;
if(index==-1) index=kinf;
if(index==-1) index=0;
388 for (
ALIint j=0; j<
a.nbOfVals; j++)
389 {flux <<
a.Value[j]/(List[
index]->GetValue()) <<
" ";}
391 #ifdef ALIUSE_STD_NAMESPACE 392 std::ios::fmtflags oldform =
std::cout.flags();
397 flux.setf(std::ios::left,std::ios::adjustfield);
398 flux << std::setw(len) << List[
index]->GetSymbol();
std::vector< ALIUnitsCategory * > ALIUnitsTable
Abs< T >::type abs(const T &t)
std::vector< std::shared_ptr< ALIUnitDefinition >> ALIUnitsContainer
static ALIUnitsTable & GetUnitsTable()
size_t ALIBestUnit::IndexOfCategory |
|
private |