The Gaudi Framework  v29r0 (ff2e7097)
CallgrindProfile.h
Go to the documentation of this file.
1 #ifndef VALGRIND_CALLGRINDPROFILE_H
2 #define VALGRIND_CALLGRINDPROFILE_H 1
3 
4 // Include files
5 // from Gaudi
7 
16 {
17 public:
19 
20  ~CallgrindProfile() override = default;
21 
22  StatusCode initialize() override;
23  StatusCode execute() override;
24  StatusCode finalize() override;
25 
26 private:
27  Gaudi::Property<int> m_nStartFromEvent{this, "StartFromEventN", 1, "After what event we start profiling."};
29  this, "StopAtEventN", 0,
30  "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0."};
32  this, "DumpAtEventN", 0,
33  "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0."};
35  this, "ZeroAtEventN", 0,
36  "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0."};
37  Gaudi::Property<std::string> m_dumpName{this, "DumpName", "", "Label for the callgrind dump"};
38 
39  int m_eventNumber = 0; // Current event number
40  bool m_profiling = false; // Whether valgrind is profiling or not
41  bool m_dumpDone = false; // Whether the counters were dumped
42 };
43 #endif // VALGRIND_CALLGRINDPROFILE_H
Implementation of property with value of concrete type.
Definition: Property.h:319
Header file for class GaudiAlgorithm.
Gaudi::Property< int > m_nDumpAtEvent
Gaudi::Property< int > m_nStartFromEvent
Gaudi::Property< std::string > m_dumpName
~CallgrindProfile() override=default
Destructor.
Gaudi::Property< int > m_nZeroAtEvent
StatusCode initialize() override
Algorithm initialization.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
The useful base class for data processing algorithms.
StatusCode execute() override
Algorithm execution.
StatusCode finalize() override
Algorithm finalization.
Algorithm to enable/disable the profiling by Callgrind at given events.
Gaudi::Property< int > m_nStopAtEvent