The Gaudi Framework
master (82fdf313)
Loading...
Searching...
No Matches
ITimelineSvc.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/IService.h
>
14
15
#include <string>
16
17
class
EventContext
;
18
struct
TimelineEvent
;
19
20
class
GAUDI_API
ITimelineSvc
:
virtual
public
IService
{
21
22
public
:
24
DeclareInterfaceID
(
ITimelineSvc
, 2, 0 );
25
27
class
TimelineRecorder
final {
28
public
:
29
TimelineRecorder
() =
default
;
30
TimelineRecorder
(
TimelineEvent
& record, std::string alg,
const
EventContext
& ctx );
31
32
TimelineRecorder
(
const
TimelineRecorder
& ) =
delete
;
33
TimelineRecorder
&
operator=
(
const
TimelineRecorder
& ) =
delete
;
34
TimelineRecorder
(
TimelineRecorder
&& other ) :
m_record
{
std
::exchange( other.
m_record
, nullptr ) } {}
35
36
TimelineRecorder
&
operator=
(
TimelineRecorder
&& other ) {
37
m_record
= std::exchange( other.m_record,
nullptr
);
38
return
*
this
;
39
}
40
41
~TimelineRecorder
();
42
43
private
:
44
TimelineEvent
*
m_record
=
nullptr
;
45
};
46
47
virtual
TimelineRecorder
getRecorder
( std::string alg,
const
EventContext
& ctx ) = 0;
48
// Augment a partially pre-filled TimelineEvent object with matching info
49
virtual
bool
getTimelineEvent
(
TimelineEvent
& )
const
= 0;
50
virtual
bool
isEnabled
()
const
= 0;
51
};
IService.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:34
IService
General service interface definition.
Definition
IService.h:26
ITimelineSvc::TimelineRecorder
RAII helper to record timeline events.
Definition
ITimelineSvc.h:27
ITimelineSvc::TimelineRecorder::TimelineRecorder
TimelineRecorder(TimelineRecorder &&other)
Definition
ITimelineSvc.h:34
ITimelineSvc::TimelineRecorder::operator=
TimelineRecorder & operator=(const TimelineRecorder &)=delete
ITimelineSvc::TimelineRecorder::TimelineRecorder
TimelineRecorder()=default
ITimelineSvc::TimelineRecorder::TimelineRecorder
TimelineRecorder(const TimelineRecorder &)=delete
ITimelineSvc::TimelineRecorder::operator=
TimelineRecorder & operator=(TimelineRecorder &&other)
Definition
ITimelineSvc.h:36
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition
ITimelineSvc.h:44
ITimelineSvc
Definition
ITimelineSvc.h:20
ITimelineSvc::isEnabled
virtual bool isEnabled() const =0
ITimelineSvc::getTimelineEvent
virtual bool getTimelineEvent(TimelineEvent &) const =0
ITimelineSvc::DeclareInterfaceID
DeclareInterfaceID(ITimelineSvc, 2, 0)
InterfaceID.
ITimelineSvc::getRecorder
virtual TimelineRecorder getRecorder(std::string alg, const EventContext &ctx)=0
std
STL namespace.
TimelineEvent
Definition
TimelineEvent.h:17
GaudiKernel
include
GaudiKernel
ITimelineSvc.h
Generated on Thu Oct 2 2025 15:31:11 for The Gaudi Framework by
1.13.1