3 #include "CLHEP/Units/GlobalSystemOfUnits.h" 79 for (
size_t j = 0;
j <
units.size();
j++) {
81 symbol =
units[
j]->GetSymbol();
83 return units[
j]->GetValue();
86 std::cout <<
"Warning from CocoaUnitDefinition::GetValueOf(" <<
str <<
")." 87 <<
" The unit " <<
str <<
" does not exist in UnitsTable." 88 <<
" Return Value = 0." << std::endl;
100 for (
size_t j = 0;
j <
units.size();
j++) {
102 symbol =
units[
j]->GetSymbol();
107 std::cout <<
"Warning from CocoaUnitDefinition::GetCategory(" <<
str <<
")." 108 <<
" The unit " <<
str <<
" does not exist in UnitsTable." 109 <<
" Return category = None" << std::endl;
240 std::cout <<
"\n ----- The Table of Units ----- \n";
261 if (
this != &right) {
291 if (theUnitsTable.empty())
293 size_t nbCat = theUnitsTable.size();
295 while ((
i < nbCat) && (theUnitsTable[
i]->GetName() !=
category))
298 std::cout <<
" CocoaBestUnit: the category " <<
category <<
" does not exist !!" << nbCat << std::endl;
321 size_t nbCat = theUnitsTable.size();
323 while ((
i < nbCat) && (theUnitsTable[
i]->GetName() !=
category))
326 std::cerr <<
" CocoaBestUnit: the category " <<
category <<
" does not exist." << std::endl;
345 ALIint len = theUnitsTable[
a.IndexOfCategory]->GetSymbMxLen();
347 ALIint ksup(-1), kinf(-1);
354 for (
size_t k = 0;
k < List.size();
k++) {
388 flux <<
a.Value[
j] / (List[
index]->GetValue()) <<
" ";
391 std::ios::fmtflags oldform = flux.flags();
393 flux.setf(std::ios::left, std::ios::adjustfield);
394 flux << std::setw(len) << List[
index]->GetSymbol();
std::vector< CocoaUnitDefinition * > CocoaUnitsContainer
CocoaUnitsContainer UnitsList
static ALIstring GetCategory(const ALIstring &)
static void BuildUnitsTable()
CocoaUnitsCategory(const ALIstring &name)
static CocoaUnitsTable & GetUnitsTable()
constexpr double joule(6.24150e+12)
CocoaUnitsCategory & operator=(const CocoaUnitsCategory &)
std::ostream & operator<<(std::ostream &flux, CocoaBestUnit a)
static void PrintUnitsTable()
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)
CocoaUnitDefinition(const ALIstring &name, const ALIstring &symbol, const ALIstring &category, ALIdouble value)
CocoaUnitDefinition & operator=(const CocoaUnitDefinition &)
ALIint operator==(const CocoaUnitDefinition &) const
Abs< T >::type abs(const T &t)
reco::JetExtendedAssociation::JetExtendedData Value
CocoaBestUnit(ALIdouble internalValue, const ALIstring &category)
std::vector< CocoaUnitsCategory * > CocoaUnitsTable
Basic3DVector unit() const
const ALIstring & GetName() const
ALIint operator!=(const CocoaUnitsCategory &) const
static CocoaUnitsTable theUnitsTable
static ALIdouble GetValueOf(const ALIstring &)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
TString units(TString variable, Char_t axis)
ALIint operator!=(const CocoaUnitDefinition &) const
ALIint operator==(const CocoaUnitsCategory &) const