| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Public Member Functions | Private Attributes | List of all members
ITimelineSvc::TimelineRecorder Class Referencefinal

RAII helper to record timeline events. More...

`#include <GaudiKernel/ITimelineSvc.h>`

Collaboration diagram for ITimelineSvc::TimelineRecorder:
[legend]

## Public Types
using | Clock = TimelineEvent::Clock

## Public Member Functions
| TimelineRecorder ()=default
| TimelineRecorder (TimelineEvent &record, std::string alg, const EventContext &ctx)
| TimelineRecorder (const TimelineRecorder &)=delete
| TimelineRecorder (TimelineRecorder &&other)
TimelineRecorder & | operator= (TimelineRecorder &&other)
| ~TimelineRecorder ()

## Private Attributes
TimelineEvent * | m_record = nullptr

## Detailed Description

RAII helper to record timeline events.

Definition at line 34 of file ITimelineSvc.h.

## Member Typedef Documentation

## ◆ Clock

using ITimelineSvc::TimelineRecorder::Clock = TimelineEvent::Clock

Definition at line 36 of file ITimelineSvc.h.

## Constructor & Destructor Documentation

## ◆ TimelineRecorder() [1/4]

ITimelineSvc::TimelineRecorder::TimelineRecorder | ( |  | ) |
| default

## ◆ TimelineRecorder() [2/4]

ITimelineSvc::TimelineRecorder::TimelineRecorder | ( | TimelineEvent & | record,
|  | std::string | alg,
|  | const EventContext & | ctx
| ) |  |

Definition at line 4 of file ITimelineSvc.cpp.

5 : m_record{&record} {
6 m_record->thread = pthread_self();
7 m_record->slot = ctx.slot();
8 m_record->event = ctx.evt();
9 m_record->algorithm = std::move( alg );
10 m_record->start = Clock::now();
11 }
EventContext::slot
ContextID_t slot() const
Definition: EventContext.h:41
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
EventContext::evt
ContextEvt_t evt() const
Definition: EventContext.h:40
TimelineEvent::thread
pthread_t thread
Definition: ITimelineSvc.h:17
TimelineEvent::algorithm
std::string algorithm
Definition: ITimelineSvc.h:21
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition: ITimelineSvc.h:54
std::move
T move(T... args)
TimelineEvent::start
time_point start
Definition: ITimelineSvc.h:23
std::chrono::high_resolution_clock::now
T now(T... args)
TimelineEvent::event
size_t event
Definition: ITimelineSvc.h:19
TimelineEvent::slot
size_t slot
Definition: ITimelineSvc.h:18

## ◆ TimelineRecorder() [3/4]

ITimelineSvc::TimelineRecorder::TimelineRecorder | ( | const TimelineRecorder & |  | ) |
| delete

## ◆ TimelineRecorder() [4/4]

ITimelineSvc::TimelineRecorder::TimelineRecorder | ( | TimelineRecorder && | other | ) |
| inline

Definition at line 42 of file ITimelineSvc.h.

42 : m_record{other.m_record} { other.m_record = nullptr; }
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition: ITimelineSvc.h:54

## ◆ ~TimelineRecorder()

ITimelineSvc::TimelineRecorder::~TimelineRecorder | ( |  | ) |
| inline

Definition at line 49 of file ITimelineSvc.h.

49 {
50 if ( m_record ) m_record->end = Clock::now();
51 }
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition: ITimelineSvc.h:54
TimelineEvent::end
time_point end
Definition: ITimelineSvc.h:24
std::chrono::high_resolution_clock::now
T now(T... args)

## Member Function Documentation

## ◆ operator=()

TimelineRecorder& ITimelineSvc::TimelineRecorder::operator= | ( | TimelineRecorder && | other | ) |
| inline

Definition at line 44 of file ITimelineSvc.h.

44 {
45 std::swap( m_record, other.m_record );
46 return *this;
47 }
std::swap
T swap(T... args)
ITimelineSvc::TimelineRecorder::m_record
TimelineEvent * m_record
Definition: ITimelineSvc.h:54

## Member Data Documentation

## ◆ m_record

TimelineEvent* ITimelineSvc::TimelineRecorder::m_record = nullptr
| private

Definition at line 54 of file ITimelineSvc.h.

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/ITimelineSvc.h
- GaudiKernel/src/Lib/ITimelineSvc.cpp