The Gaudi Framework  v33r0 (d5ea422b)
MemStatAuditor.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIAUDITOR_MemStatAuditor_H
12 #define GAUDIAUDITOR_MemStatAuditor_H 1
13 
23 #include "MemoryAuditor.h"
24 
25 class MemStatAuditor : public MemoryAuditor {
26 public:
27  using MemoryAuditor::MemoryAuditor;
28 
29  StatusCode initialize() override;
30 
31 private:
33  void i_before( CustomEventTypeRef evt, const std::string& caller ) override;
34 
35  void i_printinfo( const std::string& msg, CustomEventTypeRef evt, const std::string& caller ) override;
36 
39 
41  double m_vSize = -1;
42 };
43 
44 #endif // GAUDIAUDITOR_MemStatAuditor_H
Just a minor modification of MemoryAuditor to allow the output memory statistics table to be printed.
StatusCode initialize() override
local
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
double m_vSize
vsize of the previous call to printinfo
SmartIF< IChronoStatSvc > m_stat
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
void i_before(CustomEventTypeRef evt, const std::string &caller) override
Re-implement i_before to avoid monitoring the memory usage before a function.
Monitors the memory use of each algorithm.
Definition: MemoryAuditor.h:21
SmartIF< IChronoStatSvc > & statSvc()
void i_printinfo(const std::string &msg, CustomEventTypeRef evt, const std::string &caller) override
Report the memory usage.