![]() |
|
|
Generated: 18 Jul 2008 |
00001 // $Id: GslErrorPrint.cpp,v 1.2 2006/01/10 20:00:05 hmd Exp $ 00002 // ============================================================================ 00003 // Include files 00004 // from Gaudi 00005 #include "GaudiKernel/ToolFactory.h" 00006 #include "GaudiKernel/MsgStream.h" 00007 #include "GaudiKernel/IChronoStatSvc.h" 00008 #include "GaudiKernel/Stat.h" 00009 // local 00010 #include "GslErrorPrint.h" 00011 00012 // ============================================================================ 00020 // ============================================================================ 00021 00022 // ============================================================================ 00029 // ============================================================================ 00030 DECLARE_TOOL_FACTORY(GslErrorPrint) 00031 // ============================================================================ 00032 00033 // ============================================================================ 00039 // ============================================================================ 00040 GslErrorPrint::GslErrorPrint 00041 ( const std::string& type , 00042 const std::string& name , 00043 const IInterface* parent ) 00044 : AlgTool ( type, name , parent ) 00045 { declareInterface<IGslErrorHandler> (this);}; 00046 // ============================================================================ 00047 00048 // ============================================================================ 00050 // ============================================================================ 00051 GslErrorPrint::~GslErrorPrint(){}; 00052 // ============================================================================ 00053 00054 // ============================================================================ 00061 // ============================================================================ 00062 StatusCode GslErrorPrint::handle 00063 ( const GslError& error ) const 00064 { 00065 MsgStream log( msgSvc() , name() ); 00066 log << MSG::ERROR 00067 << " GSL code " << error.code 00068 << " Message '" << error.reason << "'" 00069 << " File '" << error.file << "'" 00070 << " Line " << error.line << endreq ; 00071 // 00072 return StatusCode::SUCCESS ; 00073 }; 00074 // ============================================================================ 00075 00076 00077 // ============================================================================ 00078 // The END 00079 // ============================================================================