The Gaudi Framework  v29r0 (ff2e7097)
AlgErrorAuditor.h
Go to the documentation of this file.
1 #ifndef GAUDIAUD_ALGERRORAUDITOR_H
2 #define GAUDIAUD_ALGERRORAUDITOR_H
3 
4 #include "GaudiKernel/Auditor.h"
5 #include <map>
6 #include <string>
7 
8 class IMessageSvc;
9 
15 class AlgErrorAuditor : public Auditor
16 {
17 public:
18  using Auditor::Auditor;
19  ~AlgErrorAuditor() override = default;
20 
21  StatusCode initialize() override;
22  StatusCode finalize() override;
23 
24  void beforeExecute( INamedInterface* alg ) override;
25  void afterExecute( INamedInterface* alg, const StatusCode& ) override;
26 
27 private:
28  Gaudi::Property<bool> m_abort{this, "Abort", false, "abort job upon illegal Algorithm return code"};
29  Gaudi::Property<bool> m_throw{this, "Throw", false, "throw GaudiException upon illegal Algorithm return code"};
30 
31  void incrMap( const std::string& algName, int level );
32 
33  int m_error = 0;
34  int m_fatal = 0;
35 
37 };
38 
39 #endif
StatusCode finalize() override
Implementation of property with value of concrete type.
Definition: Property.h:319
std::map< std::string, int > m_algMap[2]
Monitors the cpu time usage of each algorithm.
void beforeExecute(INamedInterface *alg) override
~AlgErrorAuditor() override=default
STL class.
Auditor(const std::string &name, ISvcLocator *svcloc)
Constructor.
Definition: Auditor.cpp:12
void incrMap(const std::string &algName, int level)
void afterExecute(INamedInterface *alg, const StatusCode &) override
StatusCode initialize() override
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
The IMessage is the interface implemented by the message service.
Definition: IMessageSvc.h:38
Gaudi::Property< bool > m_abort
Gaudi::Property< bool > m_throw
IInterface compliant class extending IInterface with the name() method.
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:35