StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGlobals.hh
1 /***************************************************************************
2  *
3  * $Id: StGlobals.hh,v 1.3 1999/12/21 15:14:03 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, 1998
6  ***************************************************************************
7  *
8  * Description:
9  * Global Constants and typedefs
10  *
11  ***************************************************************************
12  *
13  * $Log: StGlobals.hh,v $
14  * Revision 1.3 1999/12/21 15:14:03 ullrich
15  * Modified to cope with new compiler version on Sun (CC5.0).
16  *
17  * Revision 1.2 1999/11/09 16:20:08 ullrich
18  * Include stdcomp.h only for SUN.
19  *
20  * Revision 1.1 1999/01/30 03:59:02 fisyak
21  * Root Version of StarClassLibrary
22  *
23  * Revision 1.1 1999/01/23 00:27:48 ullrich
24  * Initial Revision
25  *
26  **************************************************************************/
27 #ifndef ST_GLOBALS_HH
28 #define ST_GLOBALS_HH
29 
30 #if defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500
31 #include <stdcomp.h>
32 #endif
33 
34 // **** You should probably not touch anything below this line: ****
35 
36 //
37 // Typedefs for numeric types
38 // for synchronisation with CLHEP
39 //
40 typedef double HepDouble;
41 typedef int HepInt;
42 typedef float HepFloat;
43 typedef bool HepBoolean;
44 
45 //
46 // Typedefs for numeric types
47 // for synchronisation with STAR
48 //
49 typedef double StDouble;
50 typedef float StFloat;
51 typedef int StInt;
52 typedef bool StBool;
53 typedef long StLong;
54 typedef unsigned short StUshort;
55 typedef unsigned int StSizeType;
56 
57 //
58 // Global macros
59 //
60 #define StNPOS (~(StSizeType)0)
61 
62 //
63 // Global templates
64 //
65 template<class T>
66 inline StInt sign(T a) { return a < 0 ? -1 : 1; }
67 
68 template<class T>
69 inline StDouble sqr(T a) { return a*a; }
70 
71 //
72 // Macros for debugging and testing
73 //
74 #define PR(x) cout << (#x) << " = " << (x) << endl;
75 
76 //
77 // Include physical constants and system of units
78 //
79 //#include "PhysicalConstants.h"
80 
81 #endif
82 
83 
84 
85 
86