Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
swap_bank.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define swap64(x)
 
#define swap32(x)
 
#define swap16(x)
 

Functions

uint32_t swap_bank (uint32_t *outbuff, uint32_t *inbuff, uint32_t len)
 
uint32_t swap_tagsegment (uint32_t *outbuff, uint32_t *inbuff, uint32_t len)
 
uint32_t swap_segment (uint32_t *outbuff, uint32_t *inbuff, uint32_t len)
 
void swap_block (uint16_t *inbuff, uint16_t len, uint16_t *outbuff)
 
void swap_block (uint32_t *inbuff, uint32_t len, uint32_t *outbuff)
 
void swap_block (uint64_t *inbuff, uint64_t len, uint64_t *outbuff)
 

Macro Definition Documentation

#define swap16 (   x)
Value:
( (((x) >> 8) & 0x00FF) | \
(((x) << 8) & 0xFF00) )
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39

Definition at line 32 of file swap_bank.h.

Referenced by swap_block().

#define swap32 (   x)
Value:
( (((x) >> 24) & 0x000000FF) | \
(((x) >> 8) & 0x0000FF00) | \
(((x) << 8) & 0x00FF0000) | \
(((x) << 24) & 0xFF000000) )
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39

Definition at line 27 of file swap_bank.h.

Referenced by swap_block().

#define swap64 (   x)
Value:
( (((x) >> 56) & 0x00000000000000FFL) | \
(((x) >> 40) & 0x000000000000FF00L) | \
(((x) >> 24) & 0x0000000000FF0000L) | \
(((x) >> 8) & 0x00000000FF000000L) | \
(((x) << 8) & 0x000000FF00000000L) | \
(((x) << 24) & 0x0000FF0000000000L) | \
(((x) << 40) & 0x00FF000000000000L) | \
(((x) << 56) & 0xFF00000000000000L) )
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39

Definition at line 18 of file swap_bank.h.

Referenced by swap_block().

Function Documentation

uint32_t swap_bank ( uint32_t *  outbuff,
uint32_t *  inbuff,
uint32_t  len 
)

Swap an EVIO bank. If the bank contains data, it is automatically swapped according to it's type. If the bank is a container of other containers, then this repeatedly calls the swapper methods for the appropriate container type (bank, tagsegment, segment). This means that this method will be recursive in the cases where it is a bank of banks.

Definition at line 15 of file swap_bank.cc.

References swap_bank(), swap_block(), swap_segment(), and swap_tagsegment().

Referenced by HDET::read(), DEVIOWorkerThread::Run(), and swap_bank().

void swap_block ( uint16_t *  inbuff,
uint16_t  len,
uint16_t *  outbuff 
)
inline

Definition at line 45 of file swap_bank.h.

References swap16.

Referenced by swap_bank(), swap_segment(), and swap_tagsegment().

void swap_block ( uint32_t *  inbuff,
uint32_t  len,
uint32_t *  outbuff 
)
inline

Definition at line 55 of file swap_bank.h.

References swap32.

void swap_block ( uint64_t *  inbuff,
uint64_t  len,
uint64_t *  outbuff 
)
inline

Definition at line 65 of file swap_bank.h.

References swap64.

uint32_t swap_segment ( uint32_t *  outbuff,
uint32_t *  inbuff,
uint32_t  len 
)

Swap an EVIO segment.

Definition at line 152 of file swap_bank.cc.

References swap_block().

Referenced by swap_bank().

uint32_t swap_tagsegment ( uint32_t *  outbuff,
uint32_t *  inbuff,
uint32_t  len 
)

Swap an EVIO tagsegment.

Definition at line 102 of file swap_bank.cc.

References swap_block().

Referenced by swap_bank().