Back to index

cool.h

 
//----------------------------------------------------------------------------- 
//  $Header: /tmp_mnt/asis/offline/ceres/cool/project/RCS/cool.h,v 2.2 1996/12/14 11:08:49 messer Exp messer $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Standard COOL header file. 
// 
//----------------------------------------------------------------------------- 
#ifndef COOL_H 
#define COOL_H 
 
#pragma COPYRIGHT "Copyright (C) CERES collaboration, 1996" 
 
// 
//  RogueWave setup 
// 
#define RW_NO_STL		1 
//#define RW_NO_CONST_OVERLOAD	1 
 
#include <rw/compiler.h> 
#include <rw/cstring.h> 
#include <rw/rwdate.h> 
#include <rw/rwtime.h> 
 
// 
//  Path definitions 
// 
#define C_DEFAULT_SETUP_PATH "./config/" 
 
// 
//  Debug macro 
// 
#define PR(x) cerr << #x << " = " << x << endl; 
 
// 
//  Macros 
// 
#define False 0 
#define True  1 
 
// 
//  Global type definitions 
// 
typedef unsigned long CWord; 
typedef RWCString     CString; 
typedef RWBoolean     CBoolean; 
typedef RWDate        CDate; 
typedef RWTime        CTime; 
typedef int           CLabelId; 
 
// 
//  Constants 
// 
const double Pi           = 3.14159265358979; 
const double TwoPi        = 2*Pi; 
const double ToRadian     = Pi/180.; 
const double ToDegree     = 180./Pi; 
const double ElectronMass = .51099906e-3; 
const double PionMass     = .1395675; 
 
// 
//  Base exception class 
// 
class CException {}; 
 
// 
//  General purpose functions 
// 
template<class T> void	CPromptValue(const char*, T&); 
template<class T> T	CGetDefaultValue(const char*, const char*, const T&); 
template<class T> void	CGetDefaultValue(const char*, const char*, T*, const int); 
double			CProbKolmogorov(const double); 
 
void                    reverse4Bytes(char [4]); // defined in CDataStream.h 
 
// 
// here follow the machine/compiler specific modifications/additions: 
// 
 
#ifdef __SUNPRO_CC 
// supply missing math functions 
inline double abs(double a) { return (a < 0)? -a : a; } 
 
// include template implementations 
#include "CGetDefaultValue.C" 
#endif /* __SUNPRO_CC */ 
 
#if defined __GNUC__ 
// supply missing math functions 
inline double abs(double a) { return (a < 0)? -a : a; } 
 
// include template implementations 
#include "CGetDefaultValue.C" 
#endif /* __GNUC__ */ 
 
#endif /* COOL_H */ 
 

Back to index