00001
00002
00003
00004
00005
00006
00007 #ifndef GEAR_GEAR_H
00008 #define GEAR_GEAR_H 1
00009
00010 #include <map>
00011 #include <vector>
00012 #include <string>
00013 #include <exception>
00014
00015
00016 namespace gear {
00017
00018
00019
00020 typedef std::pair<double,double> Point2D ;
00021 typedef std::vector<int> IntVec ;
00022 typedef std::vector<double> DoubleVec ;
00023 typedef std::vector<std::string> StringVec ;
00024
00025
00026
00032 class Exception : public std::exception {
00033
00034
00035 protected:
00036 std::string message ;
00037
00038 Exception(){ ; }
00039
00040 public:
00041 virtual ~Exception() throw() { ; }
00042
00043 Exception( const std::string& text ){
00044 message = "lcio::Exception: " + text ;
00045 }
00046
00047 virtual const char* what() const throw() { return message.c_str() ; }
00048
00049 };
00050
00051
00056 class ParseException : public Exception{
00057
00058 protected:
00059 ParseException() { ; }
00060 public:
00061 virtual ~ParseException() throw() { ; }
00062
00063 ParseException( std::string text ){
00064 message = "gear::ParseException: " + text ;
00065 }
00066 };
00067
00072 class NotImplementedException : public Exception{
00073
00074 protected:
00075 NotImplementedException() { ; }
00076
00077 public:
00078 NotImplementedException( std::string text ){
00079 message = "gear::NotImplementedException: " + text ;
00080 }
00081 virtual ~NotImplementedException() throw() { ; }
00082
00083 };
00084
00090 class UnknownParameterException : public Exception{
00091
00092 protected:
00093 UnknownParameterException() { ; }
00094
00095 public:
00096 UnknownParameterException( std::string text ){
00097 message = "gear::UnknownParameterException: " + text ;
00098 }
00099 virtual ~UnknownParameterException() throw() { ; }
00100
00101 };
00104 class GEAR {
00105
00106 public:
00108 virtual ~GEAR() { ; }
00109
00110
00111
00112 public:
00113 static const char* GEARPARAMETERS ;
00114 static const char* TPCPARAMETERS ;
00115 static const char* CALORIMETERPARAMETERS ;
00116
00117
00118 };
00119 }
00120 #endif