| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
precedence::Duration Struct Reference

`#include <src/PrecedenceRulesGraph.h>`

Inheritance diagram for precedence::Duration:
[legend]
Collaboration diagram for precedence::Duration:
[legend]

## Public Member Functions
| Duration (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
EventSlot | m_slot
SmartIF< ITimelineSvc > | m_timelineSvc

## Detailed Description

Definition at line 365 of file PrecedenceRulesGraph.h.

## Constructor & Destructor Documentation

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

Definition at line 366 of file PrecedenceRulesGraph.h.

366 : m_slot( slot )
367 {
368 SmartIF<IMessageSvc> msgSvc{svcLocator};
369 MsgStream log{msgSvc, "Duration.Getter"};
370
371 // Figure if we can discover the algorithm timings
372 m_timelineSvc = svcLocator->service<ITimelineSvc>( "TimelineSvc", false );
373 if ( !m_timelineSvc.isValid() )
374 log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to add "
375 << "algorithm's runtimes to the TTT dumps" << endmsg;
376 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc >
precedence::Duration::m_slot
EventSlot m_slot
Definition: PrecedenceRulesGraph.h:401
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
precedence::Duration::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Definition: PrecedenceRulesGraph.h:402
ITimelineSvc
Definition: ITimelineSvc.h:24
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
MSG::WARNING
Definition: IMessageSvc.h:16
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## Member Function Documentation

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

Definition at line 378 of file PrecedenceRulesGraph.h.

379 {
380
381 std::string time;
382
383 if ( m_timelineSvc.isValid() ) {
384
385 TimelineEvent te;
386 te.algorithm = props.m_name;
387 te.slot = m_slot.eventContext->slot();
388 te.event = m_slot.eventContext->evt();
389
390 m_timelineSvc->getTimelineEvent( te );
391 time = std::to_string( std::chrono::duration_cast<std::chrono::nanoseconds>( te.end - te.start ).count() );
392 }
393
394 return time;
395 }
EventContext::slot
ContextID_t slot() const
Definition: EventContext.h:40
EventSlot::eventContext
EventContext * eventContext
Cache for the eventContext.
Definition: EventSlot.h:28
std::to_string
T to_string(T...args)
precedence::Duration::m_slot
EventSlot m_slot
Definition: PrecedenceRulesGraph.h:401
plotSpeedupsPyRoot.time
time
Definition: plotSpeedupsPyRoot.py:154
TimelineEvent::algorithm
std::string algorithm
Definition: ITimelineSvc.h:18
TimelineEvent::event
uint event
Definition: ITimelineSvc.h:16
TimelineEvent
Definition: ITimelineSvc.h:13
EventContext::evt
ContextEvt_t evt() const
Definition: EventContext.h:39
std::string
STL class.
ITimelineSvc::getTimelineEvent
virtual void getTimelineEvent(TimelineEvent &) const =0
TimelineEvent::end
time_point end
Definition: ITimelineSvc.h:21
precedence::Duration::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Definition: PrecedenceRulesGraph.h:402
TimelineEvent::start
time_point start
Definition: ITimelineSvc.h:20
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
TimelineEvent::slot
uint slot
Definition: ITimelineSvc.h:15

std::string precedence::Duration::operator() | ( | const DecisionHubProps & |  | ) | const
| inline

Definition at line 397 of file PrecedenceRulesGraph.h.

397 { return ""; }

std::string precedence::Duration::operator() | ( | const DataProps & |  | ) | const
| inline

Definition at line 399 of file PrecedenceRulesGraph.h.

399 { return ""; }

## Member Data Documentation

EventSlot precedence::Duration::m_slot

Definition at line 401 of file PrecedenceRulesGraph.h.

SmartIF<ITimelineSvc> precedence::Duration::m_timelineSvc

Definition at line 402 of file PrecedenceRulesGraph.h.

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

- GaudiHive/src/PrecedenceRulesGraph.h