The Gaudi Framework  master (53dee381)
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
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 // 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
34
37 TimelineRecorder( TimelineRecorder&& other ) : m_record{ std::exchange( other.m_record, nullptr ) } {}
38
40 m_record = std::exchange( other.m_record, nullptr );
41 return *this;
42 }
43
45
46 private:
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
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};
#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 bool getLastMatching(TimelineEvent &) const =0
virtual bool getFirstMatching(TimelineEvent &) const =0
virtual TimelineRecorder getRecorder(std::string alg, const EventContext &ctx)=0
STL namespace.