StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Error.hh
1 /***************************************************************************
2  * $Id: Error.hh,v 1.5 1999/12/06 22:53:19 levine Exp $
3  * Author: Jeff Landgraf
4  *
5  * change log
6  * 20-Jul-99 MJL Added new error code ERR_BAD_HEADER
7  *
8  ***************************************************************************
9  * Description: error codes
10  *
11  ***************************************************************************
12  * $Log: Error.hh,v $
13  * Revision 1.5 1999/12/06 22:53:19 levine
14  * Cleaned up information generated on failure to initialize EventReader
15  *
16  * Revision 1.4 1999/12/03 21:38:33 levine
17  * Error message added "Info: End of File encountered"
18  *
19  * Revision 1.3 1999/07/21 21:33:08 levine
20  * changes to include error logging to file.
21  *
22  * There are now 2 constructors for EventReader:
23  *
24  * EventReader();
25  * EventReader(const char *logfilename);
26  *
27  * Constructed with no argument, there is no error logging. Supplying a file name
28  * sends all diagnostic output to the named file (N.B. opens in append mode)
29  *
30  * See example in client.cxx for constructing a log file name based on the
31  * datafile name.
32  *
33  * It is strongly advised to use the log file capability. You can grep it for
34  * instances of "ERROR:" to trap anything noteworthy (i.e., corrupted data files).
35  *
36  * Revision 1.2 1999/07/02 04:37:41 levine
37  * Many changes - see change logs in individual programs
38  *
39  *
40  **************************************************************************/
41 #ifndef ERROR_H
42 #define ERROR_H
43 #include <stdio.h>
44 
45 #define ERROR(x) {errnum = x;sprintf(errstr0,"%s::%d",__FILE__,__LINE__);return;}
46 
47 #define pERROR(x) {errnum = x;sprintf(errstr0,"%s::%d",__FILE__,__LINE__);}
48 
49 #define spERROR(x) {detector->errnum=x;sprintf(detector->errstr0,"%s::%d",__FILE__,__LINE__);}
50 
51 #define ERR_FILE 1
52 #define ERR_CRC 2
53 #define ERR_SWAP 3
54 #define ERR_BANK 4
55 #define ERR_MEM 5
56 #define ERR_NOT_DATA_BANK 6
57 #define ERR_BAD_ARG 7
58 #define ERR_ENDR_ENCOUNTERED 8
59 #define ERR_BAD_HEADER 9
60 #define INFO_MISSING_BANK 10
61 #define INFO_END_FILE 11
62 
63 
64 #define MX_MESSAGE 11
65 
66 #endif
67