Index: trunk/geant4/config/History
===================================================================
--- trunk/geant4/config/History	(revision 605)
+++ trunk/geant4/config/History	(revision 606)
@@ -1,3 +1,3 @@
-$Id: History,v 1.300 2007/08/16 09:34:51 gcosmo Exp $
+$Id: History,v 1.303 2007/11/02 15:58:08 gcosmo Exp $
 -------------------------------------------------------------------
 
@@ -17,4 +17,15 @@
      ----------------------------------------------------------
 
+2nd November 2007  Gabriele Cosmo (config-V09-00-06)
+- Introduced G4LIB_BUILD_GDML/G4LIB_USE_GDML flags to trigger compilation
+  of the new persistency/gdml sub-module. Added setup for XERCESC.
+  Required path XERCESCROOT to XERCESC installation if G4LIB_BUILD_GDML
+  is set. Added "persistency/gdml" include path to binmake.gmk
+- Added setup for QT in UI scripts, and specific QT paths and setup in
+  Darwin-g++.gmk. (L.Garnier)
+
+10th October 2007  Gunter Folger (config-V09-00-05)
+- Added "incl" (Liege cascade) hadronic model module to binmake.gmk. 
+ 
 16th August 2007  Gabriele Cosmo (config-V09-00-04)
 - Corrected definition of OUT internal variable to allow for proper
Index: trunk/geant4/config/architecture.gmk
===================================================================
--- trunk/geant4/config/architecture.gmk	(revision 605)
+++ trunk/geant4/config/architecture.gmk	(revision 606)
@@ -1,3 +1,3 @@
-# $Id: architecture.gmk,v 1.110 2007/06/28 14:16:55 gcosmo Exp $
+# $Id: architecture.gmk,v 1.112 2007/11/02 16:29:06 gcosmo Exp $
 # ------------------------------------------------------------------------
 #       GEANT 4 - Architecture configuration script for GNU Make
@@ -241,5 +241,5 @@
 # If the user does not set his/her own values, system-dependent values
 # are set below.  Most system-dependent code assumes OGLHOME is set.
-#
+
 # ------------- OpenInventor -----------------
 # The path to the installation of OpenInventor must be specified
@@ -255,4 +255,21 @@
 ifndef OIVLIBS
   OIVLIBS   := -L$(OIVHOME)/lib -lInventorXt -lInventor
+endif
+
+# ----------------- GDML ---------------------
+# Setup path to XERCESC library if GDML plugin build is specified
+#
+ifneq ($(G4LIB_BUILD_GDML),)
+  G4LIB_USE_GDML = 1
+  ifndef XERCESCROOT
+    XERCESCROOT := /usr/local/xercesc
+  endif
+  ifndef GDMLFLAGS
+    GDMLFLAGS := -DG4LIB_USE_GDML -I$(XERCESCROOT)/include
+  endif
+  ifndef GDMLLIBS
+    GDMLLIBS := -L$(XERCESCROOT)/lib -lxerces-depdom -lxerces-c
+  endif
+  CPPFLAGS  += $(GDMLFLAGS)
 endif
 
Index: trunk/geant4/config/binmake.gmk
===================================================================
--- trunk/geant4/config/binmake.gmk	(revision 605)
+++ trunk/geant4/config/binmake.gmk	(revision 606)
@@ -1,3 +1,3 @@
-# $Id: binmake.gmk,v 1.129 2007/08/16 09:46:02 gcosmo Exp $
+# $Id: binmake.gmk,v 1.133 2007/11/02 15:57:52 gcosmo Exp $
 # ----------------------------------------------------------
 # Script defining rules and paths for making binaries.
@@ -52,5 +52,4 @@
               -I$(G4BASE)/run/include \
               -I$(G4BASE)/materials/include \
-              -I$(G4BASE)/parameterisations/trd_clusters/include \
               -I$(G4BASE)/parameterisations/gflash/include \
               -I$(G4BASE)/particles/management/include \
@@ -102,4 +101,5 @@
               -I$(G4BASE)/processes/hadronic/models/high_energy/include \
               -I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
+              -I$(G4BASE)/processes/hadronic/models/incl/include \
               -I$(G4BASE)/processes/hadronic/models/inucl/include \
               -I$(G4BASE)/processes/hadronic/models/isotope_production/include \
@@ -143,5 +143,6 @@
               -I$(G4BASE)/digits_hits/scorer/include \
               -I$(G4BASE)/digits_hits/utils/include \
-              -I$(G4BASE)/persistency/include \
+              -I$(G4BASE)/persistency/gdml/include \
+              -I$(G4BASE)/persistency/mctruth/include \
               -I$(G4BASE)/readout/include \
               -I$(G4BASE)/event/include \
@@ -260,4 +261,7 @@
 # LDLIBS3 contains the first set of low level libraries...
 #
+ifdef G4LIB_BUILD_GDML
+  LDLIBS3 += $(GDMLLIBS)
+endif
 LDLIBS3 += $(INTYLIBS)
 LDLIBS3 += $(ANALYSISLIBS)
Index: trunk/geant4/config/scripts/env.csh.SH
===================================================================
--- trunk/geant4/config/scripts/env.csh.SH	(revision 605)
+++ trunk/geant4/config/scripts/env.csh.SH	(revision 606)
@@ -40,4 +40,5 @@
 unsetenv  G4NEUTRONHPDATA
 unsetenv  G4RADIOACTIVEDATA
+unsetenv  G4ABLADATA
 
 unsetenv  G4LIB
@@ -46,4 +47,5 @@
 unsetenv  G4LIB_BUILD_STATIC
 unsetenv  G4LIB_BUILD_ZLIB
+unsetenv  G4LIB_BUILD_GDML
 unsetenv  G4LIB_USE_G3TOG4
 unsetenv  G4LIB_USE_GRANULAR
@@ -146,4 +148,11 @@
 
 #+
+if ( X$g4abladata != X ) then
+setenv G4ABLADATA "$g4abladata"
+echo "On this machine the G4ABLADATA=\$G4ABLADATA"
+endif
+
+
+#+
 #if ( X$g4elasticdata != X ) then
 #setenv G4ELASTICDATA "$g4elasticdata"
@@ -380,4 +389,23 @@
 echo "On this machine the XAWLIBS=\$XAWLIBS"
 endif 
+
+
+
+#
+# Use GDML module
+#
+#+
+if ( X$g4lib_build_gdml == Xy ) then
+setenv G4LIB_BUILD_GDML 1
+echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
+endif 
+
+if ( X$g4lib_build_gdml == Xy ) then
+setenv XERCESCROOT "$g4gdml_xercesc_root"
+echo "On this machine the XERCESCROOT=\$XERCESCROOT"
+endif
+
+
+
 
 #
@@ -489,7 +517,17 @@
 setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
 setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if ( ${?G4LIB_BUILD_GDML} ) then
+   setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XERCESCROOT}/lib
+endif
+
 else
 setenv LD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM}
 setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if ( ${?G4LIB_BUILD_GDML} ) then
+   setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XERCESCROOT}/lib
+endif
+
 endif
 endif
@@ -504,7 +542,17 @@
 setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
 setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if ( ${?G4LIB_BUILD_GDML} ) then
+   setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib
+endif
+
 else
 setenv DYLD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM}
 setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if ( ${?G4LIB_BUILD_GDML} ) then
+   setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib
+endif
+
 endif
 endif
Index: trunk/geant4/config/scripts/env.sh.SH
===================================================================
--- trunk/geant4/config/scripts/env.sh.SH	(revision 605)
+++ trunk/geant4/config/scripts/env.sh.SH	(revision 606)
@@ -40,4 +40,5 @@
 unset  G4NEUTRONHPDATA
 unset  G4RADIOACTIVEDATA
+unset  G4ABLADATA
 
 unset  G4LIB
@@ -46,4 +47,5 @@
 unset  G4LIB_BUILD_STATIC
 unset  G4LIB_BUILD_ZLIB
+unset  G4LIB_BUILD_GDML
 unset  G4LIB_USE_G3TOG4
 unset  G4LIB_USE_GRANULAR
@@ -172,4 +174,16 @@
 
 #+
+if [ X$g4abladata != X ] ; then 
+G4ABLADATA="$g4abladata"
+export G4ABLADATA
+if [ X\$g4non_display = X ] ; then
+echo "On this machine the G4ABLADATA=\$G4ABLADATA"
+fi
+fi
+
+
+
+
+#+
 #if [ X$g4elasticdata != X ] ; then 
 #G4ELASTICDATA="$g4elasticdata"
@@ -517,4 +531,23 @@
 fi
 fi 
+
+
+#
+# Use GDML module
+#
+#+
+if [ X$g4lib_build_gdml = Xy ] ; then
+G4LIB_BUILD_GDML=1
+export G4LIB_BUILD_GDML
+echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
+fi 
+
+if [ X$g4lib_build_gdml = Xy ] ; then
+XERCESCROOT=$g4gdml_xercesc_root
+export XERCESCROOT
+echo "On this machine the XERCESCROOT=\$XERCESCROOT"
+fi 
+
+
 
 #
@@ -670,8 +703,18 @@
 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if [ $G4LIB_BUILD_GDML ] ; then
+   LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XERCESCROOT}/lib
+fi
 export LD_LIBRARY_PATH
+
 else
 LD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM}
 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if [ $G4LIB_BUILD_GDML ] ; then
+   LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XERCESCROOT}/lib
+fi
+
 export LD_LIBRARY_PATH
 fi
@@ -687,8 +730,18 @@
 DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
 DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if [ $G4LIB_BUILD_GDML ] ; then
+   DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib
+fi
+
 export DYLD_LIBRARY_PATH
 else
 DYLD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM}
 DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib
+
+if [ $G4LIB_BUILD_GDML ] ; then
+   DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib
+fi
+
 export DYLD_LIBRARY_PATH
 fi
Index: trunk/geant4/config/scripts/install.sh.SH
===================================================================
--- trunk/geant4/config/scripts/install.sh.SH	(revision 605)
+++ trunk/geant4/config/scripts/install.sh.SH	(revision 606)
@@ -40,4 +40,5 @@
 unset  G4NEUTRONHPDATA
 unset  G4RADIOACTIVEDATA
+unset  G4ABLADATA
 
 unset  G4LIB
@@ -46,4 +47,5 @@
 unset  G4LIB_BUILD_STATIC
 unset  G4LIB_BUILD_ZLIB
+unset  G4LIB_BUILD_GDML
 unset  G4LIB_USE_G3TOG4
 unset  G4LIB_USE_GRANULAR
@@ -151,4 +153,14 @@
 
 #+
+if [ X$g4abladata != X ] ; then 
+G4ABLADATA="$g4abladata"
+export G4ABLADATA
+echo "On this machine the G4ABLADATA=\$G4ABLADATA"
+fi
+
+
+
+
+#+
 #if [ X$g4elasticdata != X ] ; then 
 #G4ELASTICDATA="$g4elasticdata"
@@ -442,4 +454,22 @@
 fi
 fi 
+
+
+#
+# Use GDML module
+#
+#+
+if [ X$g4lib_build_gdml = Xy ] ; then
+G4LIB_BUILD_GDML=1
+export G4LIB_BUILD_GDML
+echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
+fi 
+
+if [ X$g4lib_build_gdml = Xy ] ; then
+XERCESCROOT=$g4gdml_xercesc_root
+export XERCESCROOT
+echo "On this machine the XERCESCROOT=\$XERCESCROOT"
+fi 
+
 
 #
Index: trunk/geant4/config/scripts/move.sh.SH
===================================================================
--- trunk/geant4/config/scripts/move.sh.SH	(revision 605)
+++ trunk/geant4/config/scripts/move.sh.SH	(revision 606)
@@ -96,4 +96,13 @@
 
 #+
+if [ X$g4abladata != X ] ; then 
+G4ABLADATA="$g4abladata"
+export G4ABLADATA
+echo "On this machine the G4ABLADATA=\$G4ABLADATA"
+fi
+
+
+
+#+
 #if [ X$g4elasticdata != X ] ; then 
 #G4ELASTICDATA="$g4elasticdata"
@@ -305,4 +314,23 @@
 fi 
 
+
+#
+# Use GDML module
+#
+#+
+if [ X$g4lib_build_gdml = Xy ] ; then
+G4LIB_BUILD_GDML=1
+export G4LIB_BUILD_GDML
+echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
+fi 
+
+if [ X$g4lib_build_gdml = Xy ] ; then
+XERCESCROOT=$g4gdml_xercesc_root
+export XERCESCROOT
+echo "On this machine the XERCESCROOT=\$XERCESCROOT"
+fi 
+
+
+
 #
 # Use G3TOG4 module
Index: trunk/geant4/config/sys/Darwin-g++.gmk
===================================================================
--- trunk/geant4/config/sys/Darwin-g++.gmk	(revision 605)
+++ trunk/geant4/config/sys/Darwin-g++.gmk	(revision 606)
@@ -51,15 +51,12 @@
   endif
   ifndef QTFLAGS
-    QTFLAGS   := -I$(QTHOME)/include
-    QTFLAGS   += -I$(QTHOME)/lib/QtCore.framework/Versions/Current/Headers
-    QTFLAFS   += -I$(QTHOME)/lib/QtGui.framework/Versions/Current/Headers
-    QTFLAGS   += -I$(QTHOME)/lib/QtOpenGL.framework/Versions/Current/Headers
-    QTFLAGS   += -I$(QTHOME)/lib/QtSql.framework/Versions/Current/Headers
-    QTFLAGS   += -I$(QTHOME)/lib/QtXml.framework/Versions/Current/Headers
+    QTFLAGS   := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
     MOC       := $(QTHOME)/bin/moc
   endif
   ifndef QTLIBS
-    QTLIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
-    QTLIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
+    QT3LIBS    := -L$(QTHOME)/lib -lqt-mt -lqui
+    QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
+    QT4LIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
+    QTLIBS     := $(shell test -f $(QTHOME)/lib/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
   endif
   ifndef XAWFLAGS
Index: trunk/geant4/config/sys/Linux-g++.gmk
===================================================================
--- trunk/geant4/config/sys/Linux-g++.gmk	(revision 605)
+++ trunk/geant4/config/sys/Linux-g++.gmk	(revision 606)
@@ -55,4 +55,17 @@
     XMLIBS    := -lXm -lXpm
   endif
+  ifndef QTHOME
+    QTHOME  := /usr/local/Qt
+  endif
+  ifndef QTFLAGS
+    QTFLAGS   := -I$(QTHOME)/include/Qt
+    QTFLAGS   += -I$(QTHOME)/include
+    MOC       := $(QTHOME)/bin/moc
+  endif
+  ifndef QTLIBS
+    QT3LIBS    := -L$(QTHOME)/lib -lqt-mt
+    QT4LIBS    := -L$(QTHOME)/lib -lQtCore -lQtGui -lQtOpenGL -lQtSql -lQtXml
+    QTLIBS     := $(shell test -f $(QTHOME)/lib/libQt3Support.so && echo $(QT4LIBS) || echo $(QT3LIBS))
+  endif
   ifndef XAWFLAGS
     XAWFLAGS   := -I/usr/X11R6/include
Index: trunk/geant4/interfaces/.gdb_history
===================================================================
--- trunk/geant4/interfaces/.gdb_history	(revision 605)
+++ trunk/geant4/interfaces/.gdb_history	(revision 606)
@@ -1,4 +1,3 @@
 run
 where
-exit
 quit
Index: trunk/geant4/interfaces/basic/include/G4UIQt.hh
===================================================================
--- trunk/geant4/interfaces/basic/include/G4UIQt.hh	(revision 605)
+++ trunk/geant4/interfaces/basic/include/G4UIQt.hh	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4UIQt.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
+// $Id: G4UIQt.hh,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -148,5 +148,9 @@
   void ButtonCallback(const QString&);
   void HelpTreeClicCallback();
+#if QT_VERSION < 0x040000
+  void HelpTreeDoubleClicCallback( QListViewItem*, int);
+#else
   void HelpTreeDoubleClicCallback( QTreeWidgetItem*, int);
+#endif
   void ShowHelpCallback();
   void CommandHistoryCallback();
Index: trunk/geant4/interfaces/basic/src/G4UIQt.cc
===================================================================
--- trunk/geant4/interfaces/basic/src/G4UIQt.cc	(revision 605)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'G4UIQt.hh'
-**
-** Created: Mon Oct 1 10:59:35 2007
-**      by: The Qt Meta Object Compiler version 59 (Qt 4.2.2)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#if QT_VERSION >= 0x040202
-
-#ifdef G4UI_BUILD_QT_SESSION
-
-#include "../include/G4UIQt.hh"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'G4UIQt.hh' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 59
-#error "This file was generated using the moc from 4.2.2. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-static const uint qt_meta_data_G4UIQt[] = {
-
- // content:
-       1,       // revision
-       0,       // classname
-       0,    0, // classinfo
-       8,   10, // methods
-       0,    0, // properties
-       0,    0, // enums/sets
-
- // signals: signature, parameters, type, tag, flags
-       7,   26,   31,   31, 0x05,
-
- // slots: signature, parameters, type, tag, flags
-      32,   31,   31,   31, 0x08,
-      54,   31,   31,   31, 0x08,
-      79,   31,   31,   31, 0x08,
-     103,   31,   31,   31, 0x08,
-     126,  175,   31,   31, 0x08,
-     177,   31,   31,   31, 0x08,
-     196,   31,   31,   31, 0x08,
-
-       0        // eod
-};
-
-static const char qt_meta_stringdata_G4UIQt[] = {
-    "G4UIQt\0myClicked(QString)\0text\0\0"
-    "ClearButtonCallback()\0CommandEnteredCallback()\0"
-    "ButtonCallback(QString)\0HelpTreeClicCallback()\0"
-    "HelpTreeDoubleClicCallback(QTreeWidgetItem*,int)\0"
-    ",\0ShowHelpCallback()\0CommandHistoryCallback()\0"
-};
-
-const QMetaObject G4UIQt::staticMetaObject = {
-    { &QObject::staticMetaObject, qt_meta_stringdata_G4UIQt,
-      qt_meta_data_G4UIQt, 0 }
-};
-
-const QMetaObject *G4UIQt::metaObject() const
-{
-    return &staticMetaObject;
-}
-
-void *G4UIQt::qt_metacast(const char *_clname)
-{
-    if (!_clname) return 0;
-    if (!strcmp(_clname, qt_meta_stringdata_G4UIQt))
-	return static_cast<void*>(const_cast<G4UIQt*>(this));
-    if (!strcmp(_clname, "G4VBasicShell"))
-	return static_cast<G4VBasicShell*>(const_cast<G4UIQt*>(this));
-    if (!strcmp(_clname, "G4VInteractiveSession"))
-	return static_cast<G4VInteractiveSession*>(const_cast<G4UIQt*>(this));
-    return QObject::qt_metacast(_clname);
-}
-
-int G4UIQt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
-    _id = QObject::qt_metacall(_c, _id, _a);
-    if (_id < 0)
-        return _id;
-    if (_c == QMetaObject::InvokeMetaMethod) {
-        switch (_id) {
-        case 0: myClicked((*reinterpret_cast< const QString(*)>(_a[1]))); break;
-        case 1: ClearButtonCallback(); break;
-        case 2: CommandEnteredCallback(); break;
-        case 3: ButtonCallback((*reinterpret_cast< const QString(*)>(_a[1]))); break;
-        case 4: HelpTreeClicCallback(); break;
-        case 5: HelpTreeDoubleClicCallback((*reinterpret_cast< QTreeWidgetItem*(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
-        case 6: ShowHelpCallback(); break;
-        case 7: CommandHistoryCallback(); break;
-        }
-        _id -= 8;
-    }
-    return _id;
-}
-
-// SIGNAL 0
-void G4UIQt::myClicked(const QString & _t1)
-{
-    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
-    QMetaObject::activate(this, &staticMetaObject, 0, _a);
-}
-
-#endif
-
-#endif
Index: trunk/geant4/interfaces/basic/src/G4UIQt_moc.cc
===================================================================
--- trunk/geant4/interfaces/basic/src/G4UIQt_moc.cc	(revision 605)
+++ trunk/geant4/interfaces/basic/src/G4UIQt_moc.cc	(revision 606)
@@ -1,2 +1,163 @@
+/****************************************************************************
+** G4UIQt meta object code from reading C++ file 'G4UIQt.hh'
+**
+** Created: Tue Nov 13 18:13:09 2007
+**      by: The Qt MOC ($Id: G4UIQt_moc.cc,v 1.6 2007/11/14 10:38:49 lgarnier Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#ifdef G4UI_BUILD_QT_SESSION
+
+#undef QT_NO_COMPAT
+#include "../include/G4UIQt.hh"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#if QT_VERSION < 0x040000
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.5. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *G4UIQt::className() const
+{
+    return "G4UIQt";
+}
+
+QMetaObject *G4UIQt::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_G4UIQt( "G4UIQt", &G4UIQt::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString G4UIQt::tr( const char *s, const char *c )
+{
+    if ( qApp )
+	return qApp->translate( "G4UIQt", s, c, QApplication::DefaultCodec );
+    else
+	return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString G4UIQt::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+	return qApp->translate( "G4UIQt", s, c, QApplication::UnicodeUTF8 );
+    else
+	return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* G4UIQt::staticMetaObject()
+{
+    if ( metaObj )
+	return metaObj;
+    QMetaObject* parentObject = QObject::staticMetaObject();
+    static const QUMethod slot_0 = {"ClearButtonCallback", 0, 0 };
+    static const QUMethod slot_1 = {"CommandEnteredCallback", 0, 0 };
+    static const QUParameter param_slot_2[] = {
+	{ 0, &static_QUType_QString, 0, QUParameter::In }
+    };
+    static const QUMethod slot_2 = {"ButtonCallback", 1, param_slot_2 };
+    static const QUMethod slot_3 = {"HelpTreeClicCallback", 0, 0 };
+    static const QUParameter param_slot_4[] = {
+	{ 0, &static_QUType_ptr, "QTreeWidgetItem", QUParameter::In },
+	{ 0, &static_QUType_int, 0, QUParameter::In }
+    };
+    static const QUMethod slot_4 = {"HelpTreeDoubleClicCallback", 2, param_slot_4 };
+    static const QUMethod slot_5 = {"ShowHelpCallback", 0, 0 };
+    static const QUMethod slot_6 = {"CommandHistoryCallback", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+	{ "ClearButtonCallback()", &slot_0, QMetaData::Private },
+	{ "CommandEnteredCallback()", &slot_1, QMetaData::Private },
+	{ "ButtonCallback(const QString&)", &slot_2, QMetaData::Private },
+	{ "HelpTreeClicCallback()", &slot_3, QMetaData::Private },
+	{ "HelpTreeDoubleClicCallback(QTreeWidgetItem*,int)", &slot_4, QMetaData::Private },
+	{ "ShowHelpCallback()", &slot_5, QMetaData::Private },
+	{ "CommandHistoryCallback()", &slot_6, QMetaData::Private }
+    };
+    static const QUParameter param_signal_0[] = {
+	{ "text", &static_QUType_QString, 0, QUParameter::In }
+    };
+    static const QUMethod signal_0 = {"myClicked", 1, param_signal_0 };
+    static const QMetaData signal_tbl[] = {
+	{ "myClicked(const QString&)", &signal_0, QMetaData::Private }
+    };
+    metaObj = QMetaObject::new_metaobject(
+	"G4UIQt", parentObject,
+	slot_tbl, 7,
+	signal_tbl, 1,
+#ifndef QT_NO_PROPERTIES
+	0, 0,
+	0, 0,
+#endif // QT_NO_PROPERTIES
+	0, 0 );
+    cleanUp_G4UIQt.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* G4UIQt::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "G4UIQt" ) )
+	return this;
+    if ( !qstrcmp( clname, "G4VBasicShell" ) )
+	return (G4VBasicShell*)this;
+    if ( !qstrcmp( clname, "G4VInteractiveSession" ) )
+	return (G4VInteractiveSession*)this;
+    return QObject::qt_cast( clname );
+}
+
+// SIGNAL myClicked
+void G4UIQt::myClicked( const QString& t0 )
+{
+    activate_signal( staticMetaObject()->signalOffset() + 0, t0 );
+}
+
+bool G4UIQt::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: ClearButtonCallback(); break;
+    case 1: CommandEnteredCallback(); break;
+    case 2: ButtonCallback((const QString&)static_QUType_QString.get(_o+1)); break;
+    case 3: HelpTreeClicCallback(); break;
+#if QT_VERSION < 0x040000
+    case 4: HelpTreeDoubleClicCallback((QListViewItem*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
+#else
+    case 4: HelpTreeDoubleClicCallback((QTreeWidgetItem*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
+#endif
+    case 5: ShowHelpCallback(); break;
+    case 6: CommandHistoryCallback(); break;
+    default:
+	return QObject::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool G4UIQt::qt_emit( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->signalOffset() ) {
+    case 0: myClicked((const QString&)static_QUType_QString.get(_o+1)); break;
+    default:
+	return QObject::qt_emit(_id,_o);
+    }
+    return TRUE;
+}
+#ifndef QT_NO_PROPERTIES
+
+bool G4UIQt::qt_property( int id, int f, QVariant* v)
+{
+    return QObject::qt_property( id, f, v);
+}
+
+bool G4UIQt::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
+
+#endif
+#endif
+
+
 /****************************************************************************
 ** Meta object code from reading C++ file 'G4UIQt.hh'
@@ -7,4 +168,6 @@
 ** WARNING! All changes made in this file will be lost!
 *****************************************************************************/
+
+#if QT_VERSION >= 0x040000
 
 #ifdef G4UI_BUILD_QT_SESSION
@@ -103,2 +266,4 @@
 
 #endif
+
+#endif
Index: trunk/geant4/interfaces/common/src/G4Qt.cc
===================================================================
--- trunk/geant4/interfaces/common/src/G4Qt.cc	(revision 605)
+++ trunk/geant4/interfaces/common/src/G4Qt.cc	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4Qt.cc,v 1.4 2007/11/09 15:03:21 lgarnier Exp $
+// $Id: G4Qt.cc,v 1.5 2007/11/15 10:10:02 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -91,14 +91,24 @@
   if(QtInited==FALSE) {  //Qt should be Inited once !
     printf("G4Qt::G4Qt inited Qt\n");
-
+#if QT_VERSION < 0x040000
+    qApp = new QApplication (a_argn, a_args);
+    //    QApplication qApp(a_argn, a_args);
+#else
     new QApplication (a_argn, a_args);
+#endif
 
     if(qApp==NULL) {
       G4cout        << "G4Qt : Unable to init Qt." << G4endl;
+    } else {
+      QtInited  = TRUE;
+      SetMainInteractor (qApp);
+      SetArguments      (a_argn,a_args);
+      printf("G4Qt::G4Qt inited Qt END\n");
     }
-    QtInited  = TRUE;
-    SetMainInteractor (qApp);
   }
-  SetArguments      (a_argn,a_args);
+  if (qApp)
+    printf("G4Qt::qApp exist\n");
+  else
+    printf("G4Qt::qApp not exist\n");
   //  AddDispatcher     ((G4DispatchFunction)XtDispatchEvent);
 }
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 605)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
+// $Id: G4OpenGLQtViewer.hh,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLViewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLViewer.hh	(revision 605)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLViewer.hh	(revision 606)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLViewer.hh,v 1.20 2007/05/08 11:04:11 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4OpenGLViewer.hh,v 1.21 2007/11/10 14:50:01 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -48,4 +48,5 @@
   friend class G4OpenGLImmediateSceneHandler;
   friend class G4OpenGLStoredSceneHandler;
+  friend class G4OpenGLFileSceneHandler;
   friend class G4OpenGLViewerMessenger;
 
@@ -79,4 +80,5 @@
   G4OpenGLSceneHandler& fOpenGLSceneHandler;
   G4Colour background;      //the OpenGL clear colour
+  unsigned int WinSize_x, WinSize_y;
   G4bool
     transparency_enabled,   //is alpha blending enabled?
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLWin32Viewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLWin32Viewer.hh	(revision 605)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLWin32Viewer.hh	(revision 606)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLWin32Viewer.hh,v 1.13 2006/06/29 21:18:20 gunter Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4OpenGLWin32Viewer.hh,v 1.14 2007/11/10 14:50:01 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -55,7 +55,4 @@
   void CreateGLWin32Context ();
   virtual void CreateMainWindow ();
-protected:
-  G4int WinSize_x;
-  G4int WinSize_y;
   HDC fHDC;
 private:
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLXViewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLXViewer.hh	(revision 605)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLXViewer.hh	(revision 606)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLXViewer.hh,v 1.27 2007/05/08 11:04:11 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4OpenGLXViewer.hh,v 1.28 2007/11/10 14:50:01 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -105,6 +105,4 @@
   Pixmap                            icon_pixmap;
   XSizeHints                        *size_hints;
