The Gaudi Framework  v29r0 (ff2e7097)
TimelineSvc.h
Go to the documentation of this file.
1 
2 #ifndef GAUDIHIVE_TIMELINESVC_H
3 #define GAUDIHIVE_TIMELINESVC_H
4 
6 #include "GaudiKernel/Service.h"
7 
8 #include <string>
9 
10 #include "tbb/concurrent_vector.h"
11 
12 class TimelineSvc : public extends<Service, ITimelineSvc>
13 {
14 
15 public:
16  StatusCode initialize() override;
17  StatusCode reinitialize() override;
18  StatusCode finalize() override;
19 
20  void registerTimelineEvent( const TimelineEvent& ) override;
21  void getTimelineEvent( TimelineEvent& ) const override;
22 
23  bool isEnabled() const override { return m_isEnabled; }
24 
25  using extends::extends;
26 
27  // Destructor.
28  ~TimelineSvc() override = default;
29 
30 private:
31  void outputTimeline();
32 
33  Gaudi::Property<std::string> m_timelineFile{this, "TimelineFile", "timeline.csv", ""};
34  Gaudi::Property<bool> m_isEnabled{this, "RecordTimeline", false, "Enable recording of the timeline events"};
35  Gaudi::Property<bool> m_dumpTimeline{this, "DumpTimeline", false, "Enable dumping of the timeline events"};
36  Gaudi::Property<bool> m_partial{this, "Partial", false, ""};
37 
38  tbb::concurrent_vector<TimelineEvent> m_events;
39 };
40 
41 #endif
void getTimelineEvent(TimelineEvent &) const override
Definition: TimelineSvc.cpp:75
Implementation of property with value of concrete type.
Definition: Property.h:319
Gaudi::Property< bool > m_partial
Definition: TimelineSvc.h:36
bool isEnabled() const override
Definition: TimelineSvc.h:23
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
Gaudi::Property< bool > m_isEnabled
Definition: TimelineSvc.h:34
tbb::concurrent_vector< TimelineEvent > m_events
Definition: TimelineSvc.h:38
StatusCode finalize() override
Definition: TimelineSvc.cpp:42
~TimelineSvc() override=default
StatusCode initialize() override
Definition: TimelineSvc.cpp:9
Gaudi::Property< std::string > m_timelineFile
Definition: TimelineSvc.h:33
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
void registerTimelineEvent(const TimelineEvent &) override
Definition: TimelineSvc.cpp:60
void outputTimeline()
Definition: TimelineSvc.cpp:91
StatusCode reinitialize() override
Definition: TimelineSvc.cpp:30
Gaudi::Property< bool > m_dumpTimeline
Definition: TimelineSvc.h:35