3 #include "CLHEP/Units/GlobalSystemOfUnits.h"
15 : Name(name),SymbolName(symbol),
Value(value)
64 return (
this == &right);
71 return (
this != &right);
81 for (
size_t j=0;
j<units.size();
j++)
82 { name=units[
j]->GetName(); symbol=units[
j]->GetSymbol();
83 if(stri==name||stri==symbol)
84 return units[
j]->GetValue();
87 std::cout <<
"Warning from ALIUnitDefinition::GetValueOf(" << stri <<
")."
88 <<
" The unit " << stri <<
" does not exist in UnitsTable."
89 <<
" Return Value = 0." << std::endl;
101 for (
size_t j=0;
j<units.size();
j++)
102 { name=units[
j]->GetName(); symbol=units[
j]->GetSymbol();
103 if(stri==name||stri==symbol)
107 std::cout <<
"Warning from ALIUnitDefinition::GetCategory(" << stri <<
")."
108 <<
" The unit " << stri <<
" does not exist in UnitsTable."
109 <<
" Return category = None" << std::endl;
245 std::cout <<
"\n ----- The Table of Units ----- \n";
253 :Name(name),NameMxLen(0),SymbMxLen(0)
288 return (
this == &right);
295 return (
this != &right);
313 size_t nbCat = theUnitsTable.size();
316 ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) i++;
318 {
std::cout <<
" ALIBestUnit: the category " << category
319 <<
" does not exist !!" << std::endl;
320 std::cerr <<
"Missing unit category !" << std::endl;
335 size_t nbCat = theUnitsTable.size();
338 ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) i++;
340 {
std::cerr <<
" ALIBestUnit: the category " << category
341 <<
" does not exist." << std::endl;
342 std::cerr <<
"Unit category not existing !" << std::endl;
348 Value[0] = value.x();
349 Value[1] = value.y();
350 Value[2] = value.z();
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;
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();
ALIstring GetName() const
ALIint operator==(const ALIUnitDefinition &) const
std::vector< ALIUnitsCategory * > ALIUnitsTable
ALIUnitDefinition & operator=(const ALIUnitDefinition &)
std::vector< ALIUnitDefinition * > ALIUnitsContainer
ALIint operator!=(const ALIUnitDefinition &) const
ALIBestUnit(ALIdouble internalValue, ALIstring category)
ALIUnitDefinition(ALIstring name, ALIstring symbol, ALIstring category, ALIdouble value)
static ALIstring GetCategory(ALIstring)
ALIUnitsContainer UnitsList
std::ostream & operator<<(std::ostream &out, const ALILine &li)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
U second(std::pair< T, U > const &p)
ALIint operator==(const ALIUnitsCategory &) const
ALIUnitsCategory & operator=(const ALIUnitsCategory &)
static void PrintUnitsTable()
Abs< T >::type abs(const T &t)
ALIUnitsCategory(ALIstring name)
reco::JetExtendedAssociation::JetExtendedData Value
static void BuildUnitsTable()
ALIint operator!=(const ALIUnitsCategory &) const
static ALIdouble GetValueOf(ALIstring)
TString units(TString variable, Char_t axis)
static ALIUnitsTable theUnitsTable
static ALIUnitsTable & GetUnitsTable()