The Gaudi Framework  master (37c0b60a)
IChronoSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 #ifndef GAUDIKERNEL_ICHRONOSVC_H
12 #define GAUDIKERNEL_ICHRONOSVC_H 1
13 // ============================================================================
14 // Include files
15 // ============================================================================
16 // STD&STL
17 // ============================================================================
18 #include <string>
19 // ============================================================================
20 // GaudiKernel
21 // ============================================================================
22 #include <GaudiKernel/IInterface.h>
23 // ============================================================================
24 // forward declaration
25 // ============================================================================
26 class ChronoEntity;
27 // ============================================================================
41 class GAUDI_API IChronoSvc : virtual public IInterface {
42 public:
45  // ==========================================================================
49  typedef double ChronoTime;
50  // ==========================================================================
51 public:
52  // ==========================================================================
53  // status of Chrono objects
54  enum ChronoStatus { UNKNOWN = 0, RUNNING, STOPPED };
55  // types of Chrono objects
56  enum ChronoType { USER = 0, KERNEL, ELAPSED };
57  // ==========================================================================
58 public:
59  // ==========================================================================
64  virtual ChronoEntity* chronoStart( const ChronoTag& t ) = 0;
65  // ==========================================================================
70  virtual const ChronoEntity* chronoStop( const ChronoTag& t ) = 0;
71  // ==========================================================================
77  virtual ChronoTime chronoDelta( const ChronoTag& t, ChronoType f ) = 0;
78  // ==========================================================================
83  virtual void chronoPrint( const ChronoTag& t ) = 0;
84  // ==========================================================================
89  virtual ChronoStatus chronoStatus( const ChronoTag& t ) = 0;
90  // ==========================================================================
95  virtual const ChronoEntity* chrono( const ChronoTag& t ) const = 0;
96  // ==========================================================================
97 };
98 // ============================================================================
99 // The END
100 // ============================================================================
101 #endif // GAUDIKERNEL_ICHRONOSVC_H
IChronoSvc::DeclareInterfaceID
DeclareInterfaceID(IChronoSvc, 3, 0)
InterfaceID.
std::string
STL class.
ChronoEntity
Definition: ChronoEntity.h:31
IChronoSvc::ChronoTime
double ChronoTime
Type of the delta-time.
Definition: IChronoSvc.h:49
IChronoSvc::chronoDelta
virtual ChronoTime chronoDelta(const ChronoTag &t, ChronoType f)=0
return chrono delta time of last start/stop pair
IChronoSvc::ChronoType
ChronoType
Definition: IChronoSvc.h:56
bug_34121.t
t
Definition: bug_34121.py:31
IInterface.h
IChronoSvc::chronoPrint
virtual void chronoPrint(const ChronoTag &t)=0
prints (using message service) info about chrono, tagged by its name
Io::UNKNOWN
@ UNKNOWN
Definition: IFileMgr.h:156
IChronoSvc::chronoStop
virtual const ChronoEntity * chronoStop(const ChronoTag &t)=0
stop chrono, tagged by its name
IChronoSvc::chrono
virtual const ChronoEntity * chrono(const ChronoTag &t) const =0
extract the chrono entity for the given tag (name)
Gaudi::StateMachine::RUNNING
@ RUNNING
Definition: StateMachine.h:26
IChronoSvc
Definition: IChronoSvc.h:41
IChronoSvc::ChronoTag
std::string ChronoTag
the actual type of identifier for Chrono objects
Definition: IChronoSvc.h:47
IInterface
Definition: IInterface.h:239
IChronoSvc::ChronoStatus
ChronoStatus
Definition: IChronoSvc.h:54
IChronoSvc::chronoStart
virtual ChronoEntity * chronoStart(const ChronoTag &t)=0
start chrono, tagged by its name
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81
IChronoSvc::chronoStatus
virtual ChronoStatus chronoStatus(const ChronoTag &t)=0
return the status of named chrono