The Gaudi Framework  master (37c0b60a)
CallgrindProfile.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 VALGRIND_CALLGRINDPROFILE_H
12 #define VALGRIND_CALLGRINDPROFILE_H 1
13 
14 // Include files
15 // from Gaudi
16 #include <GaudiKernel/Algorithm.h>
17 
25 class CallgrindProfile : public Algorithm {
26 public:
28 
29  StatusCode execute() override;
30  StatusCode finalize() override;
31 
32 private:
33  Gaudi::Property<int> m_nStartFromEvent{ this, "StartFromEventN", 1, "After what event we start profiling." };
35  this, "StopAtEventN", 0,
36  "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0." };
38  this, "DumpAtEventN", 0,
39  "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0." };
41  this, "ZeroAtEventN", 0,
42  "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0." };
43  Gaudi::Property<std::string> m_dumpName{ this, "DumpName", "", "Label for the callgrind dump" };
44 
45  int m_eventNumber = 0; // Current event number
46  bool m_profiling = false; // Whether valgrind is profiling or not
47  bool m_dumpDone = false; // Whether the counters were dumped
48 };
49 #endif // VALGRIND_CALLGRINDPROFILE_H
CallgrindProfile
Definition: CallgrindProfile.h:25
CallgrindProfile::m_dumpName
Gaudi::Property< std::string > m_dumpName
Definition: CallgrindProfile.h:43
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
CallgrindProfile::m_nStopAtEvent
Gaudi::Property< int > m_nStopAtEvent
Definition: CallgrindProfile.h:34
StatusCode
Definition: StatusCode.h:65
CallgrindProfile::m_eventNumber
int m_eventNumber
Definition: CallgrindProfile.h:45
CallgrindProfile::m_nStartFromEvent
Gaudi::Property< int > m_nStartFromEvent
Definition: CallgrindProfile.h:33
CallgrindProfile::m_nZeroAtEvent
Gaudi::Property< int > m_nZeroAtEvent
Definition: CallgrindProfile.h:40
CallgrindProfile::m_profiling
bool m_profiling
Definition: CallgrindProfile.h:46
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101
CallgrindProfile::m_dumpDone
bool m_dumpDone
Definition: CallgrindProfile.h:47
CallgrindProfile::execute
StatusCode execute() override
Algorithm execution.
Definition: CallgrindProfile.cpp:30
CallgrindProfile::m_nDumpAtEvent
Gaudi::Property< int > m_nDumpAtEvent
Definition: CallgrindProfile.h:37
CallgrindProfile::finalize
StatusCode finalize() override
Algorithm finalization.
Definition: CallgrindProfile.cpp:71
Gaudi::Property< int >