ATLAS Offline Software
PerfMonTestLeakyAlg.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // PerfMonTestLeakyAlg.h
8 // Header file for class PerfMonTest::LeakyAlg
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef PERFMONTESTS_PERFMONTESTLEAKYALG_H
12 #define PERFMONTESTS_PERFMONTESTLEAKYALG_H
13 
14 // STL includes
15 #include <string>
16 #include <list>
17 #include <vector>
18 
19 
20 // FrameWork includes
22 #include "GaudiKernel/ServiceHandle.h"
23 
24 namespace PerfMonTest {
25 
26 class LeakyAlg : public AthAlgorithm
27 {
28 
30  // Public methods:
32  public:
34 
36  virtual ~LeakyAlg();
37 
38  // Athena algorithm's Hooks
39  virtual StatusCode initialize() override;
40  virtual StatusCode execute() override;
41 
42 
44  // Private data:
46  private:
47 
49  Gaudi::Property<int> m_leakSize{this, "LeakSize", 10, "Size of 'Leak' objects to be leaked each event"};
50 
51  struct Leak {
52  std::vector<int> m_data;
53  };
54 
56  Gaudi::Property<int> m_nbrLeaks{this, "NbrLeaks", 1, "Number of 'Leak' objects to be leaked each event"};
57 
59  std::list<Leak*> m_leaks;
60 };
61 
62 
63 } //> end namespace PerfMonTest
64 
65 #endif //> PERFMONTESTS_PERFMONTESTLEAKYALG_H
PerfMonTest::LeakyAlg::m_leakSize
Gaudi::Property< int > m_leakSize
Property to setup the size of the leak.
Definition: PerfMonTestLeakyAlg.h:49
PerfMonTest::LeakyAlg::m_leaks
std::list< Leak * > m_leaks
container to hold the leaked objects
Definition: PerfMonTestLeakyAlg.h:59
PerfMonTest::LeakyAlg::m_nbrLeaks
Gaudi::Property< int > m_nbrLeaks
nbr of Leak objects
Definition: PerfMonTestLeakyAlg.h:56
PerfMonTest::LeakyAlg::initialize
virtual StatusCode initialize() override
Definition: PerfMonTestLeakyAlg.cxx:37
AthAlgorithm.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PerfMonTest
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.
Definition: Control/PerformanceMonitoring/PerfMonTests/src/Hit.h:7
PerfMonTest::LeakyAlg::Leak::m_data
std::vector< int > m_data
Definition: PerfMonTestLeakyAlg.h:52
PerfMonTest::LeakyAlg::execute
virtual StatusCode execute() override
Definition: PerfMonTestLeakyAlg.cxx:48
AthAlgorithm
Definition: AthAlgorithm.h:47
PerfMonTest::LeakyAlg::Leak
Definition: PerfMonTestLeakyAlg.h:51
PerfMonTest::LeakyAlg
Definition: PerfMonTestLeakyAlg.h:27
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
PerfMonTest::LeakyAlg::~LeakyAlg
virtual ~LeakyAlg()
Destructor:
Definition: PerfMonTestLeakyAlg.cxx:24