Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Data Fields
python.g4viscp.G4Scene Class Reference

Public Member Functions

def __init__
 
def create_scene
 
def update_scene
 

Data Fields

 name
 
 volume
 
 copyno
 
 mode_eventaction
 
 mode_runaction
 
 mode
 

Detailed Description

Definition at line 16 of file g4viscp.py.

Constructor & Destructor Documentation

def python.g4viscp.G4Scene.__init__ (   self,
  aname,
  vol = "world",
  acopyno = 0,
  amode = 0,
  bmode = 1 
)

Definition at line 19 of file g4viscp.py.

19 
20  amode=0, bmode=1):
21  self.name= aname
22  self.volume= vol
23  self.copyno= acopyno
24  self.mode_eventaction= amode # 0: accumulate / 1: refresh
25  self.mode_runaction= bmode # 0: accumulate / 1: refresh
26  self.mode= ("accumulate", "refresh")

Member Function Documentation

def python.g4viscp.G4Scene.create_scene (   self)

Definition at line 27 of file g4viscp.py.

References python.g4viscp.G4Scene.copyno, python.g4viscp.G4Scene.name, mcscore.MCParticle.name, G4EzVolume.name, python.g4viscp.G4Scene.update_scene(), and python.g4viscp.G4Scene.volume.

27 
28  def create_scene(self):
29  ApplyUICommand("/vis/scene/create " + self.name)
30  ApplyUICommand("/vis/scene/add/volume %s %d" %
31  (self.volume, self.copyno))
32  ApplyUICommand("/vis/scene/add/trajectories")
33  self.update_scene()
def python.g4viscp.G4Scene.update_scene (   self)

Definition at line 34 of file g4viscp.py.

References python.g4viscp.G4Scene.mode, python.g4viscp.G4Scene.mode_eventaction, python.g4viscp.G4Scene.mode_runaction, python.g4viscp.G4Scene.name, mcscore.MCParticle.name, and G4EzVolume.name.

Referenced by python.g4viscp.G4Scene.create_scene(), and python3.g4viscp.G4Scene.create_scene().

34 
35  def update_scene(self):
36  ApplyUICommand("/vis/scene/select " + self.name)
37  ApplyUICommand("/vis/sceneHandler/attach")
38  ApplyUICommand("/vis/scene/endOfEventAction %s" %
39  (self.mode[self.mode_eventaction]) )
40  ApplyUICommand("/vis/scene/endOfRunAction %s" %
41  (self.mode[self.mode_runaction]) )
42 
43 # ------------------------------------------------------------------
44 # Visualization Control Panel
# ------------------------------------------------------------------

Field Documentation

python.g4viscp.G4Scene.copyno

Definition at line 22 of file g4viscp.py.

Referenced by python.g4viscp.G4Scene.create_scene(), and python3.g4viscp.G4Scene.create_scene().

python.g4viscp.G4Scene.mode

Definition at line 25 of file g4viscp.py.

Referenced by python.g4viscp.G4Scene.update_scene(), and python3.g4viscp.G4Scene.update_scene().

python.g4viscp.G4Scene.mode_eventaction

Definition at line 23 of file g4viscp.py.

Referenced by python.g4viscp.G4Scene.update_scene(), and python3.g4viscp.G4Scene.update_scene().

python.g4viscp.G4Scene.mode_runaction

Definition at line 24 of file g4viscp.py.

Referenced by python.g4viscp.G4Scene.update_scene(), and python3.g4viscp.G4Scene.update_scene().

python.g4viscp.G4Scene.name

Definition at line 20 of file g4viscp.py.

Referenced by python.g4viscp.G4Scene.create_scene(), python3.g4viscp.G4Scene.create_scene(), python3.g4viscp.G4Scene.update_scene(), and python.g4viscp.G4Scene.update_scene().

python.g4viscp.G4Scene.volume

Definition at line 21 of file g4viscp.py.

Referenced by python.g4viscp.G4Scene.create_scene(), and python3.g4viscp.G4Scene.create_scene().


The documentation for this class was generated from the following file: