The Gaudi Framework
master (9f3f8895)
Toggle main menu visibility
Loading...
Searching...
No Matches
TimelineSvc.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
12
#pragma once
13
14
#include <
GaudiKernel/ITimelineSvc.h
>
15
#include <
GaudiKernel/Service.h
>
16
#include <string>
17
18
#include <boost/functional/hash.hpp>
19
#include <tbb/concurrent_unordered_map.h>
20
21
class
TimelineSvc
:
public
extends
<Service, ITimelineSvc> {
22
public
:
23
using
extends::extends;
24
25
StatusCode
initialize
()
override
;
26
StatusCode
reinitialize
()
override
;
27
StatusCode
finalize
()
override
;
28
29
TimelineRecorder
getRecorder
( std::string alg,
const
EventContext
& ctx )
override
;
30
31
bool
getTimelineEvent
(
TimelineEvent
& )
const override
;
32
bool
getFirstMatching
(
TimelineEvent
& )
const override
;
33
bool
getLastMatching
(
TimelineEvent
& )
const override
;
34
bool
isEnabled
()
const override
{
return
m_isEnabled
; }
35
36
private
:
37
void
outputTimeline
();
38
39
Gaudi::Property<std::string>
m_timelineFile
{
this
,
"TimelineFile"
,
"timeline.csv"
,
""
};
40
Gaudi::Property<bool>
m_isEnabled
{
this
,
"RecordTimeline"
,
false
,
"Enable recording of the timeline events"
};
41
Gaudi::Property<bool>
m_dumpTimeline
{
this
,
"DumpTimeline"
,
false
,
"Enable dumping of the timeline events"
};
42
Gaudi::Property<bool>
m_partial
{
this
,
"Partial"
,
false
,
""
};
43
44
using
key_type
= std::tuple<std::string, std::size_t>;
45
tbb::concurrent_unordered_multimap<key_type, TimelineEvent, boost::hash<key_type>>
m_events
;
46
};
ITimelineSvc.h
Service.h
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
Gaudi::Property
Implementation of property with value of concrete type.
Definition
Property.h:35
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
TimelineSvc
Definition
TimelineSvc.h:21
TimelineSvc::m_isEnabled
Gaudi::Property< bool > m_isEnabled
Definition
TimelineSvc.h:40
TimelineSvc::m_partial
Gaudi::Property< bool > m_partial
Definition
TimelineSvc.h:42
TimelineSvc::outputTimeline
void outputTimeline()
Definition
TimelineSvc.cpp:102
TimelineSvc::getTimelineEvent
bool getTimelineEvent(TimelineEvent &) const override
Definition
TimelineSvc.cpp:82
TimelineSvc::initialize
StatusCode initialize() override
Definition
TimelineSvc.cpp:20
TimelineSvc::reinitialize
StatusCode reinitialize() override
Definition
TimelineSvc.cpp:40
TimelineSvc::getFirstMatching
bool getFirstMatching(TimelineEvent &) const override
Definition
TimelineSvc.cpp:84
TimelineSvc::finalize
StatusCode finalize() override
Definition
TimelineSvc.cpp:50
TimelineSvc::m_timelineFile
Gaudi::Property< std::string > m_timelineFile
Definition
TimelineSvc.h:39
TimelineSvc::isEnabled
bool isEnabled() const override
Definition
TimelineSvc.h:34
TimelineSvc::key_type
std::tuple< std::string, std::size_t > key_type
Definition
TimelineSvc.h:44
TimelineSvc::getRecorder
TimelineRecorder getRecorder(std::string alg, const EventContext &ctx) override
Definition
TimelineSvc.cpp:63
TimelineSvc::m_dumpTimeline
Gaudi::Property< bool > m_dumpTimeline
Definition
TimelineSvc.h:41
TimelineSvc::getLastMatching
bool getLastMatching(TimelineEvent &) const override
Definition
TimelineSvc.cpp:93
TimelineSvc::m_events
tbb::concurrent_unordered_multimap< key_type, TimelineEvent, boost::hash< key_type > > m_events
Definition
TimelineSvc.h:45
extends
Base class used to extend a class implementing other interfaces.
Definition
extends.h:19
TimelineEvent
Definition
TimelineEvent.h:17
GaudiHive
src
TimelineSvc.h
Generated on
for The Gaudi Framework by
1.17.0