00001 #ifndef DataFormats_FWLite_ErrorThrower_h 00002 #define DataFormats_FWLite_ErrorThrower_h 00003 // -*- C++ -*- 00004 // 00005 // Package: FWLite 00006 // Class : ErrorThrower 00007 // 00016 // 00017 // Original Author: Chris Jones 00018 // Created: Tue Sep 23 09:58:07 EDT 2008 00019 // $Id: ErrorThrower.h,v 1.1 2008/09/23 15:49:33 chrjones Exp $ 00020 // 00021 00022 #if !defined(__CINT__) && !defined(__MAKECINT__) 00023 // system include files 00024 #include <typeinfo> 00025 00026 // user include files 00027 00028 // forward declarations 00029 namespace fwlite { 00030 class ErrorThrower { 00031 00032 public: 00033 ErrorThrower(); 00034 virtual ~ErrorThrower(); 00035 00036 // ---------- const member functions --------------------- 00037 virtual void throwIt() const =0; 00038 virtual ErrorThrower* clone() const =0; 00039 00040 // ---------- static member functions -------------------- 00041 static ErrorThrower* unsetErrorThrower(); 00042 static ErrorThrower* errorThrowerBranchNotFoundException(const std::type_info&, const char*, const char*, const char*); 00043 static ErrorThrower* errorThrowerProductNotFoundException(const std::type_info&, const char*, const char*, const char*); 00044 00045 // ---------- member functions --------------------------- 00046 00047 private: 00048 //ErrorThrower(const ErrorThrower&); // stop default 00049 00050 //const ErrorThrower& operator=(const ErrorThrower&); // stop default 00051 00052 // ---------- member data -------------------------------- 00053 00054 }; 00055 00056 } 00057 #endif 00058 #endif