#include "Alignment/CocoaModel/interface/ALIUnitsTable.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"
#include <iomanip>
#include <cstdlib>
Go to the source code of this file.
std::ostream& operator<< |
( |
std::ostream & |
flux, |
|
|
ALIBestUnit |
a |
|
) |
| |
Definition at line 358 of file ALIUnitsTable.cc.
References gather_cfg::cout, ALIUnitDefinition::GetUnitsTable(), cmsHarvester::index, ALIBestUnit::IndexOfCategory, j, relval_steps::k, bookConverter::max, ALIBestUnit::nbOfVals, csvLumiCalc::unit, relativeConstraints::value, and ALIBestUnit::Value.
365 ALIint ksup(-1), kinf(-1);
373 for (
size_t k=0;
k<List.size();
k++)
376 if (value==1.E12) {
if(unit>umax) {umax=
unit; ksup=
k;}}
377 else if (value<=-1.E12) {
if(unit<umin) {umin=
unit; kinf=
k;}}
380 if ((ratio>=1.)&&(ratio<rsup)) {rsup=ratio; ksup=
k;}
381 if ((ratio< 1.)&&(ratio>rinf)) {rinf=ratio; kinf=
k;}
385 ALIint index=ksup;
if(index==-1) index=kinf;
if(index==-1) index=0;
388 {flux << a.
Value[
j]/(List[
index]->GetValue()) <<
" ";}
390 #ifdef ALIUSE_STD_NAMESPACE
391 std::ios::fmtflags oldform =
std::cout.flags();
396 flux.setf(std::ios::left,std::ios::adjustfield);
397 flux << std::setw(len) << List[
index]->GetSymbol();
std::vector< ALIUnitsCategory * > ALIUnitsTable
std::vector< ALIUnitDefinition * > ALIUnitsContainer
static ALIUnitsTable & GetUnitsTable()