|
evio
6.0
|
These routines handle swapping the endianness (little <-> big) of evio data. More...
Macros | |
| #define | EVIO_SWAP64(x) |
| #define | EVIO_SWAP32(x) |
| #define | EVIO_SWAP16(x) |
| #define | EVIO_TO_64_BITS(low, high) |
| Calculate a 64 bit result from 2 32 bit inputs. More... | |
Functions | |
| int | evioIsLocalHostBigEndian () |
| Is the local host big endian? More... | |
| uint64_t | evioToLongWord (uint32_t word1, uint32_t word2, int needToSwap) |
| Take 2, 32 bit words and change that into a 64 bit word, taking endianness and swapping into account. More... | |
| void | evioSwapFileHeaderV6 (uint32_t *header) |
| Swap an evio version 6 file header in place (but not the following index arrary, etc). More... | |
| void | evioSwapRecordHeaderV6 (uint32_t *header) |
| Swap an evio version 6 record header in place (but not the following index arrary, etc). More... | |
| void | evioswap (uint32_t *buf, int tolocal, uint32_t *dest) |
| Routine to swap the endianness of an evio event (bank). More... | |
| uint32_t * | swap_int32_t (uint32_t *data, unsigned int length, uint32_t *dest) |
| This routine swaps a buffer of 32 bit integers. More... | |
| uint64_t * | swap_int64_t (uint64_t *data, unsigned int length, uint64_t *dest) |
| This routine swaps a buffer of 64 bit integers. More... | |
| uint16_t * | swap_int16_t (uint16_t *data, unsigned int length, uint16_t *dest) |
| This routine swaps a buffer of 16 bit integers. More... | |
These routines handle swapping the endianness (little <-> big) of evio data.
| #define EVIO_SWAP16 | ( | x | ) |
Referenced by swap_int16_t().
| #define EVIO_SWAP32 | ( | x | ) |
Referenced by evioToLongWord(), evPrintBuffer(), evRead(), evReadNoCopy(), evReadRandom(), and swap_int32_t().
| #define EVIO_SWAP64 | ( | x | ) |
Referenced by swap_int64_t().
| #define EVIO_TO_64_BITS | ( | low, | |
| high | |||
| ) |
Calculate a 64 bit result from 2 32 bit inputs.
Referenced by evioToLongWord().
| int evioIsLocalHostBigEndian | ( | ) |
Is the local host big endian?
Referenced by evioToLongWord().
Routine to swap the endianness of an evio event (bank).
| buf | buffer of evio event data to be swapped |
| tolocal | if 0 buf contains data of same endian as local host, else buf has data of opposite endian |
| dest | buffer to place swapped data into. If this is NULL, then dest = buf. |
Referenced by evRead(), evReadNoCopy(), and evReadRandom().
| void evioSwapFileHeaderV6 | ( | uint32_t * | header | ) |
Swap an evio version 6 file header in place (but not the following index arrary, etc).
Nothing done for NULL arg.
| header | pointer to header |
References EV_HDSIZ_V6, and swap_int32_t().
| void evioSwapRecordHeaderV6 | ( | uint32_t * | header | ) |
Swap an evio version 6 record header in place (but not the following index arrary, etc).
Nothing done for NULL arg.
| header | pointer to header |
References EV_HDSIZ_V6, and swap_int32_t().
Take 2, 32 bit words and change that into a 64 bit word, taking endianness and swapping into account.
| word1 | word which occurs first in memory being read |
| word2 | word which occurs second in memory being read |
| needToSwap | true if word arguments are of an endian opposite to this host |
References EVIO_SWAP32, EVIO_TO_64_BITS, and evioIsLocalHostBigEndian().
This routine swaps a buffer of 16 bit integers.
| data | pointer to data to be swapped |
| length | number of 16 bit ints to be swapped |
| dest | pointer to where swapped data is to be copied to. If NULL, the data is swapped in place. |
References EVIO_SWAP16.
This routine swaps a buffer of 32 bit integers.
| data | pointer to data to be swapped |
| length | number of 32 bit ints to be swapped |
| dest | pointer to where swapped data is to be copied to. If NULL, the data is swapped in place. |
References EVIO_SWAP32.
Referenced by evioSwapFileHeaderV6(), and evioSwapRecordHeaderV6().
This routine swaps a buffer of 64 bit integers.
| data | pointer to data to be swapped |
| length | number of 64 bit ints to be swapped |
| dest | pointer to where swapped data is to be copied to. If NULL, the data is swapped in place. |
References EVIO_SWAP64.