-  unsigned int                      WinSize_x,
-                                    WinSize_y;
   Atom                              Xatom;
   XTextProperty                     windowName,
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc	(revision 605)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLImmediateQtViewer.cc,v 1.1 2007/09/28 14:44:13 lgarnier Exp $
+// $Id: G4OpenGLImmediateQtViewer.cc,v 1.2 2007/11/13 17:48:51 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 605)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtExportDialog.cc,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
+// $Id: G4OpenGLQtExportDialog.cc,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 605)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtViewer.cc,v 1.4 2007/11/09 15:03:22 lgarnier Exp $
+// $Id: G4OpenGLQtViewer.cc,v 1.6 2007/11/14 11:49:00 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -1344,9 +1344,15 @@
 
   if (aFilename.endsWith(".ps")) {
+#if QT_VERSION > 0x040200
     printer.setOutputFormat(QPrinter::PostScriptFormat);
-  } else {
+#endif
+  } else {
+#if QT_VERSION > 0x040100
     printer.setOutputFormat(QPrinter::PdfFormat);
-  }
+#endif
+  }
+#if QT_VERSION > 0x040100
   printer.setOutputFileName(aFilename);
+#endif
   //  printer.setFullPage ( true);
   QPainter paint(&printer);
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 605)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 606)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLStoredQtViewer.cc,v 1.3 2007/11/09 15:03:22 lgarnier Exp $
+// $Id: G4OpenGLStoredQtViewer.cc,v 1.5 2007/11/14 18:58:59 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -256,5 +256,10 @@
 void G4OpenGLStoredQtViewer::mouseMoveEvent(QMouseEvent *event)
 {
+  printf("G4OpenGLStoredQtViewer::mouseMoveEvent\n");
+#if QT_VERSION < 0x040000
   G4MouseMoveEvent(event->x(),event->y(),event->button());
+#else
+  G4MouseMoveEvent(event->x(),event->y(),event->buttons());
+#endif
   //  DrawView();
 }
Index: trunk/geant4/visualization/management/src/G4VisCommandsScene.cc
===================================================================
--- trunk/geant4/visualization/management/src/G4VisCommandsScene.cc	(revision 605)
+++ trunk/geant4/visualization/management/src/G4VisCommandsScene.cc	(revision 606)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VisCommandsScene.cc,v 1.66 2007/05/25 10:49:55 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4VisCommandsScene.cc,v 1.67 2007/11/10 15:03:56 allison Exp $
+// GEANT4 tag $Name:  $
 
 // /vis/scene commands - John Allison  9th August 1998
@@ -34,4 +34,6 @@
 #include "G4VisManager.hh"
 #include "G4TransportationManager.hh"
+#include "G4RunManager.hh"
+#include "G4Run.hh"
 #include "G4PhysicalVolumeModel.hh"
 #include "G4ApplicationState.hh"
@@ -202,4 +204,16 @@
   fpVisManager->ResetTransientsDrawnFlags();
 
+  // Are there any events currently kept...
+  size_t nCurrentlyKept = 0;
+  G4RunManager* runManager = G4RunManager::GetRunManager();
+  if (runManager) {
+    const G4Run* currentRun = runManager->GetCurrentRun();
+    if (currentRun) {
+      const std::vector<const G4Event*>* events =
+	currentRun->GetEventVector();
+      if (events) nCurrentlyKept = events->size();
+    }
+  }
+
   if (verbosity >= G4VisManager::confirmations) {
     G4cout << "End of event action set to ";
@@ -211,20 +225,27 @@
 	     << " (unlimited if negative)."
 	"\n  This may be changed with, e.g., "
-	"\"/vis/scene/endOfEventAction accumulate 100\"."
-	     << G4endl;
-    }
-  }
+	"\"/vis/scene/endOfEventAction accumulate 1000\".";
+    }
+    G4cout << G4endl;
+  }
+
   if (!pScene->GetRefreshAtEndOfEvent() &&
       maxNumberOfKeptEvents != 0 &&
       verbosity >= G4VisManager::warnings) {
-    G4cout << "WARNING: The vis manager will keep ";
-    if (maxNumberOfKeptEvents < 0) G4cout << "an unlimited number of";
-    else G4cout << "up to " << maxNumberOfKeptEvents;
-    G4cout << " events.";
-    if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
-      G4cout << "\n  This may use a lot of memory.";
+    G4cout << "WARNING: ";
+    if (nCurrentlyKept) {
+      G4cout <<
+	"\n  There are currently " << nCurrentlyKept
+	     << " events kept for refreshing and/or reviewing.";
+    } else {
+      G4cout << "The vis manager will keep ";
+      if (maxNumberOfKeptEvents < 0) G4cout << "an unlimited number of";
+      else G4cout << "up to " << maxNumberOfKeptEvents;
+      G4cout << " events.";
+      if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
+	G4cout << "\n  This may use a lot of memory.";
+    }
     G4cout << G4endl;
   }
