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