00001 /*************************************************************************** 00002 * 00003 * $Id: StGlobals.hh,v 1.3 1999/12/21 15:14:03 ullrich Exp $ 00004 * 00005 * Author: Thomas Ullrich, 1998 00006 *************************************************************************** 00007 * 00008 * Description: 00009 * Global Constants and typedefs 00010 * 00011 *************************************************************************** 00012 * 00013 * $Log: StGlobals.hh,v $ 00014 * Revision 1.3 1999/12/21 15:14:03 ullrich 00015 * Modified to cope with new compiler version on Sun (CC5.0). 00016 * 00017 * Revision 1.2 1999/11/09 16:20:08 ullrich 00018 * Include stdcomp.h only for SUN. 00019 * 00020 * Revision 1.1 1999/01/30 03:59:02 fisyak 00021 * Root Version of StarClassLibrary 00022 * 00023 * Revision 1.1 1999/01/23 00:27:48 ullrich 00024 * Initial Revision 00025 * 00026 **************************************************************************/ 00027 #ifndef ST_GLOBALS_HH 00028 #define ST_GLOBALS_HH 00029 00030 #if defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 00031 #include <stdcomp.h> 00032 #endif 00033 00034 // **** You should probably not touch anything below this line: **** 00035 00036 // 00037 // Typedefs for numeric types 00038 // for synchronisation with CLHEP 00039 // 00040 typedef double HepDouble; 00041 typedef int HepInt; 00042 typedef float HepFloat; 00043 typedef bool HepBoolean; 00044 00045 // 00046 // Typedefs for numeric types 00047 // for synchronisation with STAR 00048 // 00049 typedef double StDouble; 00050 typedef float StFloat; 00051 typedef int StInt; 00052 typedef bool StBool; 00053 typedef long StLong; 00054 typedef unsigned short StUshort; 00055 typedef unsigned int StSizeType; 00056 00057 // 00058 // Global macros 00059 // 00060 #define StNPOS (~(StSizeType)0) 00061 00062 // 00063 // Global templates 00064 // 00065 template<class T> 00066 inline StInt sign(T a) { return a < 0 ? -1 : 1; } 00067 00068 template<class T> 00069 inline StDouble sqr(T a) { return a*a; } 00070 00071 // 00072 // Macros for debugging and testing 00073 // 00074 #define PR(x) cout << (#x) << " = " << (x) << endl; 00075 00076 // 00077 // Include physical constants and system of units 00078 // 00079 //#include "PhysicalConstants.h" 00080 00081 #endif 00082 00083 00084 00085 00086
1.5.9