3 #include <CLHEP/Units/SystemOfUnits.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;
125 using namespace CLHEP;
241 std::cout <<
"\n ----- The Table of Units ----- \n";
262 if (
this != &right) {
292 if (theUnitsTable.empty())
294 size_t nbCat = theUnitsTable.size();
296 while ((
i < nbCat) && (theUnitsTable[
i]->GetName() !=
category))
299 std::cout <<
" CocoaBestUnit: the category " <<
category <<
" does not exist !!" << nbCat << std::endl;
322 size_t nbCat = theUnitsTable.size();
324 while ((
i < nbCat) && (theUnitsTable[
i]->GetName() !=
category))
327 std::cerr <<
" CocoaBestUnit: the category " <<
category <<
" does not exist." << std::endl;
346 ALIint len = theUnitsTable[
a.IndexOfCategory]->GetSymbMxLen();
348 ALIint ksup(-1), kinf(-1);
355 for (
size_t k = 0;
k < List.size();
k++) {
371 if ((ratio >= 1.) && (ratio < rsup)) {
375 if ((ratio < 1.) && (ratio > rinf)) {
389 flux <<
a.Value[
j] / (List[
index]->GetValue()) <<
" ";
392 std::ios::fmtflags oldform = flux.flags();
394 flux.setf(std::ios::left, std::ios::adjustfield);
395 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