Gaudi Framework, version v23r9
Home
Generated: Thu Jul 18 2013
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
GaudiKernel
GaudiKernel
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
// ===========================================================================
10
#include "
GaudiKernel/ChronoEntity.h
"
11
// ===========================================================================
12
namespace
Gaudi
13
{
14
// =========================================================================
15
namespace
Utils
16
{
17
// =======================================================================
54
class
LockedChrono
55
{
56
public
:
57
// ======================================================================
59
LockedChrono
(
ChronoEntity
&
c
,
bool
&
lock
)
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
}
72
~
LockedChrono
()
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
// ============================================================================
Generated at Thu Jul 18 2013 12:18:03 for Gaudi Framework, version v23r9 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004