ATLAS Offline Software
Loading...
Searching...
No Matches
Simulation
G4Utilities
G4RunManagement
src
SyncEventAction.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SyncEventAction.h
"
6
7
#include "G4RunManager.hh"
8
#include "G4Event.hh"
9
#include "G4EventManager.hh"
10
11
#include "
G4RunManagement/AtlasG4SyncEventUserInfo.h
"
12
13
namespace
G4UA
14
{
15
16
void
SyncEventAction::BeginOfEventAction
(
const
G4Event* event)
17
{
18
if
(!event->GetUserInformation()) {
19
G4RunManager::GetRunManager()->AbortRun();
20
}
21
}
22
23
void
SyncEventAction::EndOfEventAction
(
const
G4Event* event)
24
{
25
// Simulation is done, signal back to Athena
26
if
(
auto
* atlasG4EvtUserInfo =
dynamic_cast<
AtlasG4SyncEventUserInfo
*
>
( event->GetUserInformation() )) {
27
atlasG4EvtUserInfo->SyncInterface()->EventAborted(event->IsAborted());
28
atlasG4EvtUserInfo->SyncInterface()->SetStatusDone();
29
}
30
}
31
32
}
// namespace G4UA
AtlasG4SyncEventUserInfo.h
SyncEventAction.h
AtlasG4SyncEventUserInfo
Definition
AtlasG4SyncEventUserInfo.h:53
G4UA::SyncEventAction::EndOfEventAction
virtual void EndOfEventAction(const G4Event *) override
Definition
SyncEventAction.cxx:23
G4UA::SyncEventAction::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override
Definition
SyncEventAction.cxx:16
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
Generated on
for ATLAS Offline Software by
1.14.0