ATLAS Offline Software
FPEControlSvc.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: FPEControlSvc.h,v 1.2 2008-09-23 22:00:47 binet Exp $
8 
16 #ifndef ATHENASERVICES_FPECONTROLSVC_H
17 #define ATHENASERVICES_FPECONTROLSVC_H
18 
19 
21 #include "GaudiKernel/StatusCode.h"
22 #include "Gaudi/Property.h"
23 #include "GaudiKernel/IToolSvc.h"
24 #include "GaudiKernel/ServiceHandle.h"
25 #include <fenv.h>
26 
27 
51  : public AthService, public IToolSvc::Observer
52 {
53 public:
55  virtual StatusCode initialize();
56 
58  virtual StatusCode finalize();
59 
61  virtual void onCreate(const IAlgTool*);
62 
63 
69  FPEControlSvc( const std::string& name, ISvcLocator* svcloc );
70 
71 
72 private:
74  void setFPU();
75 
77  StringArrayProperty m_exceptions;
78 
81 
83  fenv_t m_env;
84 
86  bool m_haveEnv;
87 
89  int m_enabled;
90 
93 
96 
98  std::string m_feSetRounding;
99 
101  void prophand (Gaudi::Details::PropertyBase& prop);
102 };
103 
104 #endif // not ATHENASERVICES_FPECONTROLSVC_H
FPEControlSvc::m_removeInFinalize
bool m_removeInFinalize
boolean to decide to (not) remove the observer in finalize
Definition: FPEControlSvc.h:95
FPEControlSvc::initialize
virtual StatusCode initialize()
Standard initialize method.
Definition: FPEControlSvc.cxx:49
FPEControlSvc::setFPU
void setFPU()
Set the FPU exception masks from m_enabled and m_disabled.
Definition: FPEControlSvc.cxx:216
FPEControlSvc::m_toolSvc
ServiceHandle< IToolSvc > m_toolSvc
Tool service.
Definition: FPEControlSvc.h:80
FPEControlSvc::m_haveEnv
bool m_haveEnv
Flag that we've retrieved the environment.
Definition: FPEControlSvc.h:86
FPEControlSvc::m_disabled
int m_disabled
Mask of disabled exceptions.
Definition: FPEControlSvc.h:92
FPEControlSvc::finalize
virtual StatusCode finalize()
Standard finalize method.
Definition: FPEControlSvc.cxx:92
FPEControlSvc
Service to enable or disable floating-point exceptions.
Definition: FPEControlSvc.h:52
FPEControlSvc::prophand
void prophand(Gaudi::Details::PropertyBase &prop)
Property change handler.
Definition: FPEControlSvc.cxx:153
FPEControlSvc::m_feSetRounding
std::string m_feSetRounding
flag to decide on rounding mode (for stability tests)
Definition: FPEControlSvc.h:98
FPEControlSvc::m_env
fenv_t m_env
The FP environment before we initialize.
Definition: FPEControlSvc.h:83
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPEControlSvc::m_exceptions
StringArrayProperty m_exceptions
Property specifying the desired exception mask.
Definition: FPEControlSvc.h:77
AthService
Definition: AthService.h:32
FPEControlSvc::onCreate
virtual void onCreate(const IAlgTool *)
Called after each tool has been created.
Definition: FPEControlSvc.cxx:115
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
FPEControlSvc::m_enabled
int m_enabled
Mask of enabled exceptions.
Definition: FPEControlSvc.h:89
FPEControlSvc::FPEControlSvc
FPEControlSvc(const std::string &name, ISvcLocator *svcloc)
Constructor.
Definition: FPEControlSvc.cxx:22
AthService.h
ServiceHandle< IToolSvc >