The Gaudi Framework  master (9f3f8895)
Loading...
Searching...
No Matches
precedence::StartTime Struct Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h>

Collaboration diagram for precedence::StartTime:

Public Member Functions

 StartTime (const EventSlot &slot, SmartIF< ISvcLocator > &svcLocator)
std::string operator() (const AlgoProps &props) const
std::string operator() (const DecisionHubProps &) const
std::string operator() (const DataProps &) const

Public Attributes

const EventSlot & m_slot
SmartIF< ITimelineSvc > m_timelineSvc

Detailed Description

Definition at line 260 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ StartTime()

precedence::StartTime::StartTime ( const EventSlot & slot,
SmartIF< ISvcLocator > & svcLocator )
inline

Definition at line 261 of file PrecedenceRulesGraph.h.

262 : m_slot( slot ), m_timelineSvc( svcLocator->service<ITimelineSvc>( "TimelineSvc", false ) ) {
263 SmartIF<IMessageSvc> msgSvc{ svcLocator };
264 MsgStream log{ msgSvc, "StartTime.Getter" };
265
266 // Figure if we can discover the algorithm timings
267 if ( !m_timelineSvc.isValid() ) {
268 log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to "
269 << "add algorithm start time to the TTT dumps" << endmsg;
270 }
271 }
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
GAUDI_API ISvcLocator * svcLocator()
@ WARNING
Definition IMessageSvc.h:22
SmartIF< ITimelineSvc > m_timelineSvc

Member Function Documentation

◆ operator()() [1/3]

std::string precedence::StartTime::operator() ( const AlgoProps & props) const
inline

Definition at line 273 of file PrecedenceRulesGraph.h.

273 {
274
275 std::string startTime;
276
277 if ( m_timelineSvc.isValid() ) {
278
279 TimelineEvent te{};
280 te.algorithm = props.m_name;
281 te.slot = m_slot.eventContext->slot();
282 te.event = m_slot.eventContext->evt();
283
284 m_timelineSvc->getFirstMatching( te );
285 startTime = std::to_string(
286 std::chrono::duration_cast<std::chrono::nanoseconds>( te.start.time_since_epoch() ).count() );
287 }
288
289 return startTime;
290 }
time_point start
std::string algorithm

◆ operator()() [2/3]

std::string precedence::StartTime::operator() ( const DataProps & ) const
inline

Definition at line 294 of file PrecedenceRulesGraph.h.

294{ return ""; }

◆ operator()() [3/3]

std::string precedence::StartTime::operator() ( const DecisionHubProps & ) const
inline

Definition at line 292 of file PrecedenceRulesGraph.h.

292{ return ""; }

Member Data Documentation

◆ m_slot

const EventSlot& precedence::StartTime::m_slot

Definition at line 296 of file PrecedenceRulesGraph.h.

◆ m_timelineSvc

SmartIF<ITimelineSvc> precedence::StartTime::m_timelineSvc

Definition at line 297 of file PrecedenceRulesGraph.h.


The documentation for this struct was generated from the following file: