#include <DoubConv.h>
|
static std::vector< unsigned long > | dto2longs (double d) |
|
static double | longs2double (const std::vector< unsigned long > &v) |
|
static std::string | d2x (double d) |
|
Definition at line 29 of file DoubConv.h.
◆ d2x()
std::string CLHEP::DoubConv::d2x |
( |
double |
d | ) |
|
|
static |
Definition at line 86 of file DoubConv.cc.
90 std::ostringstream ss;
91 for (
int i=0; i<8; ++i) {
93 ss << std::hex << std::setw(2) << std::setfill(
'0') << (int)db.b[k];
static CLHEP_THREAD_LOCAL int byte_order[8]
static CLHEP_THREAD_LOCAL bool byte_order_known
static void fill_byte_order()
◆ dto2longs()
std::vector< unsigned long > CLHEP::DoubConv::dto2longs |
( |
double |
d | ) |
|
|
static |
Definition at line 98 of file DoubConv.cc.
99 std::vector<unsigned long>
v(2);
103 v[0] = ((
static_cast<unsigned long>(db.b[
byte_order[0]])) << 24)
104 | ((static_cast<unsigned long>(db.b[
byte_order[1]])) << 16)
105 | ((
static_cast<unsigned long>(db.b[
byte_order[2]])) << 8)
106 | ((static_cast<unsigned long>(db.b[
byte_order[3]])) );
107 v[1] = ((
static_cast<unsigned long>(db.b[
byte_order[4]])) << 24)
108 | ((static_cast<unsigned long>(db.b[
byte_order[5]])) << 16)
109 | ((
static_cast<unsigned long>(db.b[
byte_order[6]])) << 8)
110 | ((static_cast<unsigned long>(db.b[
byte_order[7]])) );
static CLHEP_THREAD_LOCAL int byte_order[8]
static CLHEP_THREAD_LOCAL bool byte_order_known
static void fill_byte_order()
◆ fill_byte_order()
void CLHEP::DoubConv::fill_byte_order |
( |
| ) |
|
|
staticprivate |
Definition at line 19 of file DoubConv.cc.
28 for (
int k=0; k<6; k++) {
41 static const int UNSET = -1;
73 throw DoubConvException(
74 "Cannot determine byte-ordering of doubles on this system");
77 throw DoubConvException(
78 "Confusion in byte-ordering of doubles on this system");
static CLHEP_THREAD_LOCAL int byte_order[8]
static CLHEP_THREAD_LOCAL bool byte_order_known
◆ longs2double()
double CLHEP::DoubConv::longs2double |
( |
const std::vector< unsigned long > & |
v | ) |
|
|
static |
Definition at line 114 of file DoubConv.cc.
116 unsigned char bytes[8];
118 bytes[0] =
static_cast<unsigned char>((
v[0] >> 24) & 0xFF);
119 bytes[1] =
static_cast<unsigned char>((
v[0] >> 16) & 0xFF);
120 bytes[2] =
static_cast<unsigned char>((
v[0] >> 8) & 0xFF);
121 bytes[3] =
static_cast<unsigned char>((
v[0] ) & 0xFF);
122 bytes[4] =
static_cast<unsigned char>((
v[1] >> 24) & 0xFF);
123 bytes[5] =
static_cast<unsigned char>((
v[1] >> 16) & 0xFF);
124 bytes[6] =
static_cast<unsigned char>((
v[1] >> 8) & 0xFF);
125 bytes[7] =
static_cast<unsigned char>((
v[1] ) & 0xFF);
126 for (
int i=0; i<8; ++i) {
static CLHEP_THREAD_LOCAL int byte_order[8]
static CLHEP_THREAD_LOCAL bool byte_order_known
static void fill_byte_order()
◆ byte_order
◆ byte_order_known
The documentation for this class was generated from the following files: