The Gaudi Framework  master (ff829712)
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 EventSlotm_slot
 
SmartIF< ITimelineSvcm_timelineSvc
 

Detailed Description

Definition at line 297 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ EndTime()

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

Definition at line 298 of file PrecedenceRulesGraph.h.

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

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

◆ operator()() [2/3]

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

Definition at line 330 of file PrecedenceRulesGraph.h.

330{ return ""; }

◆ operator()() [3/3]

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

Definition at line 328 of file PrecedenceRulesGraph.h.

328{ return ""; }

Member Data Documentation

◆ m_slot

const EventSlot& precedence::EndTime::m_slot

Definition at line 332 of file PrecedenceRulesGraph.h.

◆ m_timelineSvc

SmartIF<ITimelineSvc> precedence::EndTime::m_timelineSvc

Definition at line 333 of file PrecedenceRulesGraph.h.


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