#include "AliHLTMUONUtils.h"
-/*TODO: fix this. Need a platform independant way of checking the endian encoding.
- * This does not want to work on Apple Mac OS compiler: i686-apple-darw
- * Handle this with #ifdef __APPLE__ ?
-#include <endian.h>
-#ifndef LITTLE_ENDIAN
-#error Handling of internal data for non little endian machines not yet implemented.
-#endif
-*/
-
#include <cstdlib>
#include <cassert>
#include <new>
int main(int argc, const char** argv)
{
+ // 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;
+ }
+
+
int numOfFiles = 0;
bool continueParse = false;
int returnCode = EXIT_SUCCESS;