All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LockedChrono.h
Go to the documentation of this file.
1 // $Id: $
2 // ===========================================================================
3 #ifndef GAUDI_LOCKEDCHRONO_H
4 #define GAUDI_LOCKEDCHRONO_H 1
5 // ===========================================================================
6 // Include files
7 // ===========================================================================
8 // GaudiKernel
9 // ===========================================================================
11 // ===========================================================================
12 namespace Gaudi
13 {
14  // =========================================================================
15  namespace Utils
16  {
17  // =======================================================================
55  {
56  public:
57  // ======================================================================
60  : m_timer ( c )
61  , m_locker ( lock )
62  , m_locked ( false )
63  {
64  if ( !lock )
65  {
66  m_timer.start() ;
67  m_locker = true ;
68  m_locked = true ;
69  }
70  }
73  {
74  if ( m_locked )
75  {
76  m_timer.stop () ;
77  m_locker = false ;
78  }
79  }
80  // ======================================================================
81  private:
82  // ======================================================================
84  LockedChrono () ; // no default constructor
85  // ======================================================================
86  private:
87  // ======================================================================
89  ChronoEntity& m_timer ; // the actual timer
91  bool& m_locker ; // the actual locker
93  bool m_locked ; // locked ?
94  // ======================================================================
95  } ;
96  // ========================================================================
97  } // end namespace Gaudi::Utils
98  // ==========================================================================
99 } // end of namespace Gaudi
100 // ============================================================================
101 // The END
102 // ============================================================================
103 #endif // GAUDI_LOCKEDCHRONO_H
104 // ============================================================================
LockedChrono()
no default constructor
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:21
def lock
Definition: locker.py:16
tuple c
Definition: gaudirun.py:341
IChronoSvc::ChronoStatus start()
start the current chrono
ChronoEntity & m_timer
the actual timer
Definition: LockedChrono.h:89
bool & m_locker
the actual locker
Definition: LockedChrono.h:91
LockedChrono(ChronoEntity &c, bool &lock)
constructor from the actual timer: start the timer
Definition: LockedChrono.h:59
Helper object, useful for measurement of CPU-performance of highly-recursive structures, e.g.
Definition: LockedChrono.h:54
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:15
IChronoSvc::ChronoStatus stop()
stop the chrono
~LockedChrono()
destructor:
Definition: LockedChrono.h:72