ATLAS Offline Software
Loading...
Searching...
No Matches
PerfMonTestLeakyAlg.h
Go to the documentation of this file.
1
2
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
24namespace PerfMonTest {
25
26class 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
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode initialize() override
virtual StatusCode execute() override
Gaudi::Property< int > m_nbrLeaks
nbr of Leak objects
virtual ~LeakyAlg()
Destructor:
std::list< Leak * > m_leaks
container to hold the leaked objects
Gaudi::Property< int > m_leakSize
Property to setup the size of the leak.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.