Message: Visualization issues Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Visualization issues 

Forum: Installation and Configuration
Date: 20 Jul, 2016
From: Jim Streuli <Jim Streuli>

I have installed Geant 4 on my Macbook Pro

The current packages I have installed for use with Geant4 are as follows:

OSX 10.11.6 Xcode7.3.1 Cmake3.6.0 Xquartz2.7.9

NOTE!!!!!! when installing Geant4, I made sure to -DCMAKE_INSTALL_DATA=ON, as well as - I also have an iMac that I use to run Geant4, and things seem to be working fine there.

I am trying to run example B1, here is the process I use (####OUTPUT####, and, ####END####, is for readability):

$HOME ls

B1

$ mkdir B1-build/

$ cd B1-build/

$ source /Users/me/geant4.10.2-install/share/Geant4-10.2.2/geant4make/geant4make.sh

$ cmake -DGeant4_DIR=/Users/me/geant4.10.2-install/lib/Geant4-10.2.2 $HOME/B1

####OUTPUT###### -- The C compiler identification is AppleClang 7.3.0.7030031 -- The CXX compiler identification is AppleClang 7.3.0.7030031 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /Users/me/B1-build ######END#######

$make -j2

#####OUTPUT######### Scanning dependencies of target exampleB1 [ 25%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o [ 25%] Building CXX object CMakeFiles/exampleB1.dir/src/B1ActionInitialization.cc.o [ 37%] Building CXX object CMakeFiles/exampleB1.dir/src/B1DetectorConstruction.cc.o [ 50%] Building CXX object CMakeFiles/exampleB1.dir/src/B1EventAction.cc.o [ 62%] Building CXX object CMakeFiles/exampleB1.dir/src/B1PrimaryGeneratorAction.cc.o [ 75%] Building CXX object CMakeFiles/exampleB1.dir/src/B1RunAction.cc.o [ 87%] Building CXX object CMakeFiles/exampleB1.dir/src/B1SteppingAction.cc.o [100%] Linking CXX executable exampleB1 [100%] Built target exampleB1 ####END####

$make install

####OUTPUT#### [100%] Built target exampleB1 Install the project... -- Install configuration: "" -- Installing: /usr/local/bin/exampleB1

####END####

$ ls

####OUTPUT####

CMakeCache.txt

exampleB1

install_manifest.txt

CMakeFiles

exampleB1.in

run1.mac

Makefile

exampleB1.out

run2.mac

cmake_install.cmake

init_vis.mac

vis.mac

####END####

$ ./exampleB1

####OUTPUT#### <------ HERE ARE WHERE THE ISSUES ARE!!!!!

Available UI session types: [ GAG, tcsh, csh ]

*************************************************************
 Geant4 version Name: geant4-10-02-patch-02    (17-June-2016)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

<<< Reference Physics List QBBC Visualization Manager instantiating with verbosity "warnings (3)"... Visualization Manager initialising... Registering graphics systems...

You have successfully registered the following graphics systems. Current available graphics systems are: ASCIITree (ATree) DAWNFILE (DAWNFILE) G4HepRep (HepRepXML) G4HepRepFile (HepRepFile) RayTracer (RayTracer) VRML1FILE (VRML1FILE) VRML2FILE (VRML2FILE) gMocrenFile (gMocrenFile)

Registering model factories...

You have successfully registered the following model factories.
Registered model factories:
  generic
  drawByCharge
  drawByParticleID
  drawByOriginVolume
  drawByAttribute

Registered filter factories:
  chargeFilter
  particleFilter
  originVolumeFilter
  attributeFilter

You have successfully registered the following user vis actions. Run Duration User Vis Actions: none End of Event User Vis Actions: none End of Run User Vis Actions: none

Some /vis commands (optionally) take a string to specify colour.
Available colours:
  black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow

/control/saveHistory
/run/verbose 2
#
# Change the default number of threads (in multi-threaded mode)
#/run/numberOfThreads 4
#
# Initialize kernel
/run/initialize
userDetector->Construct() start.
Checking overlaps for volume Envelope ... OK! 
Checking overlaps for volume Shape1 ... OK! 
Checking overlaps for volume Shape2 ... OK! 
World is registered to the default region.
physicsList->Construct() start.
### Adding tracking cuts for neutron  TimeCut(ns)= 10000  KinEnergyCut(MeV)= 0
physicsList->CheckParticleList() start.
physicsList->setCut() start.
#
# Visualization setting
/control/execute vis.mac
# Macro file for the visualization setting in the initialization phase
# of the B1 example when running in interactive mode
#
# Use these open statements to open selected visualization
#
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
parameter value (OGL) is not listed in the candidate List.
/vis/viewer/create ! ! 600x600-0+0
ERROR: G4VisCommandViewerCreate::SetNewValue: no scene handlers. <-----------
  Create a scene handler with "/vis/sceneHandler/create"
#
# Use this open statement to create an OpenInventor view:
#/vis/open OI
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <-----------
/vis/verbose errors
Visualization verbosity changed to errors (2)
#
# Draw geometry:
/vis/drawVolume
/vis/scene/create
/vis/scene/add/volume world
/vis/sceneHandler/attach
ERROR: Current scene handler not defined.  Please select or create one.
#
# Specify view angle:
/vis/viewer/set/viewpointVector -1 0 0
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
/vis/viewer/set/lightsVector -1 0 0
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
#
# Specify style (surface, wireframe, auxiliary edges,...)
/vis/viewer/set/style wireframe
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
/vis/viewer/set/auxiliaryEdge true
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
/vis/viewer/set/lineSegmentsPerCircle 100
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/tracking/storeTrajectory 2
Attributes available for modeling and filtering with
  "/vis/modeling/trajectories/create/drawByAttribute" and
  "/vis/filtering/trajectories/create/attributeFilter" commands:
G4TrajectoriesModel:
  Event ID (EventID): G4int
  Run ID (RunID): G4int
G4SmoothTrajectory:
  Charge (Ch): unit: e+ (G4double)
  Track ID (ID): G4int
  Initial kinetic energy (IKE): G4BestUnit (G4double)
  Initial momentum magnitude (IMag): G4BestUnit (G4double)
  Initial momentum (IMom): G4BestUnit (G4ThreeVector)
  No. of points (NTP): G4int
  PDG Encoding (PDG): G4int
  Parent ID (PID): G4int
  Particle Name (PN): G4String
G4SmoothTrajectoryPoint:
  Auxiliary Point Position (Aux): G4BestUnit (G4ThreeVector)
  Step Position (Pos): G4BestUnit (G4ThreeVector)
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/scene/notifyHandlers scene-0
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/scene/notifyHandlers scene-0
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event:
#/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
#/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
# To select or override default colours (note: e+ is blue by default):
#/vis/modeling/trajectories/list
#/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
ERROR: No current sceneHandler.  Please create one.
#
# Decorations
# Name
/vis/set/textColour green
/vis/set/textLayout right
/vis/scene/add/text2D 0.9 -.9 24 ! ! exampleB1
# or, if your system does not support right-adjustment
#/vis/scene/add/text2D 0 -.9 24 ! ! exampleB1
/vis/set/textLayout
/vis/set/textColour
#
# Axes, scale, etc.
/vis/scene/add/scale
ERROR: G4VisCommandSceneAddScale::SetNewValue: no viewer. <---------
  Auto direction needs a viewer.
/vis/scene/add/axes
/vis/scene/add/eventID
/vis/scene/add/date
/vis/scene/add/logo2D
/vis/scene/add/logo
ERROR: G4VisCommandSceneAddLogo::SetNewValue: no viewer. <---------
  Auto direction needs a viewer.
#
# Frame
/vis/set/colour red
/vis/set/lineWidth 2
/vis/scene/add/frame
/vis/set/colour
/vis/set/lineWidth
#
# Attach text to one edge of Shape1, with a small, fixed offset
/vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
# Attach text to one corner of Shape2, with a small, fixed offset
/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
#
# To get nice view
/vis/geometry/set/visibility World 0 false
/vis/geometry/set/visibility Envelope 0 false
/vis/viewer/set/style surface
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
/vis/viewer/set/hiddenMarker true
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
/vis/viewer/set/viewpointThetaPhi 120 150
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer. <---------
/vis/verbose warnings
Visualization verbosity changed to warnings (3)
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
####END####

I have installed/reinstalled and googled every possible way to get a viewer running. If I use /run/beamOn 1, that seems to work fine, as far as the actual physics go. But I am unable to see anything in the viewer.

I have also tried using Qt4.8.6, and had previously set it to "ON" in a prior install, but CMake is never able to find it. That setting is currently set to "OFF" and Qt has been uninstalled for this current setup.

Could someone please help me out with this??? (Sorry the note is so long...)

Jim

 Add Message Add Message
to: "Visualization issues"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]