00001 // $Id: IntersectionErrors.h,v 1.2 2008/05/20 15:41:17 cattanem Exp $ 00002 // ============================================================================ 00003 #ifndef DETDESC_INTERSECTIONERRORS_H 00004 #define DETDESC_INTERSECTIONERRORS_H 1 00005 // ============================================================================ 00006 // Include files 00007 // ============================================================================ 00008 // STD & STL 00009 // ============================================================================ 00010 #include <map> 00011 // ============================================================================ 00012 // GaudiKernel 00013 // ============================================================================ 00014 #include "GaudiKernel/StatusCode.h" 00015 // ============================================================================ 00016 // DetDesc 00017 // ============================================================================ 00018 #include "DetDesc/ILVolume.h" 00019 // ============================================================================ 00020 namespace DetDesc 00021 { 00022 // forward declarations 00023 class IGeometryErrorSvc ; 00024 // ========================================================================== 00030 class IntersectionErrors 00031 { 00032 public: 00034 static unsigned long errors () ; 00035 public: 00037 static void setCode 00038 ( const StatusCode& sc , const ILVolume* volume ) ; 00040 static const StatusCode& code () ; 00041 public: 00043 static void setService ( DetDesc::IGeometryErrorSvc* svc) ; 00045 static DetDesc::IGeometryErrorSvc* service() ; 00046 public: 00048 static void setRecovery ( const bool value ) ; 00050 static bool recovery () ; 00051 public: 00052 // ======================================================================== 00061 static void recovered 00062 ( const ILVolume* volume , 00063 const Material* material1 , 00064 const Material* material2 , 00065 const double delta ) ; 00066 // ======================================================================== 00074 static void skip 00075 ( const ILVolume* volume , 00076 const Material* material , 00077 const double delta ) ; 00078 // ======================================================================== 00079 public: 00081 static void inspect 00082 ( const ILVolume* volume , 00083 const Gaudi::XYZPoint& pnt , 00084 const Gaudi::XYZVector& vect , 00085 const ILVolume::Intersections& cnt ) ; 00086 private: 00087 // static code 00088 static StatusCode s_code ; 00089 // static pointer to IGeometryErrorSvc 00090 static DetDesc::IGeometryErrorSvc* s_service ; 00091 // static counter of unreported errors 00092 static unsigned long s_errors ; 00093 // static flag to perform the error ecovery 00094 static bool s_recovery ; 00095 } ; 00096 } // end of namespace DetDesc 00097 // ============================================================================ 00098 // The END 00099 // ============================================================================ 00100 #endif // DETDESC_INTERSECTIONERRORS_H 00101 // ============================================================================