ATLAS Offline Software
Loading...
Searching...
No Matches
G4RunToolWorkerRunManager Class Referencefinal

Worker run manager which notifies Athena after Geant4 has fully terminated an event. More...

#include <G4RunToolWorkerRunManager.h>

Inheritance diagram for G4RunToolWorkerRunManager:
Collaboration diagram for G4RunToolWorkerRunManager:

Public Member Functions

 G4RunToolWorkerRunManager ()=default

Protected Member Functions

void TerminateOneEvent () override

Detailed Description

Worker run manager which notifies Athena after Geant4 has fully terminated an event.

Definition at line 13 of file G4RunToolWorkerRunManager.h.

Constructor & Destructor Documentation

◆ G4RunToolWorkerRunManager()

G4RunToolWorkerRunManager::G4RunToolWorkerRunManager ( )
default

Member Function Documentation

◆ TerminateOneEvent()

void G4RunToolWorkerRunManager::TerminateOneEvent ( )
overrideprotected

Definition at line 13 of file G4RunToolWorkerRunManager.cxx.

14{
16
17 std::shared_ptr<G4EventSynchronizationInterface> syncInterface;
18 EventOutcome outcome = EventOutcome::Success;
19
20 if (currentEvent) {
21 if (auto* eventInfo = dynamic_cast<AtlasG4SyncEventUserInfo*>(
22 currentEvent->GetUserInformation())) {
23 syncInterface = eventInfo->SyncInterface();
24 if (eventInfo->EventPreparationFailed()) {
25 outcome = EventOutcome::PreparationFailed;
26 }
27 else if (currentEvent->IsAborted()) {
28 outcome = EventOutcome::Aborted;
29 }
30 }
31 }
32
33 // This stacks or deletes the G4Event and updates Geant4's event count.
34 // Notify Athena only after all Geant4 event processing is complete.
35 G4RunManager::TerminateOneEvent();
36
37 if (syncInterface) {
38 syncInterface->Complete(outcome);
39 }
40}

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