The Gaudi Framework
master (53dee381)
Toggle main menu visibility
Loading...
Searching...
No Matches
ITimelineSvc.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2026 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
// Construct a TimelineRecorder with an empty record object, algorithm name, and event context
31
TimelineRecorder
(
TimelineEvent
& record, std::string alg,
const
EventContext
& ctx );
32
// Construct a TimelineRecorder with a record object with pre-filled algorithm name and event context
33
TimelineRecorder
(
TimelineEvent
& record );
34
35
TimelineRecorder
(
const
TimelineRecorder
& ) =
delete
;
36
TimelineRecorder
&
operator=
(
const
TimelineRecorder
& ) =
delete
;
37
TimelineRecorder
(
TimelineRecorder
&& other ) :
m_record
{
std
::exchange( other.
m_record
, nullptr ) } {}
38
39
TimelineRecorder
&
operator=
(
TimelineRecorder
&& other ) {
40
m_record
= std::exchange( other.m_record,
nullptr
);
41
return
*
this
;
42
}
43
44
~TimelineRecorder
();
45
46
private
:
47
TimelineEvent
*
m_record
=
nullptr
;
48
};
49
50
virtual
TimelineRecorder
getRecorder
( std::string alg,
const
EventContext
& ctx ) = 0;
51
// Augment a partially pre-filled TimelineEvent object with matching info
52
[[deprecated(
"Use getFirstMatching or getLastMatching instead"
)]]
virtual
bool
53
getTimelineEvent
(
TimelineEvent
& )
const
= 0;
54
// Augment a partially pre-filled TimelineEvent object with matching info. If there are multiple events for the same
55
// algorithm and event context, the first one (by start time) is returned.
56
virtual
bool
getFirstMatching
(
TimelineEvent
& )
const
= 0;
57
// Augment a partially pre-filled TimelineEvent object with matching info. If there are multiple events for the same
58
// algorithm and event context, the first one (by start time) is returned.
59
virtual
bool
getLastMatching
(
TimelineEvent
& )
const
= 0;
60
virtual
bool
isEnabled
()
const
= 0;
61
};
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:35
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:37
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:39
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition
ITimelineSvc.h:47
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::getLastMatching
virtual bool getLastMatching(TimelineEvent &) const =0
ITimelineSvc::getFirstMatching
virtual bool getFirstMatching(TimelineEvent &) const =0
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
for The Gaudi Framework by
1.17.0