The Gaudi Framework
master (bdbe7744)
Toggle main menu visibility
Loading...
Searching...
No Matches
ITimelineSvc.cpp
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
#include <
GaudiKernel/EventContext.h
>
12
#include <
GaudiKernel/ITimelineSvc.h
>
13
#include <
GaudiKernel/TimelineEvent.h
>
14
15
#include <string>
16
17
ITimelineSvc::TimelineRecorder::TimelineRecorder
(
TimelineEvent
& record, std::string alg,
const
EventContext
& ctx )
18
:
m_record
{ &record } {
19
m_record
->thread = pthread_self();
20
m_record
->slot = ctx.slot();
21
m_record
->event = ctx.evt();
22
m_record
->algorithm = std::move( alg );
23
m_record
->start = TimelineEvent::Clock::now();
24
}
25
26
ITimelineSvc::TimelineRecorder::TimelineRecorder
(
TimelineEvent
& record ) :
m_record
{ &record } {
27
m_record
->thread = pthread_self();
28
// m_record->slot, m_record->event, m_record->algorithm are expected to be pre-filled
29
m_record
->start = TimelineEvent::Clock::now();
30
}
31
32
ITimelineSvc::TimelineRecorder::~TimelineRecorder
() {
33
if
(
m_record
)
m_record
->end = TimelineEvent::Clock::now();
34
}
EventContext.h
ITimelineSvc.h
TimelineEvent.h
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
ITimelineSvc::TimelineRecorder::TimelineRecorder
TimelineRecorder()=default
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition
ITimelineSvc.h:47
ITimelineSvc::TimelineRecorder::~TimelineRecorder
~TimelineRecorder()
Definition
ITimelineSvc.cpp:32
TimelineEvent
Definition
TimelineEvent.h:17
GaudiKernel
src
Lib
ITimelineSvc.cpp
Generated on
for The Gaudi Framework by
1.17.0