Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ntypes.h
Go to the documentation of this file.
1 /*
2  * ntypes.h
3  *
4 */
5 
6 #ifndef ntypesH_INCLUDED
7 #define ntypesH_INCLUDED
8 
9 static const char sccsid_ntypesH[] = "@(#)ntypes.h\t5.2\tCreated 7/27/97 19:02:56, \tcompiled "__DATE__;
10 
11 /*
12  * This include file defines the basic types
13  * used to define the data structures written on E852 data tapes
14  * and elsewhere.
15  *
16  * int8, uint8 - 8 bit wide MSB integers (more commonly known as 'char')
17  * int16, uint16 - 16 bit wide MSB integers (usually 'short')
18  * int32, uint32 - 32 bit wide MSB integers (usually 'int')
19  * int64, uint64 - 64 bit wide MSB integers (on some systems 'long', on others 'long long')
20  *
21  * float32 - 32 bit wide IEEE-754 floating point numbers (usually C 'float', FORTRAN 'REAL')
22  * float64 - 64 bit wide IEEE-754 floating point numbers (usually C 'double', FORTRAN 'DOUBLE PRECISION')
23  *
24  * MSB means "big-endian", like SGI-MIPS, RS6000 and others.
25  * LSB means "little-endian", like Intel x86, WindowsNT and others.
26  *
27  * Read 'man math' for more details on IEEE-754 floating point numbers.
28  *
29 */
30 
31 #ifdef sgi
32 
33 /*
34  * SGI-only definitions
35 */
36 
37 typedef int int32;
38 typedef unsigned int uint32;
39 typedef long long int64;
40 typedef unsigned long long uint64;
41 
42 #else
43 
44 /*
45  * these definitions work for rs6000 under AIX 3.2.5, untested for others
46  * The IBM xlc compiler seem to understand 'long long', but it is not documented, so...
47 */
48 
49 typedef int int32;
50 typedef unsigned int uint32;
51 typedef long long int64;
52 typedef unsigned long long uint64;
53 
54 #endif
55 
56 typedef short int16;
57 typedef unsigned short uint16;
58 typedef char int8;
59 typedef unsigned char uint8;
60 
61 typedef float float32;
62 typedef double float64;
63 
64 /* These are the 'float' structures ... */
65 
66 typedef struct { float32 x,y,z; } vector3_t;
67 typedef struct { float32 t; vector3_t space; } vector4_t;
68 typedef struct { float32 rho,phi,z;} vector3cyl_t;
69 typedef struct { vector3cyl_t vert[8];} cylcoord_t;
70 typedef struct { vector3_t vert[8];} cartcoord_t;
71 
72 /* ... and their 'double' siblings */
73 
74 typedef struct { float64 x,y,z; } dvector3_t;
75 typedef struct { float64 t; dvector3_t space; } dvector4_t;
76 typedef struct { float64 rho,phi,z; } dvector3cyl_t;
77 typedef struct { dvector3cyl_t vert[8]; } dcylcoord_t;
78 typedef struct { dvector3_t vert[8]; } dcartcoord_t;
79 
80 
81 /*
82  * Kludge to get rid of the Particle_t without breaking everybody's code
83 */
84 
85 #include <particleType.h>
86 
87 
88 #endif
89 /* end file */
unsigned char uint8
Definition: ntypes.h:59
int int32
Definition: ntypes.h:49
float32 z
Definition: ntypes.h:66
unsigned long long uint64
Definition: ntypes.h:52
unsigned short uint16
Definition: ntypes.h:57
static const char sccsid_ntypesH[]
Definition: ntypes.h:9
char int8
Definition: ntypes.h:58
float64 z
Definition: ntypes.h:76
long long int64
Definition: ntypes.h:51
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39
#define y
double float64
Definition: ntypes.h:62
float64 t
Definition: ntypes.h:75
float float32
Definition: ntypes.h:61
short int16
Definition: ntypes.h:56
float32 z
Definition: ntypes.h:68
float64 z
Definition: ntypes.h:74
float32 t
Definition: ntypes.h:67
unsigned int uint32
Definition: ntypes.h:50