ROOTANA
Macros | Typedefs | Functions | Variables
TMidasEvent.cxx File Reference
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#include "TMidasEvent.h"
#include "midasio.h"
Include dependency graph for TMidasEvent.cxx:

Go to the source code of this file.

Macros

#define QWORD_SWAP(x)
 
#define DWORD_SWAP(x)
 
#define WORD_SWAP(x)
 

Typedefs

typedef uint8_t BYTE
 

Functions

bool TMReadEvent (TMReaderInterface *reader, TMidasEvent *event)
 
bool TMWriteEvent (TMWriterInterface *writer, TMidasEvent *event)
 

Variables

static const unsigned TID_SIZE [] = {0, 1, 1, 1, 2, 2, 4, 4, 4, 4, 8, 1, 0, 0, 0, 0, 0, 8, 8}
 
static const unsigned TID_MAX = (sizeof(TID_SIZE)/sizeof(TID_SIZE[0]))
 

Macro Definition Documentation

◆ DWORD_SWAP

#define DWORD_SWAP (   x)
Value:
{ BYTE _tmp; \
_tmp= *((BYTE *)(x)); \
*((BYTE *)(x)) = *(((BYTE *)(x))+3); \
*(((BYTE *)(x))+3) = _tmp; \
_tmp= *(((BYTE *)(x))+1); \
*(((BYTE *)(x))+1) = *(((BYTE *)(x))+2); \
*(((BYTE *)(x))+2) = _tmp; }
uint8_t BYTE

Byte swapping routine.

Definition at line 590 of file TMidasEvent.cxx.

◆ QWORD_SWAP

#define QWORD_SWAP (   x)
Value:
{ BYTE _tmp; \
_tmp= *((BYTE *)(x)); \
*((BYTE *)(x)) = *(((BYTE *)(x))+7); \
*(((BYTE *)(x))+7) = _tmp; \
_tmp= *(((BYTE *)(x))+1); \
*(((BYTE *)(x))+1) = *(((BYTE *)(x))+6); \
*(((BYTE *)(x))+6) = _tmp; \
_tmp= *(((BYTE *)(x))+2); \
*(((BYTE *)(x))+2) = *(((BYTE *)(x))+5); \
*(((BYTE *)(x))+5) = _tmp; \
_tmp= *(((BYTE *)(x))+3); \
*(((BYTE *)(x))+3) = *(((BYTE *)(x))+4); \
*(((BYTE *)(x))+4) = _tmp; }

Byte swapping routine.

Definition at line 574 of file TMidasEvent.cxx.

◆ WORD_SWAP

#define WORD_SWAP (   x)
Value:
{ BYTE _tmp; \
_tmp= *((BYTE *)(x)); \
*((BYTE *)(x)) = *(((BYTE *)(x))+1); \
*(((BYTE *)(x))+1) = _tmp; }

Byte swapping routine.

Definition at line 600 of file TMidasEvent.cxx.

Typedef Documentation

◆ BYTE

typedef uint8_t BYTE

Definition at line 570 of file TMidasEvent.cxx.

Function Documentation

◆ TMReadEvent()

bool TMReadEvent ( TMReaderInterface reader,
TMidasEvent event 
)

Definition at line 734 of file TMidasEvent.cxx.

Here is the call graph for this function:

◆ TMWriteEvent()

bool TMWriteEvent ( TMWriterInterface writer,
TMidasEvent event 
)

Definition at line 777 of file TMidasEvent.cxx.

Here is the call graph for this function:

Variable Documentation

◆ TID_MAX

const unsigned TID_MAX = (sizeof(TID_SIZE)/sizeof(TID_SIZE[0]))
static

Definition at line 163 of file TMidasEvent.cxx.

◆ TID_SIZE

const unsigned TID_SIZE[] = {0, 1, 1, 1, 2, 2, 4, 4, 4, 4, 8, 1, 0, 0, 0, 0, 0, 8, 8}
static

Definition at line 162 of file TMidasEvent.cxx.