The Gaudi Framework  v29r0 (ff2e7097)
MemoryAuditor.h
Go to the documentation of this file.
1 #ifndef ATLASAUDITOR_MEMORYAUDITOR_H
2 #define ATLASAUDITOR_MEMORYAUDITOR_H
3 
4 #include "CommonAuditor.h"
5 #include "ProcStats.h"
6 
12 {
13 public:
14  MemoryAuditor( const std::string& name, ISvcLocator* pSvcLocator );
15 
16 protected:
18  void i_before( CustomEventTypeRef evt, const std::string& caller ) override;
19 
21  void i_after( CustomEventTypeRef evt, const std::string& caller, const StatusCode& sc ) override;
22 
24  virtual void i_printinfo( const std::string& msg, CustomEventTypeRef evt, const std::string& caller );
25 
28  inline static bool getProcInfo( procInfo& info ) { return ProcStats::instance()->fetch( info ); }
29 };
30 
31 #endif
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
void i_after(CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc) override
Default (catch-all) "after" Auditor hook.
Base class with common functionalities shared by few auditor implementations.
Definition: CommonAuditor.h:8
static ProcStats * instance()
Definition: ProcStats.cpp:240
virtual void i_printinfo(const std::string &msg, CustomEventTypeRef evt, const std::string &caller)
Report the memory usage.
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
static bool getProcInfo(procInfo &info)
Get the process informations.
Definition: MemoryAuditor.h:28
void i_before(CustomEventTypeRef evt, const std::string &caller) override
Default (catch-all) "before" Auditor hook.
MemoryAuditor(const std::string &name, ISvcLocator *pSvcLocator)
Monitors the memory use of each algorithm.
Definition: MemoryAuditor.h:11
bool fetch(procInfo &fill_me)
Definition: ProcStats.cpp:265
const std::string & name() const override
Definition: Auditor.cpp:202
evt
Definition: IOTest.py:96