Geant4-11
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
g4thread.py
Go to the documentation of this file.
1"""
2# ==================================================================
3# Python module
4#
5# Geant4 threading module
6#
7# Q, 2005
8# ==================================================================
9"""
10
11import thread
12from G4run import *
13
14# ------------------------------------------------------------------
15# BeamOn in a new thread
16# ------------------------------------------------------------------
17def _TBeamOn(self, nevent):
18 "generate events in a thread"
19 args = (nevent,)
20 thread.start_new_thread(self.BeamOn, args)
21
22G4RunManager.TBeamOn= _TBeamOn
23