Gaudi Framework, version v23r7

Home   Generated: Wed Mar 20 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SequencerTimerTool.h
Go to the documentation of this file.
1 // $Id: SequencerTimerTool.h,v 1.7 2005/07/29 16:49:43 hmd Exp $
2 #ifndef SEQUENCERTIMERTOOL_H
3 #define SEQUENCERTIMERTOOL_H 1
4 
5 // Include files
6 // from Gaudi
9 
10 // local
11 #include "TimerForSequencer.h"
12 
13 
27 class SequencerTimerTool : public GaudiHistoTool, virtual public ISequencerTimerTool{
28 public:
29 
32  const std::string& name,
33  const IInterface* parent);
34 
35  virtual ~SequencerTimerTool( );
36 
38  virtual StatusCode initialize();
39 
41  virtual StatusCode finalize();
42 
44  virtual int addTimer( std::string name ) {
45  std::string myName;
46  if ( 0 < m_indent ) {
47  std::string prefix( m_indent, ' ' );
48  myName += prefix;
49  }
50  std::string space( m_headerSize, ' ' );
51  myName += name + space ;
52  myName = myName.substr( 0, m_headerSize );
53 
55  return m_timerList.size() -1;
56  };
57 
59  virtual void increaseIndent() { m_indent += 2; };
60 
62  virtual void decreaseIndent() {
63  m_indent -= 2;
64  if ( 0 > m_indent ) m_indent = 0;
65  };
66 
69  void start( int index ) { m_timerList[index].start(); };
70 
73  double stop( int index ) { return m_timerList[index].stop(); };
74 
76  double lastTime( int index ) { return m_timerList[index].lastTime(); };
77 
80  std::string name( int index ) { return m_timerList[index].name(); };
81 
83  int indexByName( std::string name );
84 
86  virtual bool globalTiming() { return m_globalTiming; };
87 
89  virtual void saveHistograms();
90 
91 protected:
92 
93 private:
94  int m_shots;
95  bool m_normalised;
96  int m_indent;
98  double m_normFactor;
99  double m_speedRatio;
101  std::string::size_type m_headerSize;
102 };
103 #endif // SEQUENCERTIMERTOOL_H

Generated at Wed Mar 20 2013 17:59:36 for Gaudi Framework, version v23r7 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004