ATLAS Offline Software
Loading...
Searching...
No Matches
IG4RunTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4ATLASINTERFACES_IG4RunTool_H
6#define G4ATLASINTERFACES_IG4RunTool_H
7
8#include <GaudiKernel/IAlgTool.h>
9#include <memory>
10
11// Forward declarations
13
21
22class IG4RunTool : virtual public IAlgTool {
23 public:
24 // type alias
25 using UPEvent = std::unique_ptr<AtlasG4SyncEventUserInfo>;
26
28
29 // Synchronization methods
30 virtual void NotifyBeginRun() = 0;
32 virtual StatusCode WaitBeginRun() = 0;
33
34 // Event queue management
35 virtual size_t Size() const = 0;
36 // Push a non-null event to the queue. Null events are rejected; queue
37 // shutdown is controlled internally by G4RunTool::finalize().
38 virtual void PushEvent(UPEvent) = 0;
39 // pop the event from the queue and return it
40 virtual UPEvent GetEvent() = 0;
41};
42
43#endif
Provides an interface to interact with the Geant4 run.
Definition IG4RunTool.h:22
virtual size_t Size() const =0
virtual void PushEvent(UPEvent)=0
virtual void NotifyBeginRun()=0
virtual UPEvent GetEvent()=0
std::unique_ptr< AtlasG4SyncEventUserInfo > UPEvent
Definition IG4RunTool.h:25
virtual StatusCode WaitBeginRun()=0
Wait for BeginOfRun, or return failure if the Geant4 thread stops first.
DeclareInterfaceID(IG4RunTool, 1, 0)