+ // Test endianess of this machine during runtime and print warning if it is not
+ // little endian.
+ union
+ {
+ int dword;
+ char byte[4];
+ } endianTest;
+ endianTest.dword = 0x1;
+ if (endianTest.byte[0] != 0x1)
+ {
+ cerr << "!!!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!!!!" << endl;
+ cerr << "!!!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!!!!" << endl;
+ cerr << "!! !!" << endl;
+ cerr << "!! This is not a little endian machine, but dHLT raw data is normally !!" << endl;
+ cerr << "!! generated in little endian format. Unless you are looking at localy !!" << endl;
+ cerr << "!! created simulated data, then this program will not show you correct !!" << endl;
+ cerr << "!! output. !!" << endl;
+ cerr << "!! !!" << endl;
+ cerr << "!!!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!!!!" << endl;
+ cerr << "!!!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!!!!" << endl;
+ cerr << endl;
+ }
+
+