checkmate is hosted by Hepforge, IPPP Durham
Units.cc
Go to the documentation of this file.
1 #include "Units.h"
2 
3 namespace units {
4  double strToUnit(std::string unit) {
5  if (unit == "KB") return KB;
6  else if (unit == "B") return B;
7  else if (unit == "MB") return MB;
8  else if (unit == "MUB") return MUB;
9  else if (unit == "NB") return NB;
10  else if (unit == "PB") return PB;
11  else if (unit == "FB") return FB;
12  else if (unit == "AB") return AB;
13  else if (unit == "ZB") return ZB;
14  else if (unit == "INVKB") return INVKB;
15  else if (unit == "INVB") return INVB;
16  else if (unit == "INVMB") return INVMB;
17  else if (unit == "INVMUB") return INVMUB;
18  else if (unit == "INVNB") return INVNB;
19  else if (unit == "INVPB") return INVPB;
20  else if (unit == "INVFB") return INVFB;
21  else if (unit == "INVAB") return INVAB;
22  else if (unit == "INVZB") return INVZB;
23  else {std::cerr << "Unit unknown!" << std::endl; exit(1);}
24  }
25 }
const double MUB
Definition: Units.h:11
const double INVB
Definition: Units.h:12
const double INVAB
Definition: Units.h:12
double strToUnit(std::string unit)
Returns the factor that corresponds to a given unit.
Definition: Units.cc:4
const double INVNB
Definition: Units.h:12
const double INVPB
Definition: Units.h:12
const double B
Definition: Units.h:11
const double ZB
Definition: Units.h:11
const double INVFB
Definition: Units.h:12
const double FB
Definition: Units.h:11
const double INVMB
Definition: Units.h:12
const double AB
Definition: Units.h:11
const double KB
Definition: Units.h:11
const double NB
Definition: Units.h:11
const double PB
Definition: Units.h:11
const double MB
Definition: Units.h:11
const double INVZB
Definition: Units.h:12
const double INVMUB
Definition: Units.h:12
const double INVKB
Definition: Units.h:12