The Gaudi Framework
master (b9786168)
Loading...
Searching...
No Matches
LockedChrono.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/ChronoEntity.h
>
14
15
namespace
Gaudi
{
16
namespace
Utils
{
53
class
LockedChrono
{
54
public
:
56
LockedChrono
(
ChronoEntity
& c,
bool
& lock ) :
m_timer
( c ),
m_locker
( lock ) {
57
if
( !lock ) {
58
m_timer
.start();
59
m_locker
=
true
;
60
m_locked
=
true
;
61
}
62
}
63
64
~LockedChrono
() {
65
if
(
m_locked
) {
66
m_timer
.stop();
67
m_locker
=
false
;
68
}
69
}
70
LockedChrono
() =
delete
;
71
72
private
:
74
ChronoEntity
&
m_timer
;
// the actual timer
76
bool
&
m_locker
;
// the actual locker
78
bool
m_locked
=
false
;
// locked ?
79
};
80
}
// namespace Utils
81
}
// namespace Gaudi
ChronoEntity.h
ChronoEntity
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition
ChronoEntity.h:26
Gaudi::Utils::LockedChrono::m_locked
bool m_locked
locked ?
Definition
LockedChrono.h:78
Gaudi::Utils::LockedChrono::~LockedChrono
~LockedChrono()
destructor:
Definition
LockedChrono.h:64
Gaudi::Utils::LockedChrono::m_timer
ChronoEntity & m_timer
the actual timer
Definition
LockedChrono.h:74
Gaudi::Utils::LockedChrono::m_locker
bool & m_locker
the actual locker
Definition
LockedChrono.h:76
Gaudi::Utils::LockedChrono::LockedChrono
LockedChrono()=delete
Gaudi::Utils::LockedChrono::LockedChrono
LockedChrono(ChronoEntity &c, bool &lock)
constructor from the actual timer: start the timer
Definition
LockedChrono.h:56
Gaudi::Utils
Definition
Property.h:641
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition
__init__.py:1
GaudiKernel
include
GaudiKernel
LockedChrono.h
Generated on Tue Oct 28 2025 17:49:22 for The Gaudi Framework by
1.13.1