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
14
15#include <string>
16
17class EventContext;
18struct TimelineEvent;
19
20class GAUDI_API ITimelineSvc : virtual public IService {
21
22public:
25
27 class TimelineRecorder final {
28 public:
29 TimelineRecorder() = default;
30 TimelineRecorder( TimelineEvent& record, std::string alg, const EventContext& ctx );
31
34 TimelineRecorder( TimelineRecorder&& other ) : m_record{ std::exchange( other.m_record, nullptr ) } {}
35
37 m_record = std::exchange( other.m_record, nullptr );
38 return *this;
39 }
40
42
43 private:
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};
#define GAUDI_API
Definition Kernel.h:49
This class represents an entry point to all the event specific data.
General service interface definition.
Definition IService.h:26
RAII helper to record timeline events.
TimelineRecorder(TimelineRecorder &&other)
TimelineRecorder & operator=(const TimelineRecorder &)=delete
TimelineRecorder(const TimelineRecorder &)=delete
TimelineRecorder & operator=(TimelineRecorder &&other)
virtual bool isEnabled() const =0
virtual bool getTimelineEvent(TimelineEvent &) const =0
DeclareInterfaceID(ITimelineSvc, 2, 0)
InterfaceID.
virtual TimelineRecorder getRecorder(std::string alg, const EventContext &ctx)=0
STL namespace.