The Gaudi Framework  master (d98a2936)
IChronoSvc.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/IInterface.h>
14 #include <string>
15 
16 class ChronoEntity;
17 
31 class GAUDI_API IChronoSvc : virtual public IInterface {
32 public:
36  typedef std::string ChronoTag;
38  typedef double ChronoTime;
39 
40 public:
41  // status of Chrono objects
42  enum ChronoStatus { UNKNOWN = 0, RUNNING, STOPPED };
43  // types of Chrono objects
44  enum ChronoType { USER = 0, KERNEL, ELAPSED };
45 
50  virtual ChronoEntity* chronoStart( const ChronoTag& t ) = 0;
55  virtual const ChronoEntity* chronoStop( const ChronoTag& t ) = 0;
61  virtual ChronoTime chronoDelta( const ChronoTag& t, ChronoType f ) = 0;
66  virtual void chronoPrint( const ChronoTag& t ) = 0;
71  virtual ChronoStatus chronoStatus( const ChronoTag& t ) = 0;
76  virtual const ChronoEntity* chrono( const ChronoTag& t ) const = 0;
77 };
IChronoSvc::DeclareInterfaceID
DeclareInterfaceID(IChronoSvc, 3, 0)
InterfaceID.
ChronoEntity
Definition: ChronoEntity.h:26
IChronoSvc::ChronoTime
double ChronoTime
Type of the delta-time.
Definition: IChronoSvc.h:38
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:44
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:147
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:25
IChronoSvc
Definition: IChronoSvc.h:31
IChronoSvc::ChronoTag
std::string ChronoTag
the actual type of identifier for Chrono objects
Definition: IChronoSvc.h:36
IInterface
Definition: IInterface.h:225
IChronoSvc::ChronoStatus
ChronoStatus
Definition: IChronoSvc.h:42
IChronoSvc::chronoStart
virtual ChronoEntity * chronoStart(const ChronoTag &t)=0
start chrono, tagged by its name
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:49
IChronoSvc::chronoStatus
virtual ChronoStatus chronoStatus(const ChronoTag &t)=0
return the status of named chrono