The Gaudi Framework  v33r0 (d5ea422b)
CallgrindProfile.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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
Implementation of property with value of concrete type.
Definition: Property.h:370
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:59
Gaudi::Property< int > m_nDumpAtEvent
Gaudi::Property< int > m_nStartFromEvent
Gaudi::Property< std::string > m_dumpName
Gaudi::Property< int > m_nZeroAtEvent
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
StatusCode execute() override
Algorithm execution.
Alias for backward compatibility.
Definition: Algorithm.h:66
StatusCode finalize() override
Algorithm finalization.
Algorithm to enable/disable the profiling by Callgrind at given events.
Gaudi::Property< int > m_nStopAtEvent