ATLAS Offline Software
Loading...
Searching...
No Matches
Chrono.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef ATHENAKERNEL_CHRONO_H
17#define ATHENAKERNEL_CHRONO_H
18
19
20#include "GaudiKernel/IChronoSvc.h"
21#include <string>
22
23
24namespace Athena {
25
26
49class Chrono
50{
51public:
59 Chrono (const std::string& name, IChronoSvc* svc)
60 : m_name (name),
61 m_svc (svc)
62 {
63 m_svc->chronoStart (m_name);
64 }
65
66
71 {
72 m_svc->chronoStop (m_name);
73 }
74
75
76private:
77 std::string m_name;
78 IChronoSvc* m_svc;
79};
80
81
82} // namespace Athena
83
84
85#endif // not ATHENA_KERNEL_CHRONO_H
~Chrono()
Destructor.
Definition Chrono.h:70
Chrono(const std::string &name, IChronoSvc *svc)
Start a IChronoSvc timer.
Definition Chrono.h:59
IChronoSvc * m_svc
Definition Chrono.h:78
std::string m_name
Definition Chrono.h:77
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....