ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Utilities
G4RunManagement
src
SyncEventAction.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SyncEventAction.h
"
6
7
#include "
G4RunManagement/AtlasG4SyncEventUserInfo.h
"
8
9
#include "G4RunManager.hh"
10
#include "G4Event.hh"
11
12
namespace
G4UA
13
{
14
15
void
SyncEventAction::BeginOfEventAction
(
const
G4Event* event)
16
{
17
const
auto
* eventInfo =
dynamic_cast<
const
AtlasG4SyncEventUserInfo
*
>
(
18
event
->GetUserInformation());
19
if
(!eventInfo) {
20
// A closed event queue supplies no sync event user info.
21
G4RunManager::GetRunManager()->AbortRun();
22
}
23
else
if
(eventInfo->EventPreparationFailed()) {
24
// Event preparation failed. Abort only this event so that the worker can
25
// continue processing subsequent Athena events.
26
G4RunManager::GetRunManager()->AbortEvent();
27
}
28
}
29
30
}
// namespace G4UA
AtlasG4SyncEventUserInfo.h
SyncEventAction.h
AtlasG4SyncEventUserInfo
Definition
AtlasG4SyncEventUserInfo.h:59
G4UA::SyncEventAction::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override
Definition
SyncEventAction.cxx:15
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
Generated on
for ATLAS Offline Software by
1.17.0