Index: trunk/source/visualization/FukuiRenderer/GNUmakefile
===================================================================
--- trunk/source/visualization/FukuiRenderer/GNUmakefile	(revision 1138)
+++ trunk/source/visualization/FukuiRenderer/GNUmakefile	(revision 1140)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.5 2004/06/03 11:40:12 gcosmo Exp $
+# $Id: GNUmakefile,v 1.6 2009/10/21 14:59:17 allison Exp $
 
 name := G4FR
@@ -27,4 +27,5 @@
 CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include
 CPPFLAGS += -I$(G4BASE)/geometry/management/include
+CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include
 
 include $(G4INSTALL)/config/common.gmk
Index: trunk/source/visualization/FukuiRenderer/History
===================================================================
--- trunk/source/visualization/FukuiRenderer/History	(revision 1138)
+++ trunk/source/visualization/FukuiRenderer/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.26 2006/07/10 15:32:27 allison Exp $
+$Id: History,v 1.27 2009/10/21 14:59:17 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,8 @@
 History file for visualization/FukuiRenderer sub-category
 ---------------------------------------------------------
+
+21st October 2009  John Allison  (DAWN-V09-02-00 coworks greps-V09-02-02)
+- Added default AddCompound (const G4THitsMap<G4double>&) methods.
+  o Prevents warnings about hiding - calls G4VSceneHandler base class.
 
 10th July 2006  John Allison  (DAWN-V08-01-00)
Index: trunk/source/visualization/FukuiRenderer/include/G4DAWNFILESceneHandler.hh
===================================================================
--- trunk/source/visualization/FukuiRenderer/include/G4DAWNFILESceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/FukuiRenderer/include/G4DAWNFILESceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4DAWNFILESceneHandler.hh,v 1.16 2006/06/29 21:16:30 gunter Exp $
+// $Id: G4DAWNFILESceneHandler.hh,v 1.17 2009/10/21 14:59:17 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -98,4 +98,7 @@
     G4VSceneHandler::AddCompound(hit);
   }
+  void AddCompound ( const G4THitsMap<G4double> & hits) {
+    G4VSceneHandler::AddCompound(hits);
+  }
 
   void ClearTransientStore();  // Used for triggering detector re-drawing.
Index: trunk/source/visualization/FukuiRenderer/include/G4FukuiRendererSceneHandler.hh
===================================================================
--- trunk/source/visualization/FukuiRenderer/include/G4FukuiRendererSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/FukuiRenderer/include/G4FukuiRendererSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4FukuiRendererSceneHandler.hh,v 1.15 2006/06/29 21:16:46 gunter Exp $
+// $Id: G4FukuiRendererSceneHandler.hh,v 1.16 2009/10/21 14:59:17 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -100,4 +100,7 @@
   void AddCompound ( const G4VHit& hit) {
     G4VSceneHandler::AddCompound(hit);
+  }
+  void AddCompound ( const G4THitsMap<G4double> & hits) {
+    G4VSceneHandler::AddCompound(hits);
   }
 
Index: trunk/source/visualization/GNUmakefile
===================================================================
--- trunk/source/visualization/GNUmakefile	(revision 1138)
+++ trunk/source/visualization/GNUmakefile	(revision 1140)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.23 2009/03/05 11:32:07 lgarnier Exp $
+# $Id: GNUmakefile,v 1.24 2009/10/12 10:28:38 akimura Exp $
 # -----------------------------------------------------------------------
 # GNUmakefile for visualization and modeling.  John Allison, 5/7/95.
@@ -26,7 +26,7 @@
 
 # For Debug mode
-CPPFLAGS += -DG4DEBUG_VIS_OGL
-CPPFLAGS += -DG4DEBUG_VIS_OI
-CPPFLAGS += -DG4DEBUG_VIS_MANAGEMENT
+# CPPFLAGS += -DG4DEBUG_VIS_OGL
+# CPPFLAGS += -DG4DEBUG_VIS_OI
+# CPPFLAGS += -DG4DEBUG_VIS_MANAGEMENT
 
 # Libraries which can be used without external packages or libraries...
@@ -46,4 +46,6 @@
   SUBDIRS += XXX
   SUBLIBS += G4visXXX
+  SUBDIRS += gMocren
+  SUBLIBS += G4GMocren
 
 ifdef G4VIS_BUILD_OPENGL_DRIVER
Index: trunk/source/visualization/HepRep/History
===================================================================
--- trunk/source/visualization/HepRep/History	(revision 1138)
+++ trunk/source/visualization/HepRep/History	(revision 1140)
@@ -1,3 +1,3 @@
-.$Id: History,v 1.129 2009/05/08 09:29:23 gcosmo Exp $
+.$Id: History,v 1.131 2009/10/21 15:13:36 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,8 @@
 History file for visualization/HepRep sub-category
 --------------------------------------------------
+
+21st October 2009  John Allison  (vis-HepRep-V09-02-02 coworks greps-V09-02-02)
+- Added default AddCompound (const G4THitsMap<G4double>&) methods.
+  o Prevents warnings about hiding - calls G4VSceneHandler base class.
 
 8 May 2009  Gabriele Cosmo  (vis-HepRep-V09-02-00)
Index: trunk/source/visualization/HepRep/include/G4HepRepFileSceneHandler.hh
===================================================================
--- trunk/source/visualization/HepRep/include/G4HepRepFileSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/HepRep/include/G4HepRepFileSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4HepRepFileSceneHandler.hh,v 1.30 2008/01/04 22:11:31 allison Exp $
+// $Id: G4HepRepFileSceneHandler.hh,v 1.31 2009/10/21 15:08:35 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -82,4 +82,7 @@
   void AddCompound (const G4VHit&);
   void InitHit();
+  void AddCompound (const G4THitsMap<G4double>& hits) {
+    G4VSceneHandler::AddCompound(hits);
+  }
   // void PreAddSolid(const G4Transform3D& objectTransformation,
   //                 const G4VisAttributes&);
Index: trunk/source/visualization/HepRep/include/G4HepRepSceneHandler.hh
===================================================================
--- trunk/source/visualization/HepRep/include/G4HepRepSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/HepRep/include/G4HepRepSceneHandler.hh	(revision 1140)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: G4HepRepSceneHandler.hh,v 1.42 2006/11/06 09:22:26 allison Exp $
+// $Id: G4HepRepSceneHandler.hh,v 1.43 2009/10/21 15:08:35 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -85,4 +85,7 @@
         void AddCompound (const G4VTrajectory&);
         void AddCompound (const G4VHit& hit);
+        void AddCompound (const G4THitsMap<G4double>& hits) {
+	  G4VSceneHandler::AddCompound(hits);
+	}
 
         void PreAddSolid (const G4Transform3D& objectTransformation, const G4VisAttributes& visAttribs);
Index: trunk/source/visualization/History
===================================================================
--- trunk/source/visualization/History	(revision 1138)
+++ trunk/source/visualization/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.445 2009/08/20 15:16:58 lgarnier Exp $
+$Id: History,v 1.453 2009/10/25 10:43:42 allison Exp $
 -------------------------------------------------------------------
 
@@ -30,4 +30,55 @@
  - G4OpenGLQtViewer.cc/G4OpenGLStoreQtViewer.cc : Fix problems with 
    mac OS X 10.6
+
+23rd October 2009  John Allison  (vis-V09-02-09, greps-V09-02-02, digits_hits-V09-02-02)
+- visman-V09-02-05: Implemented default behaviour in
+  G4VSceneHandler::AddCompound (const G4THitsMap<G4double>&).
+
+22nd October 2009  John Allison  (vis-V09-02-08, greps-V09-02-02, digits_hits-V09-02-02)
+- modeling-V09-02-05: Added G4PSHitsModel for gMocren driver.
+- gMocren-V09-02-00: G4PSHitsModel moved to modelling.
+
+21st October 2009  John Allison  (vis-V09-02-07 coworks greps-V09-02-02)
+- greps-V09-02-02 adds new pure virtual function,
+  AddCompound (const G4THitsMap<G4double>&).  The following tags
+  accomodate:
+  o modeling-V09-02-04
+  o visman-V09-02-04
+  o DAWN-V09-02-00
+  o vis-HepRep-V09-02-02
+  o opengl-V09-02-08
+  o raytracer-V09-02-01
+  o VRML-V09-02-01
+  o visXXX-V09-02-00
+
+10th October 2009 Joseph Perl (vis-V09-02-06)
+- new global tag for vis, in preparation for  addition of gMocren file driver
+
+10th October 2009  John Allison
+- modeling-V09-02-03: Added G4PhysicalVolumeModelTouchable.  Used in
+  ComputeMaterial.  Effective for nested parameterisations.
+
+29th September 2009  John Allison  (allison20090929)
+- modeling-V09-02-02: Added warning if logical volume not defined.
+- visman-V09-02-03:
+  o Allow refresh in GeomClosed as well as Idle state.
+  o Fixed uninitialised pointers.
+  o G4VisManager.cc: Considerable tidy up.
+- opengl-V09-02-07:  Tagged work by Laurent Garnier:
+  o G4OpenGLXmViewer : Fix a wrong initialization introduce by the 
+    new way of handling window size hints (January 2009)
+  o G4OpenGLQtViewer : Ensure the GL frame size will be correct
+    by setting a 0 size margin around 
+  o G4OpenGLStoredQtViewer : Remove picking to true at initialisation
+- openinventor-V09-02-02:  Tagged work by Laurent Garnier:
+  o G4OpenInventorXt/WinViewer: Fix a wrong initialization introduce by the 
+    new way of handling window size hints (January 2009)
+  o Remove Geant4_gl2ps.h gl2ps.cc gl2ps.h which were copied in external/gl2ps
+    in february but forgot to remove them from OpenInventor
+- vistest-V09-02-00: Changed main program, test19.cc, to use G4UIExecutive.
+- VRML-V09-02-00: Tagged change of disclaimer on file headings (made long ago).
+
+16 September 2009  John Allison
+- raytracer-V09-02-00: Cosmetic adjustments and tagging.
 
 19 August 2009 Laurent Garnier
Index: trunk/source/visualization/OpenGL/History
===================================================================
--- trunk/source/visualization/OpenGL/History	(revision 1138)
+++ trunk/source/visualization/OpenGL/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.155 2009/10/21 08:14:44 lgarnier Exp $
+$Id: History,v 1.156 2009/10/21 15:21:09 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,8 @@
 21 October 2009 Laurent Garnier
  -  G4OpenGLQtViewer : Prepare to attach viewer In UI
+
+21st October 2009  John Allison  (opengl-V09-02-08 coworks greps-V09-02-02)
+- Added default AddCompound (const G4THitsMap<G4double>&) methods.
+  o Prevents warnings about hiding - calls G4VSceneHandler base class.
 
 15 October 2009 Laurent Garnier
Index: trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh
===================================================================
--- trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLSceneHandler.hh,v 1.26 2009/04/23 10:13:56 lgarnier Exp $
+// $Id: G4OpenGLSceneHandler.hh,v 1.27 2009/10/21 15:18:14 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -83,4 +83,5 @@
   void AddCompound (const G4VTrajectory&);
   void AddCompound (const G4VHit&);
+  void AddCompound (const G4THitsMap<G4double>&);
 
 protected:
Index: trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
===================================================================
--- trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 1138)
+++ trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLSceneHandler.cc,v 1.55 2009/03/03 14:51:29 lgarnier Exp $
+// $Id: G4OpenGLSceneHandler.cc,v 1.56 2009/10/21 15:18:43 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -879,3 +879,7 @@
 }
 
+void G4OpenGLSceneHandler::AddCompound(const G4THitsMap<G4double>& hits) {
+  G4VSceneHandler::AddCompound(hits);  // For now.
+}
+
 #endif
Index: trunk/source/visualization/RayTracer/History
===================================================================
--- trunk/source/visualization/RayTracer/History	(revision 1138)
+++ trunk/source/visualization/RayTracer/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.58 2009/09/16 16:58:26 allison Exp $
+$Id: History,v 1.59 2009/10/21 15:24:53 allison Exp $
 -------------------------------------------------------------------
 
@@ -24,4 +24,8 @@
 History file for Ray Tracer category
 ---------------------------------------
+
+21st October 2009  John Allison  (raytracer-V09-02-01 coworks greps-V09-02-02)
+- Added AddCompound (const G4THitsMap<G4double>&) methods.
+  o Prevents warnings about hiding - calls G4VSceneHandler base class.
 
 16 September 2009  John Allison  (raytracer-V09-02-00)
Index: trunk/source/visualization/RayTracer/include/G4RayTracerSceneHandler.hh
===================================================================
--- trunk/source/visualization/RayTracer/include/G4RayTracerSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/RayTracer/include/G4RayTracerSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4RayTracerSceneHandler.hh,v 1.11 2006/06/29 21:23:37 gunter Exp $
+// $Id: G4RayTracerSceneHandler.hh,v 1.12 2009/10/21 15:24:53 allison Exp $
 // GEANT4 tag $Name:  $
 
@@ -65,4 +65,5 @@
   void AddCompound(const G4VTrajectory&){}
   void AddCompound(const G4VHit&){}
+  void AddCompound(const G4THitsMap<G4double>&) {}
 
 private:
Index: trunk/source/visualization/Tree/src/G4ASCIITreeViewer.cc
===================================================================
--- trunk/source/visualization/Tree/src/G4ASCIITreeViewer.cc	(revision 1138)
+++ trunk/source/visualization/Tree/src/G4ASCIITreeViewer.cc	(revision 1140)
@@ -34,6 +34,13 @@
   G4VTreeViewer(sceneHandler, name) {
   // Make changes to view parameters for ASCIITree...
+//   if (!fVP) {
+    printf("G4ASCIITreeViewer::G4ASCIITreeViewer SHOULD CRASH HERE-----------------------------------------------------------\n");
+//   } else {
+//     printf("G4ASCIITreeViewer::G4ASCIITreeViewer SHOULD NOT CRASH HERE------------------------------------------------------------\n");
+//   }
   fVP.SetCulling(false);
+  printf("G4ASCIITreeViewer::G4ASCIITreeViewer 2\n");
   fDefaultVP.SetCulling(false);
+  printf("G4ASCIITreeViewer::G4ASCIITreeViewer 3\n");
 }
 
Index: trunk/source/visualization/VRML/GNUmakefile
===================================================================
--- trunk/source/visualization/VRML/GNUmakefile	(revision 1138)
+++ trunk/source/visualization/VRML/GNUmakefile	(revision 1140)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.7 2004/06/03 11:40:14 gcosmo Exp $
+# $Id: GNUmakefile,v 1.8 2009/10/21 15:27:21 allison Exp $
 
 # lib name
@@ -29,4 +29,5 @@
 CPPFLAGS += -I$(G4BASE)/geometry/management/include
 CPPFLAGS += -I$(G4BASE)/visualization/VRML/include
+CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include
 
 include $(G4INSTALL)/config/common.gmk
Index: trunk/source/visualization/VRML/History
===================================================================
--- trunk/source/visualization/VRML/History	(revision 1138)
+++ trunk/source/visualization/VRML/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.15 2006/06/12 08:32:16 allison Exp $
+$Id: History,v 1.17 2009/10/21 15:27:21 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,11 @@
 History file for visualization/VRML sub-category
 ------------------------------------------------
+
+21st October 2009  John Allison  (VRML-V09-02-01 coworks greps-V09-02-02)
+- Added AddCompound (const G4THitsMap<G4double>&) methods.
+  o Prevents warnings about hiding - calls G4VSceneHandler base class.
+
+29 September 2009  John Allison (VRML-V09-02-00)
+- Tagged change of disclaimer on file headings (made long ago).
 
 12th June 2006  John Allison  (VRML-V08-00-02)
Index: trunk/source/visualization/VRML/include/G4VRML1FileSceneHandler.hh
===================================================================
--- trunk/source/visualization/VRML/include/G4VRML1FileSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/VRML/include/G4VRML1FileSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VRML1FileSceneHandler.hh,v 1.17 2006/06/29 21:25:27 gunter Exp $
+// $Id: G4VRML1FileSceneHandler.hh,v 1.18 2009/10/21 15:27:21 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -73,4 +73,7 @@
           G4VSceneHandler::AddCompound(hit);
         }
+        void AddCompound ( const G4THitsMap<G4double> & hits) {
+	  G4VSceneHandler::AddCompound(hits);
+	}
 
 	void BeginPrimitives(const G4Transform3D& objectTransformation);
