ATLAS Offline Software
AthMemoryAuditor.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // AthMemoryAuditor.h
8 // Header file for class AthMemoryAuditor
9 // Author: Rolf Seuster
11 #ifndef ATHENASERVICES_ATHMEMORYAUDITOR_H
12 #define ATHENASERVICES_ATHMEMORYAUDITOR_H 1
13 
14 // This auditor is not thread-safe without signiicant work.
15 // Disable checking for now.
16 // We'll also report an ERROR is this is used in an MT job.
19 
20 // STL includes
21 #include <string>
22 
23 // FrameWork includes
24 #include "GaudiKernel/Auditor.h"
26 
27 // Forward declaration
28 class INamedInterface;
29 
30 class AthMemoryAuditor : virtual public Auditor, public AthMessaging
31 {
32  using Auditor::before;
33  using Auditor::after;
34  using AthMessaging::msg;
35 
36 public:
37 
39  AthMemoryAuditor(const std::string& name, ISvcLocator* pSvcLocator);
40 
41  virtual StatusCode initialize() override;
42  virtual StatusCode finalize() override;
43  virtual void before(StandardEventType evt, INamedInterface* comp) override;
44  virtual void after(StandardEventType evt, INamedInterface* comp, const StatusCode& sc) override;
45 
46  static bool m_usetcmalloc;
47 
48 private:
49 
50  bool m_reported;
51  int m_stmax;
53  std::vector<std::string> m_depthPerAlg;
54 
55  void report ();
56  std::string stageToString(long);
57  uint64_t sum(uint32_t a, uint32_t b) { return ((((uint64_t)a)<<32) + b); };
58 };
59 #endif //> ATHENASERVICES_ATHMEMORYAUDITOR_H
plotting.yearwise_luminosity_vs_mu.comp
comp
Definition: yearwise_luminosity_vs_mu.py:24
AthMemoryAuditor::finalize
virtual StatusCode finalize() override
Definition: AthMemoryAuditor.cxx:57
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AthMemoryAuditor::m_reported
bool m_reported
Definition: AthMemoryAuditor.h:50
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthMemoryAuditor::AthMemoryAuditor
AthMemoryAuditor(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMemoryAuditor.cxx:42
AthMemoryAuditor::report
void report()
Definition: AthMemoryAuditor.cxx:176
AthMemoryAuditor::m_usetcmalloc
static bool m_usetcmalloc
Definition: AthMemoryAuditor.h:46
AthMemoryAuditor::stageToString
std::string stageToString(long)
Definition: AthMemoryAuditor.cxx:614
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: AthMemoryAuditor.h:18
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
AthMemoryAuditor::m_depthPerAlg
std::vector< std::string > m_depthPerAlg
Definition: AthMemoryAuditor.h:53
AthMemoryAuditor::m_stmax
int m_stmax
Definition: AthMemoryAuditor.h:51
AthMemoryAuditor::initialize
virtual StatusCode initialize() override
Definition: AthMemoryAuditor.cxx:111
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
AthMemoryAuditor::sum
uint64_t sum(uint32_t a, uint32_t b)
Definition: AthMemoryAuditor.h:57
a
TList * a
Definition: liststreamerinfos.cxx:10
AthMemoryAuditor::m_defaultStacktraceDepth
int m_defaultStacktraceDepth
Definition: AthMemoryAuditor.h:52
AthMemoryAuditor::before
virtual void before(StandardEventType evt, INamedInterface *comp) override
Definition: AthMemoryAuditor.cxx:639
AthMessaging.h
AthMemoryAuditor::after
virtual void after(StandardEventType evt, INamedInterface *comp, const StatusCode &sc) override
Definition: AthMemoryAuditor.cxx:687
AthMemoryAuditor
Definition: AthMemoryAuditor.h:31
checker_macros.h
Define macros for attributes used to control the static checker.