Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,276 @@
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
!/* | Permission to use, copy, modify, and distribute this software | */
|
||||
!/* | and its documentation for any purpose and without fee is hereby | */
|
||||
!/* | granted, provided that the above copyright notice appear in all | */
|
||||
!/* | copies and that both that copyright notice and this permission | */
|
||||
!/* | notice appear in supporting documentation. This software is | */
|
||||
!/* | provided "as is" without express or implied warranty. | */
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = EXPO_
|
||||
resources = \
|
||||
Wo**XoCamera.borderWidth:3\
|
||||
Wo*shell_view_panel*XoCamera.borderColor:dimgrey
|
||||
createCallback = osh>\
|
||||
#G4 /init/all\
|
||||
G4 '/run/initialize all'\
|
||||
G4 '/tracking/storeTrajectory 1'\
|
||||
G4 '/gun/particle e-'\
|
||||
#G4 '/gun/particle pi+'\
|
||||
G4 '/gun/direction 0.1 1 0'\
|
||||
G4 '/gun/energy 1 GeV'\
|
||||
create OHistogram name HepJamesRandom1 dimension 1 xAxisTitle James xAxisNumberOfBins 100 xAxisMinimum 0 xAxisMaximum 1 | empty\
|
||||
create OHistogram name HepJamesVsDRand48 dimension 2 xAxisTitle James xAxisNumberOfBins 40 xAxisMinimum 0 xAxisMaximum 1 yAxisTitle DRand48 yAxisNumberOfBins 40 yAxisMinimum 0 yAxisMaximum 1 | empty
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_1
|
||||
type = TopLevelShell
|
||||
children = EXPO_9
|
||||
mappedWhenManaged = true
|
||||
geometry = 700x500+0+0
|
||||
title = Visualization GEANT4 EXPO
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_9
|
||||
type = XmForm
|
||||
children = EXPO_4 EXPO_form
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_4
|
||||
type = XmMenuBar
|
||||
children = EXPO_5 EXPO_6 EXPO_EXPO_casc EXPO_EXPO_pdm EXPO_g4_casc EXPO_g4_pdm Vis3d_casc<Vis3d.odb Vis3d_pull<Vis3d.odb Wo_casc<G4oWo.odb Wo_pull<G4oWo.odb
|
||||
background = lightgrey
|
||||
shadowThickness = 4
|
||||
topShadowColor = white
|
||||
bottomShadowColor = black
|
||||
topAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_5
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = File
|
||||
subMenuId = EXPO_6
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_6
|
||||
type = XmPulldownMenu
|
||||
children = EXPO_exit
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_exit
|
||||
type = XmPushButton
|
||||
background = lightgrey
|
||||
labelString = Exit
|
||||
activateCallback = osh> do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_form
|
||||
type = XmForm
|
||||
children = EXPO_camera EXPO_plot1 EXPO_plot2
|
||||
background = grey
|
||||
topAttachment = attach_widget
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
topWidget = EXPO_4
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_camera
|
||||
type = XoCamera
|
||||
viewLimits = -2000. 2000.
|
||||
! depthTreatment = zbuffer
|
||||
createCallback = osh>\
|
||||
set Widget target `thisWidget`\
|
||||
camera=`thisCamera`\
|
||||
#EXPO\
|
||||
setWidgetResource EXPO_camera viewLimits '-2000. 2000.'\
|
||||
set OContext color pink; collect PhysicalVolume where name eq WorldPhys | represent - | viewNode - $camera\
|
||||
set OContext color pink; collect PhysicalVolume where name eq CalorPhys | represent - | viewNode - $camera\
|
||||
set OContext modeling wire_frame\
|
||||
set OContext color lightgrey; collect PhysicalVolume where name eq ChambPhys | represent - | viewNode - $camera
|
||||
background = black
|
||||
collectCallback = osh> getCameraNodes `thisCamera` | collect ONode where highlight eq 1 | get - name | dump -
|
||||
topAttachment = attach_form
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_position
|
||||
rightPosition = 60
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_plot1
|
||||
type = XoPlotter
|
||||
topAttachment = attach_form
|
||||
leftAttachment = attach_widget
|
||||
leftWidget = EXPO_camera
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_position
|
||||
bottomPosition = 50
|
||||
plottedObjects = HepJamesRandom1
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_plot2
|
||||
type = XoPlotter
|
||||
topAttachment = attach_widget
|
||||
topWidget = EXPO_plot1
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_widget
|
||||
leftWidget = EXPO_camera
|
||||
rightAttachment = attach_form
|
||||
plottedObjects = HepJamesVsDRand48
|
||||
valueColorMapping = black 0.05 red 0.1 blue
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = shell_view_panel
|
||||
type = XmFormDialog
|
||||
children = shell_view
|
||||
dialogTitle = Shell view
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = shell_view
|
||||
type = XoCamera
|
||||
background = black
|
||||
referenceCamera = EXPO_camera
|
||||
collectCallback = osh> getCameraNodes `thisCamera` | collect ONode where highlight eq 1 | get - name | dump -
|
||||
topAttachment = attach_form
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_g4ui
|
||||
type = XmPushButton
|
||||
labelString = G4 commands
|
||||
activateCallback = osh> load g4ui.odb | realize -;manageWidget g4ui_palette;raiseWidget g4ui_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_command_chooser
|
||||
type = XmPushButton
|
||||
labelString = G4 command chooser
|
||||
activateCallback = osh> load G4Cmds.odb | realize - ;manageWidget G4Cmds_palette;raiseWidget G4Cmds_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_G4PV
|
||||
type = XmPushButton
|
||||
labelString = G4 volume chooser
|
||||
activateCallback = osh> load G4PV.odb | realize - ;manageWidget G4PV_palette;raiseWidget G4PV_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_osh
|
||||
type = XmPushButton
|
||||
labelString = osh commands
|
||||
activateCallback = osh> load osh.odb | realize -;manageWidget osh_palette;raiseWidget osh_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_g4_casc
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = G4
|
||||
subMenuId = EXPO_g4_pdm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_g4_pdm
|
||||
type = XmPulldownMenu
|
||||
children = EXPO_g4ui EXPO_command_chooser EXPO_G4PV EXPO_osh EXPO_tracking_verbose
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_tracking_verbose
|
||||
type = XmToggleButton
|
||||
labelString = Tracking verbose on/off
|
||||
valueChangedCallback = osh>\
|
||||
test `getWidgetResource EXPO_tracking_verbose set` eq true && G4 '/tracking/verbose 2'\
|
||||
test `getWidgetResource EXPO_tracking_verbose set` eq false && G4 '/tracking/verbose'
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_EXPO_casc
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = EXPO
|
||||
subMenuId = EXPO_EXPO_pdm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_EXPO_pdm
|
||||
type = XmPulldownMenu
|
||||
children = EXPO_startRun EXPO_nextEvent EXPO_abortRun EXPO_cyclic
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_startRun
|
||||
type = XmPushButton
|
||||
labelString = Start run
|
||||
createCallback = osh> setWidgetResource EXPO_nextEvent sensitive False
|
||||
activateCallback = &osh>\
|
||||
setWidgetResource EXPO_exit sensitive False\
|
||||
setWidgetResource EXPO_startRun sensitive False\
|
||||
setWidgetResource EXPO_nextEvent sensitive True\
|
||||
setWidgetResource EXPO_abortRun sensitive True\
|
||||
eventn=`ask 'Number of event' 10`\
|
||||
string=`printf '/run/beamOn %s' $eventn`\
|
||||
G4 $string\
|
||||
setWidgetResource EXPO_exit sensitive True\
|
||||
setWidgetResource EXPO_startRun sensitive True\
|
||||
setWidgetResource EXPO_nextEvent sensitive False\
|
||||
setWidgetResource EXPO_abortRun sensitive False
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_cyclic
|
||||
type = XmPushButton
|
||||
labelString = Cyclic
|
||||
createCallback = osh> setWidgetResource EXPO_nextEvent sensitive False
|
||||
activateCallback = osh>\
|
||||
isValid OCyclic/auto_next && delete OCyclic/auto_next\
|
||||
delay=`ask delay(msec) 1000`\
|
||||
script='G4> /run/beamOn 1'\
|
||||
create OCyclic name auto_next widget `thisWidget` delay $delay script $script\
|
||||
do OCyclic/auto_next start
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_nextEvent
|
||||
type = XmPushButton
|
||||
labelString = Next event
|
||||
activateCallback = osh> do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_abortRun
|
||||
type = XmPushButton
|
||||
labelString = Abort run
|
||||
createCallback = osh>\
|
||||
setWidgetResource EXPO_nextEvent sensitive False\
|
||||
setWidgetResource EXPO_abortRun sensitive False
|
||||
activateCallback = osh>\
|
||||
G4 /run/abort\
|
||||
do Wo sendExitOnly
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#echo 'notify : begin of event.'
|
||||
@@ -0,0 +1,9 @@
|
||||
#echo 'notify : end of event.'
|
||||
collect ONode where name eq Trajectory* | delete -
|
||||
#collect Trajectory | dump -
|
||||
# Color of a trajectory is decided, according to charge, in representation code.
|
||||
# red -; blue +; green neutral
|
||||
#set OContext markerStyle cross
|
||||
collect Trajectory | represent - | viewNode - EXPO_camera
|
||||
# Enter in a secondary loop
|
||||
do Wo processEvents
|
||||
@@ -0,0 +1 @@
|
||||
#echo 'notify : begin of run.'
|
||||
@@ -0,0 +1,3 @@
|
||||
#echo 'notify : end of run.'
|
||||
updatePlot EXPO_plot1
|
||||
updatePlot EXPO_plot2
|
||||
@@ -0,0 +1,189 @@
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
!/* | Permission to use, copy, modify, and distribute this software | */
|
||||
!/* | and its documentation for any purpose and without fee is hereby | */
|
||||
!/* | granted, provided that the above copyright notice appear in all | */
|
||||
!/* | copies and that both that copyright notice and this permission | */
|
||||
!/* | notice appear in supporting documentation. This software is | */
|
||||
!/* | provided "as is" without express or implied warranty. | */
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = EXPO_
|
||||
resources = \
|
||||
Wo*XoCamera.borderWidth:3
|
||||
createCallback = G4>\
|
||||
/init/all\
|
||||
/tracking/storeTrajectory 1\
|
||||
#/gun/particle gamma\
|
||||
#/gun/particle geantino\
|
||||
/gun/particle e-\
|
||||
/gun/direction 0.1 1 0\
|
||||
/gun/energy 1 GeV\
|
||||
#/particle/dump\
|
||||
#/event/verbose 1\
|
||||
#/tracking/verbose 1
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_1
|
||||
type = TopLevelShell
|
||||
children = EXPO_9
|
||||
mappedWhenManaged = true
|
||||
geometry = 500x500+0+0
|
||||
title = Visualization GEANT4
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_9
|
||||
type = Form
|
||||
children = EXPO_4 EXPO_camera
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_4
|
||||
type = Box
|
||||
children = EXPO_5 EXPO_EXPO_casc EXPO_g4_casc
|
||||
background = lightgrey
|
||||
top = chaintop
|
||||
left = chainleft
|
||||
right = chainright
|
||||
! bottom = chainbottom
|
||||
resizable = true
|
||||
horizDistance = 1
|
||||
vertDistance = 1
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_5
|
||||
type = MenuButton
|
||||
background = lightgrey
|
||||
label = File
|
||||
menuName = EXPO_6
|
||||
children = EXPO_6
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_6
|
||||
type = SimpleMenu
|
||||
mappedWhenManaged = false
|
||||
children = EXPO_exit
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_exit
|
||||
type = SmeBSB
|
||||
label = Exit
|
||||
callback = osh> do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_camera
|
||||
type = XoCamera
|
||||
! depthTreatment = zbuffer
|
||||
createCallback = osh>\
|
||||
set Widget target `thisWidget`\
|
||||
camera=`thisCamera`\
|
||||
# EXPO\
|
||||
setWidgetResource EXPO_camera viewLimits '-2000. 2000.'\
|
||||
set OContext color pink; collect PhysicalVolume where name eq WorldPhys | represent - | viewNode - $camera\
|
||||
set OContext color pink; collect PhysicalVolume where name eq CalorPhys | represent - | viewNode - $camera\
|
||||
set OContext modeling wire_frame\
|
||||
set OContext color lightgrey; collect PhysicalVolume where name eq ChambPhys | represent - | viewNode - $camera
|
||||
background = black
|
||||
collectCallback = osh> getCameraNodes `thisCamera` | collect ONode where highlight eq 1 | get - name | dump -
|
||||
vertDistance = 1
|
||||
fromVert = EXPO_4
|
||||
height = 1000
|
||||
left = chainleft
|
||||
right = chainright
|
||||
bottom = chainbottom
|
||||
horizDistance = 1
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_g4_casc
|
||||
type = MenuButton
|
||||
background = lightgrey
|
||||
label = G4
|
||||
menuName = EXPO_g4_pdm
|
||||
children = EXPO_g4_pdm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_g4_pdm
|
||||
type = SimpleMenu
|
||||
mappedWhenManaged = false
|
||||
children = EXPO_particles
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_particles
|
||||
type = SmeBSB
|
||||
label = Particle dump
|
||||
callback = G4> /particle/dump
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_EXPO_casc
|
||||
type = MenuButton
|
||||
background = lightgrey
|
||||
label = EXPO
|
||||
menuName = EXPO_EXPO_pdm
|
||||
children = EXPO_EXPO_pdm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_EXPO_pdm
|
||||
type = SimpleMenu
|
||||
mappedWhenManaged = false
|
||||
children = EXPO_startRun EXPO_nextEvent EXPO_abortRun
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_startRun
|
||||
type = SmeBSB
|
||||
label = Start run
|
||||
createCallback = osh> setWidgetResource EXPO_nextEvent sensitive False
|
||||
! SmeBSB is a gadget then &osh> crashes.
|
||||
callback = osh>\
|
||||
setWidgetResource EXPO_exit sensitive False\
|
||||
setWidgetResource EXPO_startRun sensitive False\
|
||||
setWidgetResource EXPO_nextEvent sensitive True\
|
||||
setWidgetResource EXPO_abortRun sensitive True\
|
||||
#eventn=`ask 'Number of event' 10`\
|
||||
eventn='10'\
|
||||
string=`printf '/run/beamOn %s' $eventn`\
|
||||
G4 $string\
|
||||
setWidgetResource EXPO_exit sensitive True\
|
||||
setWidgetResource EXPO_startRun sensitive True\
|
||||
setWidgetResource EXPO_nextEvent sensitive False\
|
||||
setWidgetResource EXPO_abortRun sensitive False
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_nextEvent
|
||||
type = SmeBSB
|
||||
label = Next event
|
||||
callback = osh> do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = EXPO_abortRun
|
||||
type = SmeBSB
|
||||
label = Abort run
|
||||
createCallback = osh>\
|
||||
setWidgetResource EXPO_nextEvent sensitive False\
|
||||
setWidgetResource EXPO_abortRun sensitive False
|
||||
callback = osh>\
|
||||
G4 /run/abort\
|
||||
do Wo sendExitOnly
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = G4Cmds_
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_palette
|
||||
type = XmFormDialog
|
||||
children = G4Cmds_get_list G4Cmds_path G4Cmds_up G4Cmds_frame_dirs G4Cmds_frame_hists G4Cmds_label G4Cmds_edit G4Cmds_dump G4Cmds_cancel G4Cmds_update
|
||||
autoUnmanage = False
|
||||
dialogTitle = G4 command chooser
|
||||
mapCallback = osh> callWidgetCallbacks G4Cmds_get_list activateCallback
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_get_list
|
||||
type = XmPushButton
|
||||
labelString = Update list
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
topAttachment = attach_form
|
||||
activateCallback = osh>\
|
||||
list=`do G4 askListOfCommands | cutStringBegin - 1`\
|
||||
setWidgetResource G4Cmds_update value $list\
|
||||
setWidgetResource G4Cmds_path value ''\
|
||||
callWidgetCallbacks G4Cmds_update activateCallback
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_path
|
||||
type = XmText
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
topAttachment = attach_form
|
||||
topAttachment = attach_widget
|
||||
topWidget = G4Cmds_get_list
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_update
|
||||
type = XmText
|
||||
editMode = multi_line_edit
|
||||
activateCallback = osh>\
|
||||
setWidgetResource G4Cmds_dirs selectedItems ''\
|
||||
setWidgetResource G4Cmds_objs selectedItems ''\
|
||||
path=`getWidgetResource G4Cmds_path value`\
|
||||
test $path ne '' && path=`printf '%s/' $path`\
|
||||
lpath=`getStringLength $path`\
|
||||
pattern=`printf '%s*' $path`\
|
||||
list=`getWidgetResource G4Cmds_update value | matchString - $pattern | cutStringBegin - $lpath`\
|
||||
pattern=`printf '*/*' `\
|
||||
dirs=`matchString $list $pattern | getStringWord - 1 '/' | removeDuplicates - | sort - `\
|
||||
objs=`matchString $list $pattern no | removeDuplicates - | sort -`\
|
||||
test $dirs eq '' && setWidgetResource G4Cmds_dirs items ''\
|
||||
test $dirs ne '' && setWidgetResource G4Cmds_dirs items $dirs\
|
||||
test $objs eq '' && setWidgetResource G4Cmds_objs items ''\
|
||||
test $objs ne '' && setWidgetResource G4Cmds_objs items $objs
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_up
|
||||
type = XmPushButton
|
||||
labelString = Up directory
|
||||
topAttachment = attach_widget
|
||||
topWidget = G4Cmds_path
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
activateCallback = osh>\
|
||||
path=`getWidgetResource G4Cmds_path value`\
|
||||
path=`removeLastStringWord $path '/'`\
|
||||
setWidgetResource G4Cmds_path value $path\
|
||||
callWidgetCallbacks G4Cmds_update activateCallback
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_frame_dirs
|
||||
type = XmFrame
|
||||
children = G4Cmds_dirs
|
||||
topAttachment = attach_widget
|
||||
topWidget = G4Cmds_up
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_position
|
||||
rightPosition = 50
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4Cmds_label
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_dirs
|
||||
type = XmScrolledList
|
||||
background = lightgrey
|
||||
visibleItemCount = 10
|
||||
selectionPolicy = single_select
|
||||
scrollBarDisplayPolicy = static
|
||||
listSizePolicy = constant
|
||||
singleSelectionCallback = osh>\
|
||||
string=`getWidgetResource G4Cmds_dirs selectedItems`\
|
||||
test $string eq '' && exit \
|
||||
path=`getWidgetResource G4Cmds_path value`\
|
||||
#path=`removeLastStringWord $path '/'`\
|
||||
#setWidgetResource G4Cmds_path value $path\
|
||||
test $path ne '' && appendText G4Cmds_path '/'\
|
||||
appendText G4Cmds_path $string\
|
||||
callWidgetCallbacks G4Cmds_update activateCallback
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_frame_hists
|
||||
type = XmFrame
|
||||
children = G4Cmds_objs
|
||||
topAttachment = attach_widget
|
||||
topWidget = G4Cmds_up
|
||||
leftAttachment = attach_widget
|
||||
leftWidget = G4Cmds_frame_dirs
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4Cmds_label
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_objs
|
||||
type = XmScrolledList
|
||||
background = lightgrey
|
||||
visibleItemCount = 10
|
||||
selectionPolicy = single_select
|
||||
listSizePolicy = constant
|
||||
scrollBarDisplayPolicy = static
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_label
|
||||
type = XmLabel
|
||||
labelString = Operations
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4Cmds_edit
|
||||
background = black
|
||||
foreground = white
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_edit
|
||||
type = XmPushButton
|
||||
labelString = Edit
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4Cmds_dump
|
||||
activateCallback = &osh>\
|
||||
path=`getWidgetResource G4Cmds_path value`\
|
||||
obj=`getWidgetResource G4Cmds_objs selectedItems`\
|
||||
string=`printf '/%s/%s' $path $obj`\
|
||||
name='G4Params.odb'\
|
||||
do G4 createCommandPanel $string $name\
|
||||
odb=`collect OInterface where dataBaseName eq $name`\
|
||||
isValid $odb && destroy $odb\
|
||||
load $name | realize - ;manageWidget G4Params_palette;raiseWidget G4Params_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_dump
|
||||
type = XmPushButton
|
||||
labelString = Guidance
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4Cmds_cancel
|
||||
activateCallback = &osh>\
|
||||
path=`getWidgetResource G4Cmds_path value`\
|
||||
obj=`getWidgetResource G4Cmds_objs selectedItems`\
|
||||
string=`printf '/%s/%s' $path $obj`\
|
||||
echo `do G4 getCommandGuidance $string`
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4Cmds_cancel
|
||||
type = XmPushButton
|
||||
labelString = Cancel
|
||||
activateCallback = osh> unmanageWidget `thisWidgetParent`
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
!/* | Permission to use, copy, modify, and distribute this software | */
|
||||
!/* | and its documentation for any purpose and without fee is hereby | */
|
||||
!/* | granted, provided that the above copyright notice appear in all | */
|
||||
!/* | copies and that both that copyright notice and this permission | */
|
||||
!/* | notice appear in supporting documentation. This software is | */
|
||||
!/* | provided "as is" without express or implied warranty. | */
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = G4PV_
|
||||
packages = Xm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_palette
|
||||
type = XmFormDialog
|
||||
children = G4PV_7 G4PV_11 G4PV_erase G4PV_atbs G4PV_14 G4PV_draw G4PV_draw_all
|
||||
autoUnmanage = False
|
||||
dialogTitle = GEANT
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_7
|
||||
type = XmPushButton
|
||||
labelString = Update list
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
topAttachment = attach_form
|
||||
activateCallback = osh> collect PhysicalVolume | get - name | removeDuplicates - | setWidgetResource G4PV_list items -
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_11
|
||||
type = XmFrame
|
||||
children = G4PV_list
|
||||
topAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4PV_erase
|
||||
topAttachment = attach_widget
|
||||
topWidget = G4PV_7
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_list
|
||||
type = XmScrolledList
|
||||
background = lightgrey
|
||||
visibleItemCount = 5
|
||||
selectionPolicy = single_select
|
||||
scrollBarDisplayPolicy = static
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_erase
|
||||
type = XmPushButton
|
||||
labelString = Erase (in target)
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4PV_draw
|
||||
activateCallback = osh>\
|
||||
widget=`get Widget target`\
|
||||
camera=`get $widget name`\
|
||||
name=`getWidgetResource G4PV_list selectedItems`\
|
||||
string=`collect PhysicalVolume where name eq $name`\
|
||||
getCameraNodes $camera | collect ONode where name in $string | delete -
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_draw
|
||||
type = XmPushButton
|
||||
labelString = Draw (in target)
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4PV_draw_all
|
||||
activateCallback = osh>\
|
||||
widget=`get Widget target`\
|
||||
camera=`get $widget name`\
|
||||
collect PhysicalVolume where name eq `getWidgetResource G4PV_list selectedItems` | represent - | viewNode - $camera
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_draw_all
|
||||
type = XmPushButton
|
||||
labelString = Draw all (in target)
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4PV_atbs
|
||||
activateCallback = osh>\
|
||||
widget=`get Widget target`\
|
||||
camera=`get $widget name`\
|
||||
collect PhysicalVolume | represent - | viewNode - $camera
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_atbs
|
||||
type = XmPushButton
|
||||
labelString = Atbs
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
bottomWidget = G4PV_14
|
||||
labelString = Attributs
|
||||
activateCallback = osh> load OContext.odb| realize -;do Widget/OContext_palette manage;do Widget/OContext_palette_popup raise
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = G4PV_14
|
||||
type = XmPushButton
|
||||
labelString = Cancel
|
||||
activateCallback = osh> do `get Widget thisParent` unmanage
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
end
|
||||
@@ -0,0 +1,223 @@
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = Wo_
|
||||
packages = Xm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_casc
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = Wo
|
||||
mnemonic = O
|
||||
subMenuId = Wo_pull
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_pull
|
||||
type = XmPulldownMenu
|
||||
children = Wo_490 Wo_otype Wo_osh Wo_431 Wo_461 Wo_462 Wo_491 Wo_467 Wo_fit
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_490
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = Interface
|
||||
mnemonic = I
|
||||
subMenuId = Wo_491
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_otype
|
||||
type = XmPushButton
|
||||
labelString = Instances
|
||||
activateCallback = osh> load OType.odb | realize -;manageWidget OType_palette;raiseWidget OType_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_osh
|
||||
type = XmPushButton
|
||||
labelString = osh
|
||||
activateCallback = osh> load osh.odb | realize -;manageWidget osh_palette;raiseWidget osh_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_431
|
||||
type = XmPushButton
|
||||
background = lightgrey
|
||||
! labelType = pixmap
|
||||
labelPixmap = book.xpm
|
||||
labelString = Help
|
||||
mnemonic = H
|
||||
accelerator = Ctrl<Key>h
|
||||
acceleratorText = Ctrl/h
|
||||
activateCallback = osh>\
|
||||
load Help.odb | realize -\
|
||||
manageWidget Help_palette;raiseWidget Help_palette_popup\
|
||||
showTopic Help_help 'Wo.htm'
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_461
|
||||
type = XmPushButton
|
||||
background = lightgrey
|
||||
! labelType = pixmap
|
||||
labelPixmap = Print.xpm
|
||||
labelString = Print
|
||||
mnemonic = P
|
||||
accelerator = Ctrl<Key>p
|
||||
acceleratorText = Ctrl/p
|
||||
activateCallback = osh> load CPS.odb | realize -; manageWidget CPS_palette;raiseWidget CPS_palette_popup
|
||||
! activateCallback = osh> load Visps.odb | realize -; manageWidget Visps_palette;raiseWidget Visps_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_462
|
||||
type = XmPushButton
|
||||
labelString = XoCamera
|
||||
activateCallback = osh> load XoCamera.odb | realize -; manageWidget XoCamera_palette;;raiseWidget XoCamera_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_491
|
||||
type = XmPulldownMenu
|
||||
children = Wo_482 Wo_496 Wo_492 Wo_460 Wo_487 Wo_474 Wo_480 Wo_MenuBar Wo_481 Wo_494 Wo_493 Wo_463 Wo_483 Wo_471
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_482
|
||||
type = XmPushButton
|
||||
labelString = Save interface
|
||||
mnemonic = S
|
||||
accelerator = Ctrl<Key>s
|
||||
acceleratorText = Ctrl/s
|
||||
activateCallback = osh> do Wo saveInterface
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_496
|
||||
type = XmPushButton
|
||||
labelString = Reload interface
|
||||
accelerator = Ctrl<Key>l
|
||||
acceleratorText = Ctrl/l
|
||||
activateCallback = &osh> \
|
||||
fname=`get Wo interfaceFile`\
|
||||
collect OInterface where dataBaseName eq $fname | destroy -\
|
||||
load $fname | realize -
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_492
|
||||
type = XmSeparator
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_460
|
||||
type = XmPushButton
|
||||
labelString = Widget
|
||||
mnemonic = W
|
||||
accelerator = Ctrl<Key>w
|
||||
acceleratorText = Ctrl/w
|
||||
activateCallback = osh> load Widget.odb | realize -; manageWidget Widget_palette;raiseWidget Widget_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_487
|
||||
type = XmPushButton
|
||||
labelString = New widget
|
||||
mnemonic = N
|
||||
accelerator = Ctrl<Key>n
|
||||
acceleratorText = Ctrl/n
|
||||
activateCallback = osh> load Create.odb | realize -; manageWidget Create_palette;raiseWidget Create_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_MenuBar
|
||||
type = XmPushButton
|
||||
labelString = Edit menu bar
|
||||
activateCallback = osh> load MenuBar.odb | realize -; manageWidget MenuBar_palette;raiseWidget MenuBar_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_474
|
||||
type = XmPushButton
|
||||
labelString = Resource
|
||||
mnemonic = R
|
||||
accelerator = Ctrl<Key>r
|
||||
acceleratorText = Ctrl/r
|
||||
activateCallback = osh> load ResEd.odb | realize -; manageWidget ResEd_palette;raiseWidget ResEd_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_480
|
||||
type = XmPushButton
|
||||
labelString = Attachment
|
||||
mnemonic = A
|
||||
accelerator = Ctrl<Key>a
|
||||
acceleratorText = Ctrl/a
|
||||
activateCallback = osh> load Attach.odb | realize -; manageWidget Attach_palette;raiseWidget Attach_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_481
|
||||
type = XmPushButton
|
||||
labelString = Compound
|
||||
accelerator = Ctrl<Key>c
|
||||
acceleratorText = Ctrl/c
|
||||
activateCallback = osh> load Compound.odb | realize -; manageWidget Compound_palette;raiseWidget Compound_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_494
|
||||
type = XmPushButton
|
||||
labelString = odb files
|
||||
accelerator = Ctrl<Key>o
|
||||
acceleratorText = Ctrl/o
|
||||
activateCallback = osh> load OInterf.odb | realize -; manageWidget OInterface_palette;raiseWidget OInterface_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_493
|
||||
type = XmPushButton
|
||||
labelString = Save pixmap
|
||||
activateCallback = osh> load Pixmap.odb | realize -; manageWidget Pixmap_palette;raiseWidget Pixmap_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_463
|
||||
type = XmPushButton
|
||||
labelString = Mailbox
|
||||
activateCallback = osh> load XMailbox.odb | realize -; manageWidget XMailbox_palette;raiseWidget XMailbox_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_483
|
||||
type = XmPushButton
|
||||
labelString = Ci
|
||||
activateCallback = osh> load Ci.odb | realize -; manageWidget Ci_palette;raiseWidget Ci_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_471
|
||||
type = XmPushButton
|
||||
labelString = Wo toolkit
|
||||
activateCallback = osh> load Sys.odb | realize -; manageWidget Sys_palette;raiseWidget Sys_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_467
|
||||
type = XmPushButton
|
||||
labelString = XoPlotter
|
||||
activateCallback = osh> load Plotter.odb | realize -; manageWidget Plotter_palette;raiseWidget Plotter_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = Wo_fit
|
||||
type = XmPushButton
|
||||
labelString = Fit
|
||||
activateCallback = osh> load Fit.odb | realize -; manageWidget Fit_palette;raiseWidget Fit_palette_popup
|
||||
end
|
||||
@@ -0,0 +1,330 @@
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
!/* | Permission to use, copy, modify, and distribute this software | */
|
||||
!/* | and its documentation for any purpose and without fee is hereby | */
|
||||
!/* | granted, provided that the above copyright notice appear in all | */
|
||||
!/* | copies and that both that copyright notice and this permission | */
|
||||
!/* | notice appear in supporting documentation. This software is | */
|
||||
!/* | provided "as is" without express or implied warranty. | */
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = TEST_
|
||||
resources = \
|
||||
Wo**XoCamera.borderWidth:3\
|
||||
Wo*shell_view_panel*XoCamera.borderColor:dimgrey
|
||||
createCallback = osh>\
|
||||
create OHistogram name HepJamesRandom1 dimension 1 xAxisTitle James xAxisNumberOfBins 100 xAxisMinimum 0 xAxisMaximum 1 | empty\
|
||||
create OHistogram name HepJamesVsDRand48 dimension 2 xAxisTitle James xAxisNumberOfBins 40 xAxisMinimum 0 xAxisMaximum 1 yAxisTitle DRand48 yAxisNumberOfBins 40 yAxisMinimum 0 yAxisMaximum 1 | empty
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_1
|
||||
type = TopLevelShell
|
||||
children = TEST_9
|
||||
mappedWhenManaged = true
|
||||
geometry = 700x500+0+0
|
||||
title = Visualization GEANT4 TEST19
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_9
|
||||
type = XmForm
|
||||
children = TEST_4 TEST_form
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_4
|
||||
type = XmMenuBar
|
||||
children = TEST_5 TEST_6 TEST_TEST_casc TEST_TEST_pdm TEST_g4_casc TEST_g4_pdm Vis3d_casc<Vis3d.odb Vis3d_pull<Vis3d.odb Wo_casc<G4oWo.odb Wo_pull<G4oWo.odb
|
||||
background = lightgrey
|
||||
shadowThickness = 4
|
||||
topShadowColor = white
|
||||
bottomShadowColor = black
|
||||
topAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_5
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = File
|
||||
subMenuId = TEST_6
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_6
|
||||
type = XmPulldownMenu
|
||||
children = TEST_exit
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_exit
|
||||
type = XmPushButton
|
||||
background = lightgrey
|
||||
labelString = Exit
|
||||
activateCallback = osh> do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_form
|
||||
type = XmForm
|
||||
children = TEST_camera TEST_plot1 TEST_plot2
|
||||
background = grey
|
||||
topAttachment = attach_widget
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
topWidget = TEST_4
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_camera
|
||||
type = XoCamera
|
||||
viewLimits = -2000. 2000.
|
||||
! depthTreatment = zbuffer
|
||||
userCallback = osh>\
|
||||
set Widget target `thisWidget`\
|
||||
camera=`thisCamera`\
|
||||
set OContext color grey\
|
||||
# For detector 4\
|
||||
collect PhysicalVolume where name eq calo_phys | represent - | viewNode - $camera\
|
||||
set OContext color grey\
|
||||
collect PhysicalVolume where name eq tracker_phys | represent - | viewNode - $camera\
|
||||
# For detector 5 (ATLAS)\
|
||||
collect PhysicalVolume where name eq ATLexpHall_P | represent - | viewNode - $camera\
|
||||
getCameraNodes $camera | normalizeNode - $camera
|
||||
background = black
|
||||
collectCallback = osh> getCameraNodes `thisCamera` | collect ONode where highlight eq 1 | get - name | dump -
|
||||
topAttachment = attach_form
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_position
|
||||
rightPosition = 60
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_plot1
|
||||
type = XoPlotter
|
||||
topAttachment = attach_form
|
||||
leftAttachment = attach_widget
|
||||
leftWidget = TEST_camera
|
||||
rightAttachment = attach_form
|
||||
bottomAttachment = attach_position
|
||||
bottomPosition = 50
|
||||
plottedObjects = HepJamesRandom1
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_plot2
|
||||
type = XoPlotter
|
||||
topAttachment = attach_widget
|
||||
topWidget = TEST_plot1
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_widget
|
||||
leftWidget = TEST_camera
|
||||
rightAttachment = attach_form
|
||||
plottedObjects = HepJamesVsDRand48
|
||||
valueColorMapping = black 0.05 red 0.1 blue
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = shell_view_panel
|
||||
type = XmFormDialog
|
||||
children = shell_view
|
||||
dialogTitle = Shell view
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = shell_view
|
||||
type = XoCamera
|
||||
background = black
|
||||
referenceCamera = TEST_camera
|
||||
collectCallback = osh> getCameraNodes `thisCamera` | collect ONode where highlight eq 1 | get - name | dump -
|
||||
topAttachment = attach_form
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_g4ui
|
||||
type = XmPushButton
|
||||
labelString = G4 commands
|
||||
activateCallback = osh> load g4ui.odb | realize -;manageWidget g4ui_palette;raiseWidget g4ui_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_command_chooser
|
||||
type = XmPushButton
|
||||
labelString = G4 command chooser
|
||||
activateCallback = osh> load G4Cmds.odb | realize - ;manageWidget G4Cmds_palette;raiseWidget G4Cmds_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_G4PV
|
||||
type = XmPushButton
|
||||
labelString = G4 volume chooser
|
||||
activateCallback = osh> load G4PV.odb | realize - ;manageWidget G4PV_palette;raiseWidget G4PV_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_osh
|
||||
type = XmPushButton
|
||||
labelString = osh commands
|
||||
activateCallback = osh> load osh.odb | realize -;manageWidget osh_palette;raiseWidget osh_palette_popup
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_g4_casc
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = G4
|
||||
subMenuId = TEST_g4_pdm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_g4_pdm
|
||||
type = XmPulldownMenu
|
||||
children = TEST_g4ui TEST_command_chooser TEST_G4PV TEST_osh TEST_tracking_verbose
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_tracking_verbose
|
||||
type = XmToggleButton
|
||||
labelString = Tracking verbose on/off
|
||||
valueChangedCallback = osh>\
|
||||
test `getWidgetResource TEST_tracking_verbose set` eq true && G4 '/tracking/verbose 2'\
|
||||
test `getWidgetResource TEST_tracking_verbose set` eq false && G4 '/tracking/verbose'
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_TEST_casc
|
||||
type = XmCascadeButton
|
||||
background = lightgrey
|
||||
labelString = TEST
|
||||
subMenuId = TEST_TEST_pdm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_TEST_pdm
|
||||
type = XmPulldownMenu
|
||||
children = TEST_det4 TEST_ATLAS TEST_end_selection TEST_sep TEST_init TEST_startRun TEST_nextEvent TEST_abortRun TEST_cyclic
|
||||
background = lightgrey
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_det4
|
||||
type = XmPushButton
|
||||
labelString = Detector 4
|
||||
activateCallback = osh> G4 '/test19det/detector 4'
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_ATLAS
|
||||
type = XmPushButton
|
||||
labelString = ATLAS
|
||||
createCallback = osh> setWidgetResource TEST_end_selection sensitive False
|
||||
activateCallback = &osh>\
|
||||
echo '- Choose sub detectors with'\
|
||||
echo ' G4 commands (chooser) and'\
|
||||
echo '- Click on End selection'\
|
||||
echo ' when finished.'\
|
||||
echo '- Click on Initialize.'\
|
||||
setWidgetResource TEST_end_selection sensitive True\
|
||||
G4 '/test19det/detector 5'
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_end_selection
|
||||
type = XmPushButton
|
||||
labelString = End selection
|
||||
activateCallback = osh>\
|
||||
setWidgetResource TEST_end_selection sensitive False\
|
||||
do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_sep
|
||||
type = XmSeparator
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_init
|
||||
type = XmPushButton
|
||||
labelString = Initialize
|
||||
activateCallback = osh>\
|
||||
G4 '/run/initialize'\
|
||||
G4 '/tracking/storeTrajectory 1'\
|
||||
G4 '/gun/particle e-'\
|
||||
#G4 '/gun/particle pi+'\
|
||||
G4 '/gun/direction 0.1 1 0'\
|
||||
G4 '/gun/energy 1 GeV'\
|
||||
callWidgetCallbacks TEST_camera userCallback
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_represent
|
||||
type = XmPushButton
|
||||
labelString = Represent mother volume
|
||||
activateCallback = osh>\
|
||||
set OContext color pink\
|
||||
collect PhysicalVolume where name eq ATLexpHall_P | represent - | viewNode - TEST_camera\
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_startRun
|
||||
type = XmPushButton
|
||||
labelString = Start run
|
||||
createCallback = osh> setWidgetResource TEST_nextEvent sensitive False
|
||||
activateCallback = &osh>\
|
||||
setWidgetResource TEST_exit sensitive False\
|
||||
setWidgetResource TEST_startRun sensitive False\
|
||||
setWidgetResource TEST_nextEvent sensitive True\
|
||||
setWidgetResource TEST_abortRun sensitive True\
|
||||
eventn=`ask 'Number of event' 10`\
|
||||
string=`printf '/run/beamOn %s' $eventn`\
|
||||
G4 $string\
|
||||
setWidgetResource TEST_exit sensitive True\
|
||||
setWidgetResource TEST_startRun sensitive True\
|
||||
setWidgetResource TEST_nextEvent sensitive False\
|
||||
setWidgetResource TEST_abortRun sensitive False
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_cyclic
|
||||
type = XmPushButton
|
||||
labelString = Cyclic
|
||||
createCallback = osh> setWidgetResource TEST_nextEvent sensitive False
|
||||
activateCallback = osh>\
|
||||
isValid OCyclic/auto_next && delete OCyclic/auto_next\
|
||||
delay=`ask delay(msec) 1000`\
|
||||
script='G4> /run/beamOn 1'\
|
||||
create OCyclic name auto_next widget `thisWidget` delay $delay script $script\
|
||||
do OCyclic/auto_next start
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_nextEvent
|
||||
type = XmPushButton
|
||||
labelString = Next event
|
||||
activateCallback = osh> do Wo sendExitOnly
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = TEST_abortRun
|
||||
type = XmPushButton
|
||||
labelString = Abort run
|
||||
createCallback = osh>\
|
||||
setWidgetResource TEST_nextEvent sensitive False\
|
||||
setWidgetResource TEST_abortRun sensitive False
|
||||
activateCallback = osh>\
|
||||
G4 /run/abort\
|
||||
do Wo sendExitOnly
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#echo 'notify : begin of event.'
|
||||
@@ -0,0 +1,9 @@
|
||||
#echo 'notify : end of event.'
|
||||
collect ONode where name eq Trajectory* | delete -
|
||||
#collect Trajectory | dump -
|
||||
# Color of a trajectory is decided, according to charge, in representation code.
|
||||
# red -; blue +; green neutral
|
||||
#set OContext markerStyle cross
|
||||
collect Trajectory | represent - | viewNode - TEST_camera
|
||||
# Enter in a secondary loop
|
||||
do Wo processEvents
|
||||
@@ -0,0 +1 @@
|
||||
#echo 'notify : begin of run.'
|
||||
@@ -0,0 +1,3 @@
|
||||
#echo 'notify : end of run.'
|
||||
updatePlot TEST_plot1
|
||||
updatePlot TEST_plot2
|
||||
@@ -0,0 +1,56 @@
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
!/* | Permission to use, copy, modify, and distribute this software | */
|
||||
!/* | and its documentation for any purpose and without fee is hereby | */
|
||||
!/* | granted, provided that the above copyright notice appear in all | */
|
||||
!/* | copies and that both that copyright notice and this permission | */
|
||||
!/* | notice appear in supporting documentation. This software is | */
|
||||
!/* | provided "as is" without express or implied warranty. | */
|
||||
!/* +---------------------- Copyright notice -------------------------------+ */
|
||||
!----------------------------
|
||||
begin OInterface
|
||||
prefix = g4ui_
|
||||
packages = Xm
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = g4ui_palette
|
||||
type = XmFormDialog
|
||||
children = g4ui_cmd g4ui_39 g4ui_41
|
||||
autoUnmanage = false
|
||||
dialogTitle = G4
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = g4ui_cmd
|
||||
type = XmCommand
|
||||
promptString = Commands
|
||||
commandEnteredCallback = osh> G4 `get Widget thisValue`
|
||||
topAttachment = attach_form
|
||||
bottomAttachment = attach_widget
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_form
|
||||
bottomWidget = g4ui_39
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = g4ui_39
|
||||
type = XmPushButton
|
||||
labelString = Cancel
|
||||
activateCallback = osh> unmanageWidget `get Widget thisParent`
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_form
|
||||
rightAttachment = attach_position
|
||||
rightPosition = 50
|
||||
end
|
||||
!----------------------------
|
||||
begin OWidget
|
||||
name = g4ui_41
|
||||
type = XmPushButton
|
||||
labelString = Help
|
||||
! activateCallback = osh> help 'Commands cmds.ohtx'
|
||||
bottomAttachment = attach_form
|
||||
leftAttachment = attach_position
|
||||
rightAttachment = attach_form
|
||||
leftPosition = 50
|
||||
end
|
||||
Reference in New Issue
Block a user