Index: trunk/source/visualization/VRML/include/G4VRML1SceneHandler.hh
===================================================================
--- trunk/source/visualization/VRML/include/G4VRML1SceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/VRML/include/G4VRML1SceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VRML1SceneHandler.hh,v 1.14 2006/06/29 21:25:31 gunter Exp $
+// $Id: G4VRML1SceneHandler.hh,v 1.15 2009/10/21 15:27:21 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -78,4 +78,7 @@
           G4VSceneHandler::AddCompound(hit);
         }
+        void AddCompound ( const G4THitsMap<G4double> & hits) {
+	  G4VSceneHandler::AddCompound(hits);
+	}
 
 	void BeginPrimitives(const G4Transform3D& objectTransformation);
Index: trunk/source/visualization/VRML/include/G4VRML2FileSceneHandler.hh
===================================================================
--- trunk/source/visualization/VRML/include/G4VRML2FileSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/VRML/include/G4VRML2FileSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VRML2FileSceneHandler.hh,v 1.16 2006/06/29 21:25:39 gunter Exp $
+// $Id: G4VRML2FileSceneHandler.hh,v 1.17 2009/10/21 15:27:21 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -73,4 +73,7 @@
           G4VSceneHandler::AddCompound(hit);
         }
+        void AddCompound ( const G4THitsMap<G4double> & hits) {
+	  G4VSceneHandler::AddCompound(hits);
+	}
 
 	void BeginPrimitives(const G4Transform3D& objectTransformation);
Index: trunk/source/visualization/VRML/include/G4VRML2SceneHandler.hh
===================================================================
--- trunk/source/visualization/VRML/include/G4VRML2SceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/VRML/include/G4VRML2SceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VRML2SceneHandler.hh,v 1.13 2006/06/29 21:25:43 gunter Exp $
+// $Id: G4VRML2SceneHandler.hh,v 1.14 2009/10/21 15:27:21 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -76,4 +76,7 @@
           G4VSceneHandler::AddCompound(hit);
         }
+        void AddCompound ( const G4THitsMap<G4double> & hits) {
+	  G4VSceneHandler::AddCompound(hits);
+	}
 
 	void BeginPrimitives(const G4Transform3D& objectTransformation);
Index: trunk/source/visualization/XXX/GNUmakefile
===================================================================
--- trunk/source/visualization/XXX/GNUmakefile	(revision 1138)
+++ trunk/source/visualization/XXX/GNUmakefile	(revision 1140)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.7 2006/03/28 17:16:41 allison Exp $
+# $Id: GNUmakefile,v 1.8 2009/10/21 15:28:53 allison Exp $
 
 name := G4visXXX
@@ -28,4 +28,5 @@
 CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include
 CPPFLAGS += -I$(G4BASE)/tracking/include
+CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include
 
 ifdef G4VIS_BUILD_XXXSG_DRIVER
Index: trunk/source/visualization/XXX/History
===================================================================
--- trunk/source/visualization/XXX/History	(revision 1138)
+++ trunk/source/visualization/XXX/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.27 2006/11/05 20:41:55 allison Exp $
+$Id: History,v 1.28 2009/10/21 15:28:53 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,8 @@
 History file for visualization/XXX sub-category (a template graphics system)
 ---------------------------------------------------------------------------
+
+21st October 2009  John Allison  (visXXX-V09-02-00 coworks greps-V09-02-02)
+- Added AddCompound (const G4THitsMap<G4double>&) methods.
+  o Prevents warnings about hiding - calls G4VSceneHandler base class.
 
 5th November 2006  John Allison  (visXXX-V08-01-06)
Index: trunk/source/visualization/XXX/include/G4XXXFileSceneHandler.hh
===================================================================
--- trunk/source/visualization/XXX/include/G4XXXFileSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/XXX/include/G4XXXFileSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4XXXFileSceneHandler.hh,v 1.3 2006/06/29 21:26:42 gunter Exp $
+// $Id: G4XXXFileSceneHandler.hh,v 1.4 2009/10/21 15:28:53 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -76,4 +76,5 @@
   // void AddCompound(const G4VTrajectory&);
   // void AddCompound(const G4VHit&);
+  // void AddCompound(const G4THitsMap<G4double>&);
   // void PreAddSolid(const G4Transform3D& objectTransformation,
   //	   const G4VisAttributes&);
Index: trunk/source/visualization/XXX/include/G4XXXSGSceneHandler.hh
===================================================================
--- trunk/source/visualization/XXX/include/G4XXXSGSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/XXX/include/G4XXXSGSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4XXXSGSceneHandler.hh,v 1.3 2006/06/29 21:26:56 gunter Exp $
+// $Id: G4XXXSGSceneHandler.hh,v 1.4 2009/10/21 15:28:53 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -80,4 +80,5 @@
   // void AddCompound(const G4VTrajectory&);
   // void AddCompound(const G4VHit&);
+  // void AddCompound(const G4THitsMap<G4double>&);
   void PreAddSolid(const G4Transform3D& objectTransformation,
 		   const G4VisAttributes&);
Index: trunk/source/visualization/XXX/include/G4XXXStoredSceneHandler.hh
===================================================================
--- trunk/source/visualization/XXX/include/G4XXXStoredSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/XXX/include/G4XXXStoredSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4XXXStoredSceneHandler.hh,v 1.3 2006/06/29 21:27:06 gunter Exp $
+// $Id: G4XXXStoredSceneHandler.hh,v 1.4 2009/10/21 15:28:53 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -78,4 +78,5 @@
   // void AddCompound(const G4VTrajectory&);
   // void AddCompound(const G4VHit&);
+  // void AddCompound(const G4THitsMap<G4double>&);
   void PreAddSolid(const G4Transform3D& objectTransformation,
 		   const G4VisAttributes&);
Index: trunk/source/visualization/externals/gl2ps/GNUmakefile
===================================================================
--- trunk/source/visualization/externals/gl2ps/GNUmakefile	(revision 1138)
+++ trunk/source/visualization/externals/gl2ps/GNUmakefile	(revision 1140)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.1 2009/02/18 09:54:12 lgarnier Exp $
+# $Id: GNUmakefile,v 1.2 2009/11/02 14:54:31 lgarnier Exp $
 # -------------------------------------------------------------
 # GNUmakefile for gl2ps.  Laurent Garnier, 6/2/09.
@@ -6,5 +6,5 @@
 
 # For debug mode
-CPPFLAGS += -DG4DEBUG_VIS_GL2PS
+# CPPFLAGS += -DG4DEBUG_VIS_GL2PS
 
 ifndef G4INSTALL
Index: trunk/source/visualization/externals/gl2ps/History
===================================================================
--- trunk/source/visualization/externals/gl2ps/History	(revision 1138)
+++ trunk/source/visualization/externals/gl2ps/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.9 2009/04/29 19:23:10 allison Exp $
+$Id: History,v 1.10 2009/11/02 14:54:31 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -17,4 +17,7 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+2 Nov 2009, Laurent Garnier 
+ - Add debug flag in GNUMakefile
 
 29 April 2009, Laurent Garnier (visexternal-V09-02-04)
Index: trunk/source/visualization/management/History
===================================================================
--- trunk/source/visualization/management/History	(revision 1138)
+++ trunk/source/visualization/management/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.122 2009/07/24 09:20:52 lgarnier Exp $
+$Id: History,v 1.127 2009/10/30 16:05:30 allison Exp $
 
 -------------------------------------------------------------------
@@ -26,4 +26,24 @@
 History file for visualization management sub-category
 ------------------------------------------------------
+
+30th October 2009  John Allison  (visman-V09-02-06 coworks greps-V09-02-03)
+- Added /vis/scene/add/psHits.
+- G4VisManager.cc: As above and also:
+  o Tidied view creation.
+  o Improved message ("scene" should be "scene handler").
+
+23rd October 2009  John Allison  (visman-V09-02-05 coworks greps-V09-02-02)
+- Implemented default behaviour in
+  G4VSceneHandler::AddCompound (const G4THitsMap<G4double>&).
+
+21st October 2009  John Allison  (visman-V09-02-04 coworks greps-V09-02-02)
+- G4VSceneHandler:
+  o Added default AddCompound (const G4THitsMap<G4double>&) methods.
+    (For time being just issues warning.)
+
+29th September 2009  John Allison  (visman-V09-02-03)
+- G4VSceneHandler.cc: Allow refresh in GeomClosed as well as Idle state.
+- G4VisCommandsSceneAdd.cc: Fixed uninitialised pointers.
+- G4VisManager.cc: Considerable tidy up.
 
 24th July 2009  Laurent Garnier
Index: trunk/source/visualization/management/include/G4VSceneHandler.hh
===================================================================
--- trunk/source/visualization/management/include/G4VSceneHandler.hh	(revision 1138)
+++ trunk/source/visualization/management/include/G4VSceneHandler.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VSceneHandler.hh,v 1.40 2008/01/04 22:03:45 allison Exp $
+// $Id: G4VSceneHandler.hh,v 1.41 2009/10/21 14:26:59 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -42,9 +42,8 @@
 #include "globals.hh"
 
-#include <stack>
-
 #include "G4VGraphicsScene.hh"
 #include "G4ViewerList.hh"
 #include "G4ViewParameters.hh"
+#include "G4THitsMap.hh"
 
 class G4Scene;
@@ -130,4 +129,5 @@
   virtual void AddCompound (const G4VTrajectory&);
   virtual void AddCompound (const G4VHit&);
+  virtual void AddCompound (const G4THitsMap<G4double>&);
 
   //////////////////////////////////////////////////////////////
Index: trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh
===================================================================
--- trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh	(revision 1138)
+++ trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VisCommandsSceneAdd.hh,v 1.17 2006/11/01 10:50:28 allison Exp $
+// $Id: G4VisCommandsSceneAdd.hh,v 1.18 2009/10/30 15:58:50 allison Exp $
 // GEANT4 tag $Name:  $
 
@@ -133,4 +133,16 @@
 };
 
+class G4VisCommandSceneAddPSHits: public G4VVisCommandScene {
+public:
+  G4VisCommandSceneAddPSHits ();
+  virtual ~G4VisCommandSceneAddPSHits ();
+  G4String GetCurrentValue (G4UIcommand* command);
+  void SetNewValue (G4UIcommand* command, G4String newValue);
+private:
+  G4VisCommandSceneAddPSHits (const G4VisCommandSceneAddPSHits&);
+  G4VisCommandSceneAddPSHits& operator = (const G4VisCommandSceneAddPSHits&);
+  G4UIcmdWithoutParameter* fpCommand;
+};
+
 class G4VisCommandSceneAddScale: public G4VVisCommandScene {
 public:
Index: trunk/source/visualization/management/include/G4VisExecutive.icc
===================================================================
--- trunk/source/visualization/management/include/G4VisExecutive.icc	(revision 1138)
+++ trunk/source/visualization/management/include/G4VisExecutive.icc	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VisExecutive.icc,v 1.21 2009/03/14 11:43:42 allison Exp $
+// $Id: G4VisExecutive.icc,v 1.22 2009/10/12 11:54:50 akimura Exp $
 // GEANT4 tag $Name:  $
 //
@@ -47,4 +47,5 @@
 #include "G4VRML1File.hh"
 #include "G4VRML2File.hh"
+#include "G4GMocrenFile.hh"
 
 // Needing external packages or libraries...
@@ -110,4 +111,5 @@
   RegisterGraphicsSystem (new G4VRML1File);
   RegisterGraphicsSystem (new G4VRML2File);
+  RegisterGraphicsSystem (new G4GMocrenFile);
   // Graphics systems needing external packages or libraries...
 
Index: trunk/source/visualization/management/src/G4VSceneHandler.cc
===================================================================
--- trunk/source/visualization/management/src/G4VSceneHandler.cc	(revision 1138)
+++ trunk/source/visualization/management/src/G4VSceneHandler.cc	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VSceneHandler.cc,v 1.83 2008/01/04 22:03:46 allison Exp $
+// $Id: G4VSceneHandler.cc,v 1.86 2009/10/23 07:58:36 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -262,5 +262,10 @@
 
 void G4VSceneHandler::AddCompound (const G4VHit& hit) {
-  ((G4VHit&)hit).Draw(); // Cast to non-const because Draw is non-const!!!!
+  static_cast<G4VHit>(hit).Draw(); // Cast because Draw is non-const!!!!
+}
+
+void G4VSceneHandler::AddCompound (const G4THitsMap<G4double>& hits) {
+  // Cast because DrawAllHits is non-const!!!!
+  static_cast<G4THitsMap<G4double> >(hits).DrawAllHits();
 }
 
@@ -583,8 +588,9 @@
   printf("G4VSceneHandler::ProcessScene : Idle ?\n");
 #endif
-  // Refresh event from end-of-event model list.  Allow only in Idle state...
+  // Refresh event from end-of-event model list.
+  // Allow only in Idle or GeomClosed state...
   G4StateManager* stateManager = G4StateManager::GetStateManager();
   G4ApplicationState state = stateManager->GetCurrentState();
-  if (state == G4State_Idle) {
+  if (state == G4State_Idle || state == G4State_GeomClosed) {
 #ifdef G4DEBUG_VIS_MANAGEMENT
     printf("G4VSceneHandler::ProcessScene : IDLE\n");
Index: trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc
===================================================================
--- trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc	(revision 1138)
+++ trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VisCommandsSceneAdd.cc,v 1.74 2009/07/24 09:20:52 lgarnier Exp $
+// $Id: G4VisCommandsSceneAdd.cc,v 1.76 2009/10/30 15:58:50 allison Exp $
 // GEANT4 tag $Name:  $
 // /vis/scene commands - John Allison  9th August 1998
@@ -37,4 +37,5 @@
 #include "G4ModelingParameters.hh"
 #include "G4HitsModel.hh"
+#include "G4PSHitsModel.hh"
 #include "G4TrajectoriesModel.hh"
 #include "G4ScaleModel.hh"
@@ -229,9 +230,9 @@
   const G4Run* currentRun = 0;
   G4RunManager* runManager = G4RunManager::GetRunManager();
-  if (runManager)  currentRun = runManager->GetCurrentRun();
+  if (runManager) currentRun = runManager->GetCurrentRun();
 
   G4VModel* model = fpVisManager->GetCurrentSceneHandler()->GetModel();
-  const G4ModelingParameters* mp;
-  const G4Event* currentEvent;
+  const G4ModelingParameters* mp = 0;
+  const G4Event* currentEvent = 0;
   if (model) {
    mp = model->GetModelingParameters();
@@ -240,5 +241,7 @@
     G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
     if (verbosity >= G4VisManager::errors) {
-      G4cout <<	"ERROR: No model defined for this SceneHandler : "<< fpVisManager->GetCurrentSceneHandler()->GetName() << G4endl;
+      G4cout <<	"ERROR: No model defined for this SceneHandler : "
+	     << fpVisManager->GetCurrentSceneHandler()->GetName()
+	     << G4endl;
     }
   }
@@ -890,4 +893,50 @@
   sceneHandler.AddPrimitive(*fp4);
   sceneHandler.EndPrimitives();
+}
+
+////////////// /vis/scene/add/psHits ///////////////////////////////////////
+
+G4VisCommandSceneAddPSHits::G4VisCommandSceneAddPSHits () {
+  fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/psHits", this);
+  fpCommand -> SetGuidance
+    ("Adds Primitive Scorer Hits (PSHits) to current scene.");
+  fpCommand -> SetGuidance
+    ("PSHits are drawn at end of run when the scene in which"
+     "\nthey are added is current.");
+}
+
+G4VisCommandSceneAddPSHits::~G4VisCommandSceneAddPSHits () {
+  delete fpCommand;
+}
+
+G4String G4VisCommandSceneAddPSHits::GetCurrentValue (G4UIcommand*) {
+  return "";
+}
+
+void G4VisCommandSceneAddPSHits::SetNewValue (G4UIcommand*, G4String) {
+
+  G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
+  G4bool warn(verbosity >= G4VisManager::warnings);
+
+  G4Scene* pScene = fpVisManager->GetCurrentScene();
+  if (!pScene) {
+    if (verbosity >= G4VisManager::errors) {
+      G4cout <<	"ERROR: No current scene.  Please create one." << G4endl;
+    }
+    return;
+  }
+
+  G4PSHitsModel* model = new G4PSHitsModel;
+  const G4String& currentSceneName = pScene -> GetName ();
+  G4bool successful = pScene -> AddEndOfEventModel (model, warn);
+  if (successful) {
+    if (verbosity >= G4VisManager::confirmations) {
+      G4cout << "Primitive Scorer hits will be drawn in scene \""
+	     << currentSceneName << "\"."
+	     << G4endl;
+    }
+  }
+  else G4VisCommandsSceneAddUnsuccessful(verbosity);
+  UpdateVisManagerScene (currentSceneName);
 }
 
Index: trunk/source/visualization/management/src/G4VisManager.cc
===================================================================
--- trunk/source/visualization/management/src/G4VisManager.cc	(revision 1138)
+++ trunk/source/visualization/management/src/G4VisManager.cc	(revision 1140)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: G4VisManager.cc,v 1.118 2009/03/09 12:42:00 allison Exp $
+// $Id: G4VisManager.cc,v 1.121 2009/10/30 16:03:41 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -656,5 +656,5 @@
 	G4cout << "ERROR in G4VisManager::CreateSceneHandler during "
 	       << fpGraphicsSystem -> GetName ()
-	       << " scene creation.\n  No action taken."
+	       << " scene handler creation.\n  No action taken."
 	       << G4endl;
       }
@@ -669,80 +669,81 @@
   if (!fInitialised) Initialise ();
 
-  if (fpSceneHandler) {
-    printf("G4VisManager::CreateViewer 1-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
-    G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name);
-    printf("G4VisManager::CreateViewer 2-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
-
-    // Viewer is created, now we can set geometry parameters
-    // Before 12/2008, it was done in G4VViewer.cc but it did not have to be there!
+  if (!fpSceneHandler) {
+    PrintInvalidPointers ();
+    return;
+  }
+
+  printf("G4VisManager::CreateViewer 1-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
+  G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name);
+  printf("G4VisManager::CreateViewer 2-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
+
+  if (!p) {
+    if (fVerbosity >= errors) {
+      G4cout << "ERROR in G4VisManager::CreateViewer during "
+	     << fpGraphicsSystem -> GetName ()
+	     << " viewer creation.\n  No action taken."
+	     << G4endl;
+    }
+    return;
+  }
+
+  if (p -> GetViewId() < 0) {
+    if (fVerbosity >= errors) {
+      G4cout << "ERROR in G4VisManager::CreateViewer during "
+	     << fpGraphicsSystem -> GetName ()
+	     << " viewer initialisation.\n  No action taken."
+	     << G4endl;
+    }
+    return;
+  }
+
+  // Viewer is created, now we can set geometry parameters
+  // Before 12/2008, it was done in G4VViewer.cc but it did not have to be there!
     
-    //    printf("G4VisManager::CreateViewer 3-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
-    G4ViewParameters vp = p->GetViewParameters();
-    //    printf("G4VisManager::CreateViewer 4-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
-    vp.SetXGeometryString(XGeometry);
-    p->SetViewParameters(vp); //parse string and store parameters
-
-    if (!p) {
-      if (fVerbosity >= errors) {
-	G4cout << "ERROR in G4VisManager::CreateViewer during "
-	       << fpGraphicsSystem -> GetName ()
-	       << " viewer creation.\n  No action taken."
-	       << G4endl;
-      }
-    } else {
-      p -> Initialise ();
-      if (p -> GetViewId() < 0) {
-	if (fVerbosity >= errors) {
-	G4cout << "ERROR in G4VisManager::CreateViewer during "
-	       << fpGraphicsSystem -> GetName ()
-	       << " viewer initialisation.\n  No action taken."
-	       << G4endl;
-	}
-      } else {
-	fpViewer = p;                             // Make current.
-	fpSceneHandler -> AddViewerToList (fpViewer);
-	fpSceneHandler -> SetCurrentViewer (fpViewer);
-
-	if (fVerbosity >= confirmations) {
-	  G4cout << "G4VisManager::CreateViewer: new viewer created."
-		 << G4endl;
-	}
-
-	const G4ViewParameters& vp = fpViewer->GetViewParameters();
-	if (fVerbosity >= parameters) {
-	  G4cout << " view parameters are:\n  " << vp << G4endl;
-	}
-
-	if (vp.IsCulling () && vp.IsCullingInvisible ()) {
-	  static G4bool warned = false;
-	  if (fVerbosity >= confirmations) {
-	    if (!warned) {
-	      G4cout <<
+  G4ViewParameters initialvp = p -> GetViewParameters();
+  initialvp.SetXGeometryString(XGeometry); //parse string and store parameters
+  p -> SetViewParameters(initialvp);
+  p -> Initialise ();  // (Viewer itself may change view parameters further.)
+
+  fpViewer = p;                             // Make current.
+  fpSceneHandler -> AddViewerToList (fpViewer);
+  fpSceneHandler -> SetCurrentViewer (fpViewer);
+  if (fVerbosity >= confirmations) {
+    G4cout << "G4VisManager::CreateViewer: new viewer created."
+	   << G4endl;
+  }
+
+  const G4ViewParameters& vp = fpViewer->GetViewParameters();
+  if (fVerbosity >= parameters) {
+    G4cout << " view parameters are:\n  " << vp << G4endl;
+  }
+
+  if (vp.IsCulling () && vp.IsCullingInvisible ()) {
+    static G4bool warned = false;
+    if (fVerbosity >= confirmations) {
+      if (!warned) {
+	G4cout <<
   "NOTE: objects with visibility flag set to \"false\""
   " will not be drawn!"
   "\n  \"/vis/viewer/set/culling global false\" to Draw such objects."
   "\n  Also see other \"/vis/viewer/set\" commands."
-		     << G4endl;
-	      warned = true;
-	    }
-	  }
-	}
-	if (vp.IsCullingCovered ()) {
-	  static G4bool warned = false;
-	  if (fVerbosity >= warnings) {
-	    if (!warned) {
-	      G4cout <<
+	       << G4endl;
+	warned = true;
+      }
+    }
+  }
+  if (vp.IsCullingCovered ()) {
+    static G4bool warned = false;
+    if (fVerbosity >= warnings) {
+      if (!warned) {
+	G4cout <<
   "WARNING: covered objects in solid mode will not be rendered!"
   "\n  \"/vis/viewer/set/culling coveredDaughters false\" to reverse this."
   "\n  Also see other \"/vis/viewer/set\" commands."
-		     << G4endl;
-	      warned = true;
-	    }
-	  }
-	}
-      }
-    }
-  }
-  else PrintInvalidPointers ();
+	       << G4endl;
+	warned = true;
+      }
+    }
+  }
 }
 
@@ -1088,4 +1089,5 @@
   RegisterMessenger(new G4VisCommandSceneAddLogicalVolume);
   RegisterMessenger(new G4VisCommandSceneAddLogo);
+  RegisterMessenger(new G4VisCommandSceneAddPSHits);
   RegisterMessenger(new G4VisCommandSceneAddScale);
   RegisterMessenger(new G4VisCommandSceneAddText);
@@ -1331,7 +1333,8 @@
           printf("G4VisManager::EndOfEvent 7 \n");
 	  G4cout <<
-	    "WARNING: G4VisManager::EndOfEvent: Event keeping suspended."
-	    "\n  The number of events exceeds the maximum that may be kept, "
-		 << maxNumberOfKeptEvents << '.'
+ "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended."
+ "\n  The number of events exceeds the maximum, "
+		 << maxNumberOfKeptEvents <<
+ ", that can be kept by the vis manager."
 		 << G4endl;
 	}
@@ -1371,10 +1374,11 @@
     if (fEventKeepingSuspended && fVerbosity >= warnings) {
       G4cout <<
-	"WARNING: G4VisManager::EndOfRun: Event keeping was suspended."
-	"\n  The number of events in the run exceeded the maximum to be kept, "
-	     << fpScene->GetMaxNumberOfKeptEvents() << '.' <<
-	"\n  The number of events to be kept can be changed with"
-	"\n  \"/vis/scene/endOfEventAction accumulate <N>\", where N is the"
-	"\n  maximum number you wish to allow.  N < 0 means \"unlimited\"."
+ "WARNING: G4VisManager::EndOfRun: Automatic event keeping has been suspended."
+ "\n  The number of events in the run exceeded the maximum, "
+	     << fpScene->GetMaxNumberOfKeptEvents() <<
+ ", that can be kept by the vis manager." <<
+ "\n  The number of events kept by the vis manager can be changed with"
+ "\n  \"/vis/scene/endOfEventAction accumulate <N>\", where N is the"
+ "\n  maximum number you wish to allow.  N < 0 means \"unlimited\"."
 	     << G4endl;
     }
Index: trunk/source/visualization/modeling/History
===================================================================
--- trunk/source/visualization/modeling/History	(revision 1138)
+++ trunk/source/visualization/modeling/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.109 2009/02/25 14:21:45 allison Exp $
+$Id: History,v 1.114 2009/10/22 15:40:00 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,19 @@
 History file for visualization/modeling
 ---------------------------------------
+
+22nd October 2009  John Allison  (modeling-V09-02-05 coworks greps-V09-02-02)
+- Added G4PSHitsModel for gMocren driver.
+
+21st October 2009  John Allison  (modeling-V09-02-04 coworks greps-V09-02-02)
+- G4BoundingSphereScene, G4PhysicalVolumeMassScene,
+  G4PhysicalVolumeSearchScene:
+  o Added empty AddCompound (const G4THitsMap<G4double>&) methods.
+
+10th October 2009  John Allison  (modeling-V09-02-03)
+- G4PhysicalVolumeModel: Added G4PhysicalVolumeModelTouchable.  Used in
+  ComputeMaterial.  Effective for nested parameterisations.
+
+29th September 2009  John Allison  (modeling-V09-02-02)
+- G4PhysicalVolumeModel.cc: Added warning if logical volume not defined.
 
 25th February 2009  John Allison  (modeling-V09-02-01 - needs greps-V09-02-01)
Index: trunk/source/visualization/modeling/include/G4BoundingSphereScene.hh
===================================================================
--- trunk/source/visualization/modeling/include/G4BoundingSphereScene.hh	(revision 1138)
+++ trunk/source/visualization/modeling/include/G4BoundingSphereScene.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4BoundingSphereScene.hh,v 1.18 2008/01/04 21:59:15 allison Exp $
+// $Id: G4BoundingSphereScene.hh,v 1.19 2009/10/21 14:17:33 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -71,4 +71,5 @@
   void AddCompound (const G4VTrajectory&) {}
   void AddCompound (const G4VHit&) {}
+  void AddCompound (const G4THitsMap<G4double>&) {}
   G4VisExtent GetBoundingSphereExtent ();
   const G4Point3D& GetCentre() const {return fCentre;}
Index: trunk/source/visualization/modeling/include/G4PhysicalVolumeMassScene.hh
===================================================================
--- trunk/source/visualization/modeling/include/G4PhysicalVolumeMassScene.hh	(revision 1138)
+++ trunk/source/visualization/modeling/include/G4PhysicalVolumeMassScene.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4PhysicalVolumeMassScene.hh,v 1.9 2008/01/04 21:59:15 allison Exp $
+// $Id: G4PhysicalVolumeMassScene.hh,v 1.10 2009/10/21 14:17:33 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -109,4 +109,5 @@
   void AddCompound (const G4VTrajectory&) {}
   void AddCompound (const G4VHit&) {}
+  void AddCompound (const G4THitsMap<G4double>&) {}
 
   ////////////////////////////////////////////////////////////////
Index: trunk/source/visualization/modeling/include/G4PhysicalVolumeModel.hh
===================================================================
--- trunk/source/visualization/modeling/include/G4PhysicalVolumeModel.hh	(revision 1138)
+++ trunk/source/visualization/modeling/include/G4PhysicalVolumeModel.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4PhysicalVolumeModel.hh,v 1.34 2007/04/03 13:46:49 allison Exp $
+// $Id: G4PhysicalVolumeModel.hh,v 1.35 2009/10/10 14:29:59 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -49,4 +49,5 @@
 
 #include "G4VModel.hh"
+#include "G4VTouchable.hh"
 
 #include "G4Transform3D.hh"
@@ -76,9 +77,16 @@
   public:
     G4PhysicalVolumeNodeID
-    (G4VPhysicalVolume* pPV = 0, G4int iCopyNo = 0, G4int depth = 0):
-      fpPV(pPV), fCopyNo(iCopyNo), fNonCulledDepth(depth) {}
+    (G4VPhysicalVolume* pPV = 0,
+     G4int iCopyNo = 0,
+     G4int depth = 0,
+     const G4Transform3D& transform = G4Transform3D()):
+      fpPV(pPV),
+      fCopyNo(iCopyNo),
+      fNonCulledDepth(depth),
+      fTransform(transform) {}
     G4VPhysicalVolume* GetPhysicalVolume() const {return fpPV;}
     G4int GetCopyNo() const {return fCopyNo;}
     G4int GetNonCulledDepth() const {return fNonCulledDepth;}
+    const G4Transform3D& GetTransform() const {return fTransform;}
     G4bool operator< (const G4PhysicalVolumeNodeID& right) const;
   private:
@@ -86,6 +94,22 @@
     G4int fCopyNo;
     G4int fNonCulledDepth;
+    G4Transform3D fTransform;
   };
   // Nested class for identifying physical volume nodes.
+
+  class G4PhysicalVolumeModelTouchable: public G4VTouchable {
+  public:
+    G4PhysicalVolumeModelTouchable
+    (const std::vector<G4PhysicalVolumeNodeID>& fullPVPath);
+    const G4ThreeVector& GetTranslation(G4int depth) const;
+    const G4RotationMatrix* GetRotation(G4int depth) const;
+    G4VPhysicalVolume* GetVolume(G4int depth) const;
+    G4VSolid* GetSolid(G4int depth) const;
+    G4int GetReplicaNumber(G4int depth) const;
+    G4int GetHistoryDepth() const {return fFullPVPath.size();}
+  private:
+    const std::vector<G4PhysicalVolumeNodeID>& fFullPVPath;
+  };
+  // Nested class for handling nested parameterisations.
 
   G4PhysicalVolumeModel
Index: trunk/source/visualization/modeling/include/G4PhysicalVolumeSearchScene.hh
===================================================================
--- trunk/source/visualization/modeling/include/G4PhysicalVolumeSearchScene.hh	(revision 1138)
+++ trunk/source/visualization/modeling/include/G4PhysicalVolumeSearchScene.hh	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4PhysicalVolumeSearchScene.hh,v 1.18 2008/01/04 21:59:15 allison Exp $
+// $Id: G4PhysicalVolumeSearchScene.hh,v 1.19 2009/10/21 14:17:33 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -74,4 +74,5 @@
   void AddCompound (const G4VTrajectory&) {}
   void AddCompound (const G4VHit&) {}
+  void AddCompound (const G4THitsMap<G4double>&) {}
   G4int                GetFoundDepth          () const;
   G4VPhysicalVolume*   GetFoundVolume         () const;
Index: trunk/source/visualization/modeling/src/G4PhysicalVolumeModel.cc
===================================================================
--- trunk/source/visualization/modeling/src/G4PhysicalVolumeModel.cc	(revision 1138)
+++ trunk/source/visualization/modeling/src/G4PhysicalVolumeModel.cc	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4PhysicalVolumeModel.cc,v 1.63 2007/11/10 14:56:36 allison Exp $
+// $Id: G4PhysicalVolumeModel.cc,v 1.66 2009/10/23 08:08:19 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -46,4 +46,5 @@
 #include "G4TransportationManager.hh"
 #include "G4Polyhedron.hh"
+#include "HepPolyhedronProcessor.h"
 #include "G4AttDefStore.hh"
 #include "G4AttDef.hh"
@@ -53,30 +54,4 @@
 
 #include <sstream>
-
-G4bool G4PhysicalVolumeModel::G4PhysicalVolumeNodeID::operator<
-  (const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID& right) const
-{
-  if (fpPV < right.fpPV) return true;
-  if (fpPV == right.fpPV) {
-    if (fCopyNo < right.fCopyNo) return true;
-    if (fCopyNo == right.fCopyNo)
-      return fNonCulledDepth < right.fNonCulledDepth;
-  }
-  return false;
-}
-
-std::ostream& operator<<
-  (std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID node)
-{
-  G4VPhysicalVolume* pPV = node.GetPhysicalVolume();
-  if (pPV) {
-    os << pPV->GetName()
-       << ':' << node.GetCopyNo()
-       << '[' << node.GetNonCulledDepth() << ']';
-  } else {
-    os << "Null node";
-  }
-  return os;
-}
 
 G4PhysicalVolumeModel::G4PhysicalVolumeModel
@@ -232,10 +207,15 @@
     G4VPVParameterisation* pP = pVPV -> GetParameterisation ();
     if (pP) {  // Parametrised volume.
+      if (fCurrentDepth == 0) nReplicas = 1;  // Just draw first
       for (int n = 0; n < nReplicas; n++) {
 	pSol = pP -> ComputeSolid (n, pVPV);
-	pMaterial = pP -> ComputeMaterial (n, pVPV);
 	pP -> ComputeTransformation (n, pVPV);
 	pSol -> ComputeDimensions (pP, n, pVPV);
 	pVPV -> SetCopyNo (n);
+	// Create a touchable of current parent for ComputeMaterial.
+	// fFullPVPath has not been updated yet so at this point it
+	// corresponds to the parent.
+	G4PhysicalVolumeModelTouchable parentTouchable(fFullPVPath);
+	pMaterial = pP -> ComputeMaterial (n, pVPV, &parentTouchable);
 	DescribeAndDescend (pVPV, requestedDepth, pLV, pSol, pMaterial,
 			    theAT, sceneHandler);
@@ -363,30 +343,4 @@
   fpCurrentTransform = &theNewAT;
 
-  /********************************************************
-  G4cout << "G4PhysicalVolumeModel::DescribeAndDescend: "
-	 << pVPV -> GetName () << "." << pVPV -> GetCopyNo ();
-  G4cout << "\n  theAT: ";
-  G4cout << "\n    Rotation: ";
-  G4RotationMatrix rotation = theAT.getRotation ();
-  G4cout << rotation.thetaX() << ", "
-	 << rotation.phiX() << ", "
-	 << rotation.thetaY() << ", "
-	 << rotation.phiY() << ", "
-	 << rotation.thetaZ() << ", "
-	 << rotation.phiZ();
-  G4cout << "\n    Translation: " << theAT.getTranslation();
-  G4cout << "\n  theNewAT: ";
-  G4cout << "\n    Rotation: ";
-  rotation = theNewAT.getRotation ();
-  G4cout << rotation.thetaX() << ", "
-	 << rotation.phiX() << ", "
-	 << rotation.thetaY() << ", "
-	 << rotation.phiY() << ", "
-	 << rotation.thetaZ() << ", "
-	 << rotation.phiZ();
-  G4cout << "\n    Translation: " << theNewAT.getTranslation();
-  G4cout << G4endl;
-  **********************************************************/
-
   // Make decision to draw...
   const G4VisAttributes* pVisAttribs = pLV->GetVisAttributes();
@@ -429,5 +383,6 @@
   G4int copyNo = fpCurrentPV->GetCopyNo();
   fFullPVPath.push_back
-    (G4PhysicalVolumeNodeID(fpCurrentPV,copyNo,fCurrentDepth));
+    (G4PhysicalVolumeNodeID
+     (fpCurrentPV,copyNo,fCurrentDepth,*fpCurrentTransform));
 
   if (thisToBeDrawn) {
@@ -436,5 +391,6 @@
     G4int copyNo = fpCurrentPV->GetCopyNo();
     fDrawnPVPath.push_back
-      (G4PhysicalVolumeNodeID(fpCurrentPV,copyNo,fCurrentDepth));
+      (G4PhysicalVolumeNodeID
+       (fpCurrentPV,copyNo,fCurrentDepth,*fpCurrentTransform));
 
     if (fpMP->IsExplode() && fDrawnPVPath.size() == 1) {
@@ -563,25 +519,30 @@
     G4Polyhedron* pOriginal = pSol->GetPolyhedron();
     G4Polyhedron::ResetNumberOfRotationSteps();
+
     if (!pOriginal) {
-	if (fpMP->IsWarning())
-	  G4cout <<
- "WARNING: G4PhysicalVolumeModel::DescribeSolid: solid\n  \""
-		 << pSol->GetName() <<
- "\" has no polyhedron.  Cannot by clipped."
-		 << G4endl;
-	pSol -> DescribeYourselfTo (sceneHandler);  // Standard treatment.
+
+      if (fpMP->IsWarning())
+	G4cout <<
+	  "WARNING: G4PhysicalVolumeModel::DescribeSolid: solid\n  \""
+	       << pSol->GetName() <<
+	  "\" has no polyhedron.  Cannot by clipped."
+	       << G4endl;
+      pSol -> DescribeYourselfTo (sceneHandler);  // Standard treatment.
+
     } else {
 
       G4Polyhedron resultant = *pOriginal;
+      G4VisAttributes resultantVisAttribs(*pVisAttribs);
 
       if (fpClippingPolyhedron) {
 	G4Polyhedron clipper = *fpClippingPolyhedron;  // Local copy.
 	clipper.Transform(theAT.inverse());
+	HepPolyhedronProcessor processor;
 	switch (fClippingMode) {
 	default:
-	case subtraction: resultant = resultant.subtract(clipper); break;
-	case intersection: resultant = resultant.intersect(clipper); break;
+	case subtraction: processor.push_back(HepPolyhedronProcessor::SUBTRACTION, clipper); break;
+	case intersection: processor.push_back(HepPolyhedronProcessor::INTERSECTION, clipper); break;
 	}
-	if(resultant.IsErrorBooleanProcess()) {
+	if (!processor.execute(resultant)) {
 	  if (fpMP->IsWarning())
 	    G4cout <<
@@ -589,6 +550,8 @@
  "\n  solid \"" << pSol->GetName() <<
  "\" not defined due to error during Boolean processing."
+ "\n  It will be drawn in red."
 		   << G4endl;
-	  // Nevertheless, keep resultant.
+	  // Nevertheless, keep resultant, but draw it in red
+	  resultantVisAttribs.SetColour(G4Colour::Red());
 	}
       }
@@ -597,6 +560,7 @@
 	G4Polyhedron sectioner = *pSectionPolyhedron;  // Local copy.
 	sectioner.Transform(theAT.inverse());
-	resultant = resultant.intersect(sectioner);
-	if(resultant.IsErrorBooleanProcess()) {
+	HepPolyhedronProcessor processor;
+	processor.push_back(HepPolyhedronProcessor::INTERSECTION, sectioner);
+	if (!processor.execute(resultant)) {
 	  if (fpMP->IsWarning())
 	    G4cout <<
@@ -604,6 +568,8 @@
  "\n  solid \"" << pSol->GetName() <<
  "\" not defined due to error during Boolean processing."
+ "\n  It will be drawn in red."
 		   << G4endl;
-	  // Nevertheless, keep resultant.
+	  // Nevertheless, keep resultant, but draw it in red
+	  resultantVisAttribs.SetColour(G4Colour::Red());
 	}
       }
@@ -612,6 +578,7 @@
 	G4Polyhedron cutter = *pCutawayPolyhedron;  // Local copy.
 	cutter.Transform(theAT.inverse());
-	resultant = resultant.subtract(cutter);
-	if(resultant.IsErrorBooleanProcess()) {
+	HepPolyhedronProcessor processor;
+	processor.push_back(HepPolyhedronProcessor::SUBTRACTION, cutter);
+	if (!processor.execute(resultant)) {
 	  if (fpMP->IsWarning())
 	    G4cout <<
@@ -619,11 +586,13 @@
  "\n  solid \"" << pSol->GetName() <<
  "\" not defined due to error during Boolean processing."
+ "\n  It will be drawn in red."
 		   << G4endl;
-	  // Nevertheless, keep resultant.
+	  // Nevertheless, keep resultant, but draw it in red
+	  resultantVisAttribs.SetColour(G4Colour::Red());
 	}
       }
 
       // Finally, force polyhedron drawing...
-      resultant.SetVisAttributes(pVisAttribs);
+      resultant.SetVisAttributes(resultantVisAttribs);
       sceneHandler.BeginPrimitives(theAT);
       sceneHandler.AddPrimitive(resultant);
@@ -760,4 +729,14 @@
     if (i != fFullPVPath.size() - 1) oss << '/';
   }
+
+  if (!fpCurrentLV) {
+     G4Exception
+        ("G4PhysicalVolumeModel::CreateCurrentAttValues",
+         "",
+         JustWarning,
+         "Current logical volume not defined.");
+     return values;
+  }
+
   values->push_back(G4AttValue("PVPath", oss.str(),""));
   if (fpCurrentLV) {
@@ -787,2 +766,97 @@
   return values;
 }
+
+G4bool G4PhysicalVolumeModel::G4PhysicalVolumeNodeID::operator<
+  (const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID& right) const
+{
+  if (fpPV < right.fpPV) return true;
+  if (fpPV == right.fpPV) {
+    if (fCopyNo < right.fCopyNo) return true;
+    if (fCopyNo == right.fCopyNo)
+      return fNonCulledDepth < right.fNonCulledDepth;
+  }
+  return false;
+}
+
+std::ostream& operator<<
+  (std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID node)
+{
+  G4VPhysicalVolume* pPV = node.GetPhysicalVolume();
+  if (pPV) {
+    os << pPV->GetName()
+       << ':' << node.GetCopyNo()
+       << '[' << node.GetNonCulledDepth() << ']'
+       << ':' << node.GetTransform();
+  } else {
+    os << "Null node";
+  }
+  return os;
+}
+
+G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::G4PhysicalVolumeModelTouchable
+(const std::vector<G4PhysicalVolumeNodeID>& fullPVPath):
+  fFullPVPath(fullPVPath) {}
+
+const G4ThreeVector& G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetTranslation(G4int depth) const
+{
+  size_t i = fFullPVPath.size() - depth - 1;
+  if (i >= fFullPVPath.size()) {
+    G4Exception("G4PhysicalVolumeModelTouchable::GetTranslation",
+		"Index out of range",
+		FatalErrorInArgument,
+		"Asking for non-existent depth");
+  }
+  static G4ThreeVector tempTranslation;
+  tempTranslation = fFullPVPath[i].GetTransform().getTranslation();
+  return tempTranslation;
+}
+
+const G4RotationMatrix* G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetRotation(G4int depth) const
+{
+  size_t i = fFullPVPath.size() - depth - 1;
+  if (i >= fFullPVPath.size()) {
+    G4Exception("G4PhysicalVolumeModelTouchable::GetRotation",
+		"Index out of range",
+		FatalErrorInArgument,
+		"Asking for non-existent depth");
+  }
+  static G4RotationMatrix tempRotation;
+  tempRotation = fFullPVPath[i].GetTransform().getRotation();
+  return &tempRotation;
+}
+
+G4VPhysicalVolume* G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetVolume(G4int depth) const
+{
+  size_t i = fFullPVPath.size() - depth - 1;
+  if (i >= fFullPVPath.size()) {
+    G4Exception("G4PhysicalVolumeModelTouchable::GetVolume",
+		"Index out of range",
+		FatalErrorInArgument,
+		"Asking for non-existent depth");
+  }
+  return fFullPVPath[i].GetPhysicalVolume();
+}
+
+G4VSolid* G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetSolid(G4int depth) const
+{
+  size_t i = fFullPVPath.size() - depth - 1;
+  if (i >= fFullPVPath.size()) {
+    G4Exception("G4PhysicalVolumeModelTouchable::GetSolid",
+		"Index out of range",
+		FatalErrorInArgument,
+		"Asking for non-existent depth");
+  }
+  return fFullPVPath[i].GetPhysicalVolume()->GetLogicalVolume()->GetSolid();
+}
+
+G4int G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetReplicaNumber(G4int depth) const
+{
+  size_t i = fFullPVPath.size() - depth - 1;
+  if (i >= fFullPVPath.size()) {
+    G4Exception("G4PhysicalVolumeModelTouchable::GetReplicaNumber",
+		"Index out of range",
+		FatalErrorInArgument,
+		"Asking for non-existent depth");
+  }
+  return fFullPVPath[i].GetCopyNo();
+}
Index: trunk/source/visualization/test/History
===================================================================
--- trunk/source/visualization/test/History	(revision 1138)
+++ trunk/source/visualization/test/History	(revision 1140)
@@ -1,3 +1,3 @@
-$Id: History,v 1.117 2009/07/28 12:50:51 lgarnier Exp $
+$Id: History,v 1.119 2009/09/29 21:36:38 allison Exp $
 
 History file for visualization/test subdirectory
@@ -5,4 +5,10 @@
 
 $Log: History,v $
+Revision 1.119  2009/09/29 21:36:38  allison
+vistest-V09-02-00
+
+Revision 1.118  2009/09/29 21:35:56  allison
+Changed main program, test19.cc, to use G4UIExecutive.
+
 Revision 1.117  2009/07/28 12:50:51  lgarnier
 Adding Qt support for test19
Index: trunk/source/visualization/test/test19.cc
===================================================================
--- trunk/source/visualization/test/test19.cc	(revision 1138)
+++ trunk/source/visualization/test/test19.cc	(revision 1140)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: test19.cc,v 1.30 2009/07/28 12:50:51 lgarnier Exp $
+// $Id: test19.cc,v 1.31 2009/09/29 21:35:56 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -48,19 +48,6 @@
 #include "MySteppingAction.hh"
 
-#include "G4UIterminal.hh"
-#if defined(G4UI_USE_GAG)
-  #include "G4UIGAG.hh"
-#elif defined(G4UI_USE_TCSH)
-  #include "G4UItcsh.hh"
-#elif defined(G4UI_USE_WO)
-  #include "G4UIWo.hh"
-#elif defined(G4UI_USE_XM)
-  #include "G4UIXm.hh"
-#elif defined(G4UI_USE_XAW)
-  #include "G4UIXaw.hh"
-#elif defined(G4UI_USE_WIN32)
-  #include "G4UIWin32.hh"
-#elif defined(G4UI_USE_QT)
-  #include "G4UIQt.hh"
+#ifdef G4UI_USE
+#include "G4UIExecutive.hh"
 #endif
 
@@ -93,35 +80,9 @@
 #endif
 
+#ifdef G4UI_USE
   // Choose (G)UI.
-  G4UIsession* session;
-#ifdef G4UI_USE_WIN32
-  session = new G4UIWin32 (hInstance,hPrevInstance,lpszCmdLine,nCmdShow);
-#else
-  if (argc >= 2) {
-  #if defined(G4UI_USE_TCSH)
-    if (strcmp (argv[1], "tcsh")==0)     session =
-      new G4UIterminal(new G4UItcsh);
-  #elif defined(G4UI_USE_WO)
-    if (strcmp (argv[1], "Wo")==0)  session = new G4UIWo (argc, argv);
-  #elif defined(G4UI_USE_XM)
-    if (strcmp (argv[1], "Xm")==0)  session = new G4UIXm (argc, argv);
-  #elif defined(G4UI_USE_XAW)
-    if (strcmp (argv[1], "Xaw")==0) session = new G4UIXaw (argc, argv);
-  #elif defined(G4UI_USE_GAG)
-    if (strcmp (argv[1], "gag")==0) session = new G4UIGAG ;
-  #elif defined(G4UI_USE_QT)
-    if (strcmp (argv[1], "Qt")==0)  session = new G4UIQt (argc, argv);
-  #else
-    session = new G4UIterminal();
-  #endif
-    else  session = new G4UIterminal();
-  }
-  else                                   
-  {
-    G4cerr << "You should define a UI in order to interact with test" << G4endl;
-    return 0;
-  }
+  G4UIExecutive* UIexecutive = new G4UIExecutive(argc, argv);
+  G4UImanager::GetUIpointer()->SetSession(UIexecutive->GetSession());  //So that Pause works..
 #endif
-  G4UImanager::GetUIpointer()->SetSession(session);  //So that Pause works..
 
   // Run manager
@@ -159,5 +120,4 @@
 
   G4UImanager* UI = G4UImanager::GetUIpointer ();
-
 #ifdef G4UI_USE_WIN32
   G4cout << "Reading win32.g4m file...." << G4endl;
@@ -173,6 +133,8 @@
        << G4endl;
 
+#ifdef G4UI_USE
   // Start an interactive session.
-  session -> SessionStart();
+  UIexecutive -> SessionStart();
+#endif
 
 #ifdef G4VIS_USE
@@ -185,6 +147,8 @@
   G4cout << "vis_test19: Run manager deleted." << G4endl;
   G4cout << "vis_test19: Deleting session..." << G4endl;
-  delete session;
+#ifdef G4UI_USE
+  delete UIexecutive;
   G4cout << "vis_test19: Session deleted." << G4endl;
+#endif
 
   return 0;
