00001 /*************************************************************************** 00002 * $Id: Error.hh,v 1.5 1999/12/06 22:53:19 levine Exp $ 00003 * Author: Jeff Landgraf 00004 * 00005 * change log 00006 * 20-Jul-99 MJL Added new error code ERR_BAD_HEADER 00007 * 00008 *************************************************************************** 00009 * Description: error codes 00010 * 00011 *************************************************************************** 00012 * $Log: Error.hh,v $ 00013 * Revision 1.5 1999/12/06 22:53:19 levine 00014 * Cleaned up information generated on failure to initialize EventReader 00015 * 00016 * Revision 1.4 1999/12/03 21:38:33 levine 00017 * Error message added "Info: End of File encountered" 00018 * 00019 * Revision 1.3 1999/07/21 21:33:08 levine 00020 * changes to include error logging to file. 00021 * 00022 * There are now 2 constructors for EventReader: 00023 * 00024 * EventReader(); 00025 * EventReader(const char *logfilename); 00026 * 00027 * Constructed with no argument, there is no error logging. Supplying a file name 00028 * sends all diagnostic output to the named file (N.B. opens in append mode) 00029 * 00030 * See example in client.cxx for constructing a log file name based on the 00031 * datafile name. 00032 * 00033 * It is strongly advised to use the log file capability. You can grep it for 00034 * instances of "ERROR:" to trap anything noteworthy (i.e., corrupted data files). 00035 * 00036 * Revision 1.2 1999/07/02 04:37:41 levine 00037 * Many changes - see change logs in individual programs 00038 * 00039 * 00040 **************************************************************************/ 00041 #ifndef ERROR_H 00042 #define ERROR_H 00043 #include <stdio.h> 00044 00045 #define ERROR(x) {errnum = x;sprintf(errstr0,"%s::%d",__FILE__,__LINE__);return;} 00046 00047 #define pERROR(x) {errnum = x;sprintf(errstr0,"%s::%d",__FILE__,__LINE__);} 00048 00049 #define spERROR(x) {detector->errnum=x;sprintf(detector->errstr0,"%s::%d",__FILE__,__LINE__);} 00050 00051 #define ERR_FILE 1 00052 #define ERR_CRC 2 00053 #define ERR_SWAP 3 00054 #define ERR_BANK 4 00055 #define ERR_MEM 5 00056 #define ERR_NOT_DATA_BANK 6 00057 #define ERR_BAD_ARG 7 00058 #define ERR_ENDR_ENCOUNTERED 8 00059 #define ERR_BAD_HEADER 9 00060 #define INFO_MISSING_BANK 10 00061 #define INFO_END_FILE 11 00062 00063 00064 #define MX_MESSAGE 11 00065 00066 #endif 00067
1.5.9