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

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

Collaboration diagram for precedence::EndTime:

Public Member Functions

 EndTime (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 300 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ EndTime()

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

Definition at line 301 of file PrecedenceRulesGraph.h.

302 : m_slot( slot ), m_timelineSvc( svcLocator->service<ITimelineSvc>( "TimelineSvc", false ) ) {
303 SmartIF<IMessageSvc> msgSvc{ svcLocator };
304 MsgStream log{ msgSvc, "EndTime.Getter" };
305
306 // Figure if we can discover the algorithm timings
307 if ( !m_timelineSvc.isValid() )
308 log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to add "
309 << "algorithm completion time to the TTT dumps" << endmsg;
310 }
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::EndTime::operator() ( const AlgoProps & props) const
inline

Definition at line 312 of file PrecedenceRulesGraph.h.

312 {
313
314 std::string endTime;
315
316 if ( m_timelineSvc.isValid() ) {
317
318 TimelineEvent te{};
319 te.algorithm = props.m_name;
320 te.slot = m_slot.eventContext->slot();
321 te.event = m_slot.eventContext->evt();
322
323 m_timelineSvc->getLastMatching( te );
324 endTime =
325 std::to_string( std::chrono::duration_cast<std::chrono::nanoseconds>( te.end.time_since_epoch() ).count() );
326 }
327
328 return endTime;
329 }
time_point end
std::string algorithm

◆ operator()() [2/3]

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

Definition at line 333 of file PrecedenceRulesGraph.h.

333{ return ""; }

◆ operator()() [3/3]

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

Definition at line 331 of file PrecedenceRulesGraph.h.

331{ return ""; }

Member Data Documentation

◆ m_slot

const EventSlot& precedence::EndTime::m_slot

Definition at line 335 of file PrecedenceRulesGraph.h.

◆ m_timelineSvc

SmartIF<ITimelineSvc> precedence::EndTime::m_timelineSvc

Definition at line 336 of file PrecedenceRulesGraph.h.


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