| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RootPerfMonSvc.h
Go to the documentation of this file.
1 // $Id: RootPerfMonSvc.h,v 1.7 2010-09-14 06:01:12 frankb Exp $
2 //====================================================================
3 // RootPerfMonSvc definition
4 //--------------------------------------------------------------------
5 //
6 // Author : M.Frank
7 //====================================================================
8 #ifndef GAUDIROOTCNV_GAUDIROOTPERFMONSVC_H
9 #define GAUDIROOTCNV_GAUDIROOTPERFMONSVC_H
10 // $Header: /afs/cern.ch/project/cvs/reps/lhcb/Online/RootCnv/src/RootPerfMonSvc.h,v 1.7 2010-09-14 06:01:12 frankb Exp $
11
12 // Framework include files
13 #include "GaudiKernel/IIncidentListener.h"
14 #include "GaudiKernel/Service.h"
15
16 #include "TTree.h"
17 #include "TFile.h"
18
19 #include "RootCnv/SysProcStat.h"
20
21 // C/C++ include files
22 #include <set>
23
24 // Forward declarations
25 class IIncidentSvc;
26
27 /*
28 * Gaudi namespace declaration
29 */
30 namespace Gaudi {
31
42 class GAUDI_API RootPerfMonSvc : public Service, virtual public IIncidentListener {
43 protected:
44
46 IIncidentSvc* m_incidentSvc;
48 std::string m_ioPerfStats;
50 MsgStream* m_log;
51 // Passed parameters
52 std::string m_setStreams;
53 std::string m_basketSize;
54 std::string m_bufferSize;
55 std::string m_splitLevel;
56 // Reference to a tree with statistics
57 TTree* m_perfTree;
58 // Reference to a file where statistics are persisted
59 TFile* m_perfFile;
60 // Reference to all connected output files
61 std::set<std::string> m_outputs;
62 // The newest observed values
63 Int_t m_eventType;
64 ULong_t m_utime, m_stime, m_vsize;
65 Long_t m_eventNumber, m_rss, m_time;
66
67 // Types of records
68 enum EventType { EVENT = 1, FSR = 2 };
69
70 // Adding newest observed values to the tree with statistics
71 virtual void record(EventType eventType);
72
74 MsgStream& log() const { return *m_log; }
75
76 public:
78 RootPerfMonSvc(const std::string& name, ISvcLocator* svc);
79
81 virtual ~RootPerfMonSvc();
82
88 StatusCode error(const std::string& msg);
89
91 virtual StatusCode initialize();
92
94 virtual StatusCode finalize();
95
97 virtual void handle(const Incident& incident);
98
99 // Service overload: Stop the service
100 virtual StatusCode stop();
101 };
102 }
103
104 #endif // GAUDIROOTCNV_GAUDIROOTPERFMONSVC_H