28 for (
int k=0; k<6; k++) {
37 static const int UNSET = -1;
70 "Cannot determine byte-ordering of doubles on this system");
74 "Confusion in byte-ordering of doubles on this system");
86 std::ostringstream
ss;
87 for (
int i=0; i<8; ++i) {
89 ss << std::hex << std::setw(2) << std::setfill(
'0') << (
int)db.
b[k];
95 std::vector<unsigned long> v(2);
99 v[0] = ((
static_cast<unsigned long>(db.
b[
byte_order[0]])) << 24)
100 | ((static_cast<unsigned long>(db.
b[
byte_order[1]])) << 16)
101 | ((
static_cast<unsigned long>(db.
b[
byte_order[2]])) << 8)
102 | ((static_cast<unsigned long>(db.
b[
byte_order[3]])) );
103 v[1] = ((
static_cast<unsigned long>(db.
b[
byte_order[4]])) << 24)
104 | ((static_cast<unsigned long>(db.
b[
byte_order[5]])) << 16)
105 | ((
static_cast<unsigned long>(db.
b[
byte_order[6]])) << 8)
106 | ((static_cast<unsigned long>(db.
b[
byte_order[7]])) );
112 unsigned char bytes[8];
114 bytes[0] =
static_cast<unsigned char>((v[0] >> 24) & 0xFF);
115 bytes[1] =
static_cast<unsigned char>((v[0] >> 16) & 0xFF);
116 bytes[2] =
static_cast<unsigned char>((v[0] >> 8) & 0xFF);
117 bytes[3] =
static_cast<unsigned char>((v[0] ) & 0xFF);
118 bytes[4] =
static_cast<unsigned char>((v[1] >> 24) & 0xFF);
119 bytes[5] =
static_cast<unsigned char>((v[1] >> 16) & 0xFF);
120 bytes[6] =
static_cast<unsigned char>((v[1] >> 8) & 0xFF);
121 bytes[7] =
static_cast<unsigned char>((v[1] ) & 0xFF);
122 for (
int i=0; i<8; ++i) {
static CLHEP_THREAD_LOCAL int byte_order[8]
static CLHEP_THREAD_LOCAL bool byte_order_known
static double longs2double(const std::vector< unsigned long > &v)
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
static std::vector< unsigned long > dto2longs(double d)
#define CLHEP_THREAD_LOCAL
static std::string d2x(double d)
static void fill_byte_order()