-  UpdateVisManagerScene (pScene->GetName());
 }
 
@@ -316,5 +337,4 @@
     G4cout << "\"" << G4endl;
   }
-  UpdateVisManagerScene (pScene->GetName());
 }
 
Index: trunk/geant4/visualization/management/src/G4VisManager.cc
===================================================================
--- trunk/geant4/visualization/management/src/G4VisManager.cc	(revision 605)
+++ trunk/geant4/visualization/management/src/G4VisManager.cc	(revision 606)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4VisManager.cc,v 1.113 2007/05/25 10:50:26 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4VisManager.cc,v 1.114 2007/11/10 14:59:46 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -1244,10 +1244,10 @@
       G4cout <<
 	"  Only useful if before starting the run:"
-	"\n    a) trajectories are stored (\"/tracking/storeTrajectory N\"), or"
+	"\n    a) trajectories are stored (\"/vis/scene/add/trajectories [smooth|rich]\"), or"
 	"\n    b) the Draw method of any hits is implemented."
 	"\n  To view trajectories and hits:"
 	"\n    open a viewer, draw a volume, \"/vis/scene/add/trajectories\""
 	"\n    \"/vis/scene/add/hits\" and, possibly, \"/vis/viewer/flush\"."
-	"\n  To see all events: \"vis/scene/endOfEventAction accumulate\"."
+	"\n  To see all events: \"/vis/scene/endOfEventAction accumulate\"."
 	"\n  To see events individually: \"/vis/reviewKeptEvents\"."
 	     << G4endl;
