| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

RootPerfMonSvc.h
Go to the documentation of this file.
1 //====================================================================
2 // RootPerfMonSvc definition
3 //--------------------------------------------------------------------
4 //
5 // Author : M.Frank
6 //====================================================================
7 #ifndef GAUDIROOTCNV_GAUDIROOTPERFMONSVC_H
8 #define GAUDIROOTCNV_GAUDIROOTPERFMONSVC_H
9
10 #include <memory>
11 // Framework include files
12 #include "GaudiKernel/IIncidentListener.h"
13 #include "GaudiKernel/Service.h"
14
15 #include "TTree.h"
16 #include "TFile.h"
17
18 #include "RootCnv/SysProcStat.h"
19
20 // C/C++ include files
21 #include <set>
22
23 // Forward declarations
24 class IIncidentSvc;
25
26 /*
27 * Gaudi namespace declaration
28 */
29 namespace Gaudi {
30
41 class GAUDI_API RootPerfMonSvc : public Service, virtual public IIncidentListener {
42 protected:
43
45 SmartIF<IIncidentSvc> m_incidentSvc ;
47 std::string m_ioPerfStats;
49 std::unique_ptr<MsgStream> m_log;
50 // Passed parameters
51 std::string m_setStreams;
52 std::string m_basketSize;
53 std::string m_bufferSize;
54 std::string m_splitLevel;
55 // Reference to a tree with statistics
56 TTree* m_perfTree;
57 // Reference to a file where statistics are persisted
58 std::unique_ptr<TFile> m_perfFile;
59 // Reference to all connected output files
60 std::set<std::string> m_outputs;
61 // The newest observed values
62 Int_t m_eventType;
63 ULong_t m_utime, m_stime, m_vsize;
64 Long_t m_eventNumber, m_rss, m_time;
65
66 // Types of records
67 enum EventType { EVENT = 1, FSR = 2 };
68
69 // Adding newest observed values to the tree with statistics
70 virtual void record(EventType eventType);
71
73 MsgStream& log() const { return *m_log; }
74
75 public:
77 RootPerfMonSvc(const std::string& name, ISvcLocator* svc);
78
80 ~RootPerfMonSvc() override = default;
81
87 StatusCode error(const std::string& msg);
88
90 StatusCode initialize() override;
91
93 StatusCode finalize() override;
94
96 void handle(const Incident& incident) override;
97
98 // Service overload: Stop the service
99 StatusCode stop() override;
100 };
101 }
102
103 #endif // GAUDIROOTCNV_GAUDIROOTPERFMONSVC_H
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IIncidentSvc >
AnalysisTest.initialize
def initialize()
Definition: AnalysisTest.py:12
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Gaudi::RootPerfMonSvc::m_eventType
Int_t m_eventType
Definition: RootPerfMonSvc.h:62
Gaudi::RootPerfMonSvc::m_time
Long_t m_time
Definition: RootPerfMonSvc.h:64
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
Gaudi::RootPerfMonSvc
Description:
Definition: RootPerfMonSvc.h:41
Gaudi::RootPerfMonSvc::m_perfFile
std::unique_ptr< TFile > m_perfFile
Definition: RootPerfMonSvc.h:58
SysProcStat.h
Gaudi::RootPerfMonSvc::m_ioPerfStats
std::string m_ioPerfStats
Property: Enable TTree IOperfStats if not empty; otherwise perf stat file name.
Definition: RootPerfMonSvc.h:47
Gaudi::RootPerfMonSvc::m_vsize
ULong_t m_vsize
Definition: RootPerfMonSvc.h:63
Gaudi::RootPerfMonSvc::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
Definition: RootPerfMonSvc.h:45
std::string
STL class.
Service.h
Gaudi::RootPerfMonSvc::EventType
EventType
Definition: RootPerfMonSvc.h:67
IIncidentListener
The interface implemented by any class wanting to listen to Incidents.
Definition: IIncidentListener.h:13
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Gaudi::RootPerfMonSvc::m_splitLevel
std::string m_splitLevel
Definition: RootPerfMonSvc.h:54
Gaudi::RootPerfMonSvc::m_setStreams
std::string m_setStreams
Definition: RootPerfMonSvc.h:51
Gaudi::RootPerfMonSvc::m_bufferSize
std::string m_bufferSize
Definition: RootPerfMonSvc.h:53
Gaudi::RootPerfMonSvc::m_perfTree
TTree * m_perfTree
Definition: RootPerfMonSvc.h:56
std::set< std::string >
Gaudi::RootPerfMonSvc::log
MsgStream & log() const
Helper: Use message streamer.
Definition: RootPerfMonSvc.h:73
std::unique_ptr< MsgStream >
Gaudi::RootPerfMonSvc::m_basketSize
std::string m_basketSize
Definition: RootPerfMonSvc.h:52
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
IIncidentListener.h
Gaudi::RootPerfMonSvc::m_outputs
std::set< std::string > m_outputs
Definition: RootPerfMonSvc.h:60
Service
Base class for all services.
Definition: Service.h:36
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
Gaudi::RootPerfMonSvc::m_log
std::unique_ptr< MsgStream > m_log
Message streamer.
Definition: RootPerfMonSvc.h:49
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:21