30 std::ofstream out(
m_timelineFile +
".part", std::ofstream::trunc | std::ofstream::out );
31 out <<
"#start end algorithm thread slot event" << std::endl;
62 auto& newTimelineEvent = *
m_events.emplace_back();
63 TimelineRecorder recorder{ newTimelineEvent, std::move( alg ), ctx };
65 std::ofstream out(
m_timelineFile +
".part", std::ofstream::app | std::ofstream::out );
66 out << std::chrono::duration_cast<std::chrono::nanoseconds>( newTimelineEvent.start.time_since_epoch() ).count()
68 << std::chrono::duration_cast<std::chrono::nanoseconds>( newTimelineEvent.end.time_since_epoch() ).count()
69 <<
" " << newTimelineEvent.algorithm <<
" " << newTimelineEvent.thread <<
" " << newTimelineEvent.slot <<
" "
70 << newTimelineEvent.event << std::endl;
78 for (
const auto& candidate :
m_events ) {
79 if ( candidate.algorithm == e.
algorithm && candidate.event == e.
event ) {
88 std::ofstream out(
m_timelineFile, std::ofstream::out | std::ofstream::trunc );
90 out <<
"#start end algorithm thread slot event" << std::endl;
93 out << std::chrono::duration_cast<std::chrono::nanoseconds>( e.start.time_since_epoch() ).count() <<
" "
94 << std::chrono::duration_cast<std::chrono::nanoseconds>( e.end.time_since_epoch() ).count() <<
" "
95 << e.algorithm <<
" " << e.thread <<
" " << e.slot <<
" " << e.event << std::endl;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
This class represents an entry point to all the event specific data.
RAII helper to record timeline events.
Definition of the MsgStream class used to transmit messages.
const std::string & name() const override
Retrieve name of the service.
StatusCode initialize() override
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
Gaudi::Property< bool > m_partial
bool getTimelineEvent(TimelineEvent &) const override
StatusCode initialize() override
StatusCode reinitialize() override
StatusCode finalize() override
Gaudi::Property< std::string > m_timelineFile
TimelineRecorder getRecorder(std::string alg, const EventContext &ctx) override
Gaudi::Property< bool > m_dumpTimeline
tbb::concurrent_vector< TimelineEvent > m_events