Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ChronoStatSvc.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_CHRONOSTATSVC_H__
2 #define GAUDISVC_CHRONOSTATSVC_H__
3 // ============================================================================
4 // include files
5 // ============================================================================
6 // STD & STL
7 // ============================================================================
8 #include <string>
9 #include <map>
10 #include <functional>
11 #include <fstream>
12 // ============================================================================
13 // GaudiKernel
14 // ============================================================================
15 #include "GaudiKernel/Kernel.h"
16 #include "GaudiKernel/Service.h"
19 // ============================================================================
21 // ============================================================================
22 class ISvcLocator ;
23 class IMessageSvc ;
24 // ============================================================================
33 class ChronoStatSvc: public extends2<Service, IChronoStatSvc,
34  IIncidentListener> {
35 public:
36  // ============================================================================
38  typedef std::map<IChronoStatSvc::ChronoTag,ChronoEntity> ChronoMap ;
39  typedef std::map<IChronoStatSvc::StatTag,StatEntity> StatMap ;
40  // ============================================================================
41 public:
42  // ============================================================================
44  virtual StatusCode initialize();
46  virtual StatusCode finalize();
47  // ============================================================================
48 public:
49  // ============================================================================
53  virtual ChronoEntity* chronoStart
54  ( const IChronoStatSvc::ChronoTag& chronoTag );
55  // ============================================================================
59  virtual const ChronoEntity* chronoStop
60  ( const IChronoStatSvc::ChronoTag& chronoTag );
61  // ============================================================================
66  ( const IChronoStatSvc::ChronoTag& chronoTag,
68  // ============================================================================
72  virtual void chronoPrint
73  ( const IChronoStatSvc::ChronoTag& chronoTag );
74  // ============================================================================
78  virtual ChronoStatus chronoStatus
79  ( const IChronoStatSvc::ChronoTag& chronoTag );
80  // ============================================================================
85  virtual void stat
86  ( const IChronoStatSvc::StatTag & statTag ,
87  const IChronoStatSvc::StatFlag & statFlag ) ;
88  // ============================================================================
93  virtual void statPrint
94  ( const IChronoStatSvc::ChronoTag& statTag) ;
95  // ============================================================================
101  virtual const ChronoEntity* chrono
102  ( const IChronoStatSvc::ChronoTag& t ) const ;
103  // ============================================================================
109  virtual const StatEntity* stat
110  ( const IChronoStatSvc::StatTag& t ) const ;
111  // ============================================================================
116  ChronoStatSvc ( const std::string& name, ISvcLocator* svcloc );
118  virtual ~ChronoStatSvc();
119  // ============================================================================
120 
121 public:
122  void handle(const Incident& incident);
123 
124 
125 protected:
126  // ============================================================================
127  // print the "Stat" part of the ChronoStatSvc
128  void printStats() ;
129  // ============================================================================
130 private:
131  // ============================================================================
132  // default constructor is disabled
133  ChronoStatSvc() ;
134  // copy constructor is disabled
135  ChronoStatSvc( const ChronoStatSvc& ) ;
136  // assignement operator constructor is disabled
138  // ============================================================================
140  void saveStats();
141  // ============================================================================
142 private:
143  // ============================================================================
161 
162  // property
164 
167 
178 
181 
182  // the header row
183  std::string m_header ;
184  // format for regular statistical printout rows
185  std::string m_format1 ;
186  // format for "efficiency" statistical printout rows
187  std::string m_format2 ;
188  // flag to use the special "efficiency" format
190 
191  typedef std::map<ChronoTag, std::vector<IChronoSvc::ChronoTime> > TimeMap;
193  std::string m_perEventFile;
194  std::ofstream m_ofd;
195 
196  // ============================================================================
197 };
198 // ============================================================================
199 // The END
200 // ============================================================================
201 #endif // GAUDISVC_CHRONOSTATSVC_H
202 // ============================================================================
203 
204 

Generated at Wed Jun 4 2014 14:48:56 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004