ATLAS Offline Software
Loading...
Searching...
No Matches
G4EventSynchronizationInterface Class Reference

#include <AtlasG4SyncEventUserInfo.h>

Collaboration diagram for G4EventSynchronizationInterface:

Public Types

enum class  EventOutcome { Success , Aborted , PreparationFailed , RunTerminated }

Public Member Functions

EventStatus Status () const
void Complete (EventOutcome outcome) noexcept
 Record the first completion outcome and wake Athena.
void WaitStatusDone ()
EventOutcome Outcome () const

Private Types

enum class  EventStatus { Ready , Done , Size }

Private Member Functions

void WaitStatus (const EventStatus &)

Private Attributes

EventOutcome m_outcome {EventOutcome::Success}
EventStatus m_status {EventStatus::Ready}
std::mutex m_mutex
std::condition_variable m_cv

Detailed Description

Definition at line 27 of file AtlasG4SyncEventUserInfo.h.

Member Enumeration Documentation

◆ EventOutcome

Enumerator
Success 
Aborted 
PreparationFailed 
RunTerminated 

Definition at line 35 of file AtlasG4SyncEventUserInfo.h.

35 {
36 Success,
37 Aborted,
38 PreparationFailed,
39 RunTerminated
40 };

◆ EventStatus

Enumerator
Ready 
Done 
Size 

Definition at line 29 of file AtlasG4SyncEventUserInfo.h.

29 {
30 Ready,
31 Done,
32 Size
33 };

Member Function Documentation

◆ Complete()

void G4EventSynchronizationInterface::Complete ( EventOutcome outcome)
noexcept

Record the first completion outcome and wake Athena.

Definition at line 40 of file AtlasG4SyncEventUserInfo.cxx.

◆ Outcome()

auto G4EventSynchronizationInterface::Outcome ( ) const

Definition at line 34 of file AtlasG4SyncEventUserInfo.cxx.

35{
36 std::scoped_lock lk(m_mutex);
37 return m_outcome;
38}

◆ Status()

auto G4EventSynchronizationInterface::Status ( ) const

Definition at line 28 of file AtlasG4SyncEventUserInfo.cxx.

29{
30 std::scoped_lock lk(m_mutex);
31 return m_status;
32}

◆ WaitStatus()

void G4EventSynchronizationInterface::WaitStatus ( const EventStatus & status)
private

Definition at line 56 of file AtlasG4SyncEventUserInfo.cxx.

57{
58 std::unique_lock lk(m_mutex);
59 m_cv.wait(lk, [this,status]{ return m_status==status; });
60}
status
Definition merge.py:16

◆ WaitStatusDone()

void G4EventSynchronizationInterface::WaitStatusDone ( )
inline

Definition at line 45 of file AtlasG4SyncEventUserInfo.h.

Member Data Documentation

◆ m_cv

std::condition_variable G4EventSynchronizationInterface::m_cv
private

Definition at line 54 of file AtlasG4SyncEventUserInfo.h.

◆ m_mutex

std::mutex G4EventSynchronizationInterface::m_mutex
mutableprivate

Definition at line 53 of file AtlasG4SyncEventUserInfo.h.

◆ m_outcome

EventOutcome G4EventSynchronizationInterface::m_outcome {EventOutcome::Success}
private

◆ m_status

EventStatus G4EventSynchronizationInterface::m_status {EventStatus::Ready}
private

Definition at line 52 of file AtlasG4SyncEventUserInfo.h.


The documentation for this class was generated from the following files: