Gaudi Framework, version v23r5
Home
Generated: Wed Nov 28 2012
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
GaudiAud
src
ChronoAuditor.cpp
Go to the documentation of this file.
1
// ChronoAuditor:
2
// An auditor that monitors time
3
4
#ifdef __ICC
5
// disable icc warning #654: overloaded virtual function "B::Y" is only partially overridden in class "C"
6
// TODO: there is only a partial overload of IAuditor::before and IAuditor::after
7
#pragma warning(disable:654)
8
#endif
9
10
#include "
ChronoAuditor.h
"
11
#include "
GaudiKernel/AudFactory.h
"
12
13
DECLARE_AUDITOR_FACTORY
(
ChronoAuditor
)
14
15
ChronoAuditor
::
ChronoAuditor
(const
std
::
string
& name,
ISvcLocator
* pSvcLocator)
16
:
CommonAuditor
(name, pSvcLocator) {
17
}
18
19
ChronoAuditor::~ChronoAuditor
() {}
20
21
StatusCode
ChronoAuditor::initialize
() {
22
StatusCode
sc
=
CommonAuditor::initialize
();
23
if
(
UNLIKELY
(sc.
isFailure
()))
return
sc
;
24
25
m_chronoSvc
=
serviceLocator
()->service(
"ChronoStatSvc"
);
26
if
(
UNLIKELY
(!
m_chronoSvc
.
get
())) {
27
MsgStream
log
(
msgSvc
(),
name
());
28
log <<
MSG::ERROR
<<
"Cannot get ChronoStatSvc"
<<
endmsg
;
29
return
StatusCode::FAILURE
;
30
}
31
return
StatusCode::SUCCESS
;
32
}
33
34
void
ChronoAuditor::i_before
(CustomEventTypeRef
evt
,
const
std::string
& caller)
35
{
36
chronoSvc
()->chronoStart(
i_id
(evt, caller));
37
}
38
39
void
ChronoAuditor::i_after
(CustomEventTypeRef
evt
,
const
std::string
& caller,
const
StatusCode
&)
40
{
41
chronoSvc
()->chronoStop(
i_id
(evt, caller));
42
}
Generated at Wed Nov 28 2012 12:17:10 for Gaudi Framework, version v23r5 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004