CMS 3D CMS Logo

EnableFloatingPointExceptions.h

Go to the documentation of this file.
00001 #ifndef FWCore_Services_FpeHandler_h
00002 #define FWCore_Services_FpeHandler_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Services
00006 // Class  :     EnableFloatingPointExceptions
00007 // 
00087 //
00088 // Original Author:  E. Sexton-Kennedy
00089 //         Created:  Tue Apr 11 13:43:16 CDT 2006
00090 // $Id: EnableFloatingPointExceptions.h,v 1.9 2007/06/14 21:03:39 wmtan Exp $
00091 //
00092 
00093 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00094 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
00095 
00096 #include <map>
00097 #include <stack>
00098 #include <fenv.h>
00099 
00100 namespace edm {
00101    namespace service {
00102       class EnableFloatingPointExceptions {
00103 public:
00104          EnableFloatingPointExceptions(const ParameterSet&,ActivityRegistry&);
00105          
00106          void postEndJob();
00107 
00108          void preModule(const ModuleDescription&);
00109          void postModule(const ModuleDescription&);
00110 
00111 private:
00112          void controlFpe();
00113          void echoState();
00114 
00115          bool enableDivByZeroEx_;
00116          bool enableInvalidEx_;
00117          bool enableOverFlowEx_;
00118          bool enableUnderFlowEx_;
00119 
00120          bool setPrecisionDouble_;
00121 
00122          bool reportSettings_;
00123 
00124          typedef std::string              String;
00125          typedef std::vector<std::string> VString;
00126          typedef ParameterSet             PSet;
00127          fenv_t fpuState_;
00128          fenv_t OSdefault_;
00129          std::map<String, fenv_t> stateMap_;
00130          std::stack<fenv_t> stateStack_;
00131       };
00132    }
00133 }
00134 
00135 #endif

Generated on Tue Jun 9 17:36:39 2009 for CMSSW by  doxygen 1.5.4