3 #include "CLHEP/Units/GlobalSystemOfUnits.h"
14 : Name(name),SymbolName(symbol),
Value(value)
63 return (
this == &right);
70 return (
this != &right);
80 for (
size_t j=0;
j<units.size();
j++)
81 { name=units[
j]->GetName(); symbol=units[
j]->GetSymbol();
82 if(stri==name||stri==symbol)
83 return units[
j]->GetValue();
86 std::cout <<
"Warning from ALIUnitDefinition::GetValueOf(" << stri <<
")."
87 <<
" The unit " << stri <<
" does not exist in UnitsTable."
88 <<
" Return Value = 0." << std::endl;
100 for (
size_t j=0;
j<units.size();
j++)
101 { name=units[
j]->GetName(); symbol=units[
j]->GetSymbol();
102 if(stri==name||stri==symbol)
106 std::cout <<
"Warning from ALIUnitDefinition::GetCategory(" << stri <<
")."
107 <<
" The unit " << stri <<
" does not exist in UnitsTable."
108 <<
" Return category = None" << std::endl;
244 std::cout <<
"\n ----- The Table of Units ----- \n";
252 :Name(name),NameMxLen(0),SymbMxLen(0)
287 return (
this == &right);
294 return (
this != &right);
312 size_t nbCat = theUnitsTable.size();
315 ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) i++;
317 {
std::cout <<
" ALIBestUnit: the category " << category
318 <<
" does not exist !!" << std::endl;
319 std::cerr <<
"Missing unit category !" << std::endl;
334 size_t nbCat = theUnitsTable.size();
337 ((i<nbCat)&&(theUnitsTable[i]->GetName()!=category)) i++;
339 {
std::cerr <<
" ALIBestUnit: the category " << category
340 <<
" does not exist." << std::endl;
341 std::cerr <<
"Unit category not existing !" << std::endl;
347 Value[0] = value.x();
348 Value[1] = value.y();
349 Value[2] = value.z();
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();
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()
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()