Hello,
I am running ROOT 4.04/02g on Mac OS 10.4.7. I am writing code to analyze list-mode gamma spectra generated on a Windows PC. Consequently, the byte ordering in the binary file is different between the two platforms. Currently I process the binary file with a standalone C++ program, which uses the nonstandard C++ function “swab()” (compiled with gcc 4.0.0) to swap bytes rather elegantly in one line of code, and produce an intermediate file that is read by my ROOT application. The swab() method does not appear to be supported in ROOT.
I would like to read data from the binary files directly into my ROOT application. Does there exist a method in ROOT to swap bytes?
Thanks very much for any feedback.
Cheers,
Bryan