Gaudi Framework, version v25r1
Home
Generated: Mon Mar 24 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
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 Mon Mar 24 2014 18:27:44 for Gaudi Framework, version v25r1 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004