Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

BaseException.h

Go to the documentation of this file.
00001 //File BaseException.h
00002 
00003 #ifndef BASEEXCEPTION_H 
00004 #define BASEEXCEPTION_H
00005 
00006 #include <iostream>
00007 #include <string>
00008 
00009 namespace SctPixelRod {
00010 
00011 enum exceptType {BASE, VME, NOIMAGEFILE, HPI, ROD, PRIMLIST, TIM};
00012 
00013 //------------------------------baseException------------------------------ 
00014 
00029 class BaseException {
00030 public:
00031   BaseException(std::string descriptor);
00032   std::string getDescriptor() {return m_descriptor;};
00033   unsigned long getNumData() {return m_numData;};
00034   void setType(exceptType type) {m_type = type; return;};
00035   exceptType getType() {return m_type;};
00036   virtual void what(std::ostream&); 
00037   virtual ~BaseException(){}
00038   
00039 private:
00040   std::string m_descriptor;    
00041   unsigned long m_numData;  
00042   exceptType m_type;              
00043 }; 
00044                                                                          
00045 };
00046 
00047 //---------------------------- Overload operator<< -----------------------------
00048 /* This overloaded operator lets us use cout and cerr to print the sexception
00049 *  information.
00050 */
00051   std::ostream& operator<<(std::ostream& os, SctPixelRod::BaseException& e);
00052 
00053 #endif // BASEEXCEPTION_H

Generated on Mon Dec 15 19:35:58 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3