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

Detailed Description

Definition at line 257 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ StartTime()

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

Definition at line 258 of file PrecedenceRulesGraph.h.

259 : m_slot( slot ), m_timelineSvc( svcLocator->service<ITimelineSvc>( "TimelineSvc", false ) ) {
260 SmartIF<IMessageSvc> msgSvc{ svcLocator };
261 MsgStream log{ msgSvc, "StartTime.Getter" };
262
263 // Figure if we can discover the algorithm timings
264 if ( !m_timelineSvc.isValid() ) {
265 log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to "
266 << "add algorithm start time to the TTT dumps" << endmsg;
267 }
268 }
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 270 of file PrecedenceRulesGraph.h.

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

◆ operator()() [2/3]

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

Definition at line 291 of file PrecedenceRulesGraph.h.

291{ return ""; }

◆ operator()() [3/3]

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

Definition at line 289 of file PrecedenceRulesGraph.h.

289{ return ""; }

Member Data Documentation

◆ m_slot

const EventSlot& precedence::StartTime::m_slot

Definition at line 293 of file PrecedenceRulesGraph.h.

◆ m_timelineSvc

SmartIF<ITimelineSvc> precedence::StartTime::m_timelineSvc

Definition at line 294 of file PrecedenceRulesGraph.h.


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