Files
geant4/environments/OPACS/usr/EXPO.odb
T
2016-06-08 15:09:25 +02:00

278 lines
8.4 KiB
Plaintext

!/* +---------------------- 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