Index: trunk/examples/extended/radioactivedecay/exrdm/GNUmakefile
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/GNUmakefile	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/GNUmakefile	(revision 1230)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.4 2006/12/21 17:52:39 flei Exp $
+# $Id: GNUmakefile,v 1.9 2008/12/05 09:57:30 flei Exp $
 # --------------------------------------------------------------
 # GNUmakefile for examples module
@@ -12,26 +12,22 @@
 endif
 
-ifdef G4ANALYSIS_USE_ROOT
-CPPFLAGS += -DG4ANALYSIS_USE_ROOT 
-CPPFLAGS += -D_REENTRANT -I$(ROOTSYS)/include
-
-EXTRALIBS += -L$(ROOTSYS)/lib \
--lCore -lCint \
--lHist -lGraf -lGraf3d -lGpad \
--lTree -lRint -lPostscript \
--lMatrix -lPhysics \
--lm -ldl -lpthread -rdynamic
-
-endif
-
-ifdef G4ANALYSIS_USE_AIDA
-   CPPFLAGS += -DG4ANALYSIS_USE_AIDA
-   CPPFLAGS += `aida-config --include`
-   LDLIBS += `aida-config --lib`
-endif
-
 .PHONY: all
 all: lib bin
 
+ifdef G4ANALYSIS_USE_ROOT
+  CPPFLAGS += -DG4ANALYSIS_USE_ROOT 
+endif
+
+include $(G4INSTALL)/config/architecture.gmk
+
+ifdef G4ANALYSIS_USE_ROOT
+  CPPFLAGS += $(shell $(ROOTSYS)/bin/root-config --cflags)
+  LDFLAGS  += $(shell $(ROOTSYS)/bin/root-config --glibs)
+endif
+
 include $(G4INSTALL)/config/binmake.gmk
 
+anaclean:
+	rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/exrdmHisto* 
+	rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/exrdmAnalysis* 
+	rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/exrdmStepping* 
Index: trunk/examples/extended/radioactivedecay/exrdm/History
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/History	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/History	(revision 1230)
@@ -1,3 +1,3 @@
-$Id: History,v 1.17 2007/11/15 16:10:09 vnivanch Exp $
+$Id: History,v 1.27 2009/09/22 16:50:06 gunter Exp $
 -------------------------------------------------------------------
 
@@ -15,4 +15,47 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+22/09/2009 G.Folger (exrdm-V09-02-00)
+-  remove trivial compilation warning when compiled without G4ANALYSIS_USE in 
+   src/src/exrdmHisto.cc
+
+05/12/2008 F.Lei (exrdm-V09-01-04)
+- exrdmAnalysisManager.cc, exrdmSteppingAction.cc
+   - better G4ANALYSIS_USE and G4ANALYSIS_USE_ROOT logic 
+- GNUMakefile
+
+04/12/2008 F.Lei (exrdm-V09-01-03)
+- exrdmHisto: delete hfileROOT in save();
+- exrdmAnalysisManager.cc, exrdmSteppingAction.cc
+   - used || login between G4ANALYSIS_USE and G4ANALYSIS_USE_ROOT
+- Updated README, macro/f24.mac
+
+04/12/2008 G.Barrand
+- exrdmAnalyisManager : dispose() : cstor, dstor private.
+- exrdmHisto : revisit the AIDA sector, mainly creation/deletion of things.
+  Now the program holds in case of multiple /run/beamOn.
+  NOTE : someone should do the same with the ROOT sector...
+  I have let a //FIXME in exrdmHisto::~exrdmHisto and ~exrdmAnalysisManager().
+- EventAction, RunAction : have some #ifdef G4VIS_USE to be able to
+  disconnect properly the G4/vis.
+
+02/12/2008 F.Lei (exrdm-V09-01-02)
+- exrdmHisto,exrdmHistoMessenger & exrdmAnalysisManager: updated the usage 
+  of AIDA analysis package.
+  
+August 10th, 2008 V.Ivanchenko (exrdm-V09-01-01)
+--------------------------------------------------
+- exdrmMatarialMessenger - fix units of density
+- exdrmPhysicsList - fix definition of cuts; simplify logic
+                     of setting of hadronic physics;
+                     remove double instantiation of radioactive decay
+- removed compillation warnings in several places
+- replace flag G4ANALYSIS_USE_AIDA by G4ANALYSIS_USE
+- remove AIDA setup from GNUmakefile (use one from central scripts)
+
+01 May 2008, Fan Lei (exrdm-V09-01-00)
+--------------------------------------------------
+- Removed "," from the Ntuple header definition
+- All energy depositions are collected, apart from that of the primary track.  
 
 November 15th, 2007 V.Ivanchenko (exrdm-V09-00-02)
Index: trunk/examples/extended/radioactivedecay/exrdm/README
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/README	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/README	(revision 1230)
@@ -7,8 +7,10 @@
                        -------------------- 
 
-  The exRDM is created to show how to use the G4RadioactiveDecay process to simulate the decays of radioactive 
-  isotopes as well as the induced radioactivity resulted from nuclear interactions. In the example a simple 
-  geometry consists of a cylindric target placed in the centre of a tube shaped detector is used. Various primary event
-  generation and tallying options are available. More documentations are available at
+  The exRDM is created to show how to use the G4RadioactiveDecay process to simulate the decays of 
+  radioactive isotopes as well as the induced radioactivity resulted from nuclear interactions. 
+
+  In this example a simple geometry consists of a cylindric target placed in the centre of a tube detector 
+  is constructed. Various primary event generation and tallying options are available. Further documentations 
+  are available at
 
 	  http://reat.space.qinetiq.com/septimess/exrdm
@@ -31,8 +33,8 @@
                   5 cm long. The default material is "Germanium".
 
-     The user can change the target/detector size and material at the at the "PreIni" state, using the commands under
+     The user can change the target/detector size and material at the at the "PreIni" state, using the 
+     commands in the directory
 		  
 		/exrdm/det
-
 
   2. PHYSICS
@@ -58,9 +60,7 @@
 	        /grdm/selectVolume Target
 
-
-
        - Hadronic processes:
 	  Hadronic processes are not invoked by default. They can be activated by the user at the "PreIni" 
- 	  state of the execution via the command
+ 	  state via the command
 
 		/exrdm/phys/SelectPhysics
@@ -72,5 +72,4 @@
 		"QGSP_BERT", "QGSP_BIC", "QGSP_HP", "LHEP_BERT", "LHEP_BERT_HP", "LHEP_BIC",
 		"LHEP_BIC_HP".
-
 
   3. EVENT:
@@ -84,6 +83,7 @@
   4. DETECTOR RESPONSE:
 
-     No Geant4 HITS and SD are defined in this example. All the relevant information of the simulation is extracted
-     at the "UserSteppingAction" stage, if the variable "G4ANALYSIS_USE" is defined. These include:
+     No Geant4 HITS and SD are defined in this example. If the variable "G4ANALYSIS_USE" is defined, all 
+     the relevant information of the simulation is collected  at the "UserSteppingAction" stage. These 
+     include:
 
        - Emission particles in the RadioactiveDecay process: 
@@ -112,32 +112,41 @@
   6. ANALYSIS:
 
-     This example implements an AIDA-compliant analysis system as well as the ROOT file format for 
-     histograms and ntuples. If the the user has an AIDA-compliant tool such as 
-     AIDAJNI, ANAPHE, or PI installed on his/her system, the analysis part of this example can 
+     This example implements an AIDA-compliant analysis system as well as the ROOT system, for accumulating 
+     and output histograms and ntuples. If the the user has an AIDA-compliant tool such as 
+     AIDAJNI, ANAPHE, OpenScientist or PI installed, the analysis part of this example can 
      be activated by 
 	
-	setenv G4ANALYSIS_USE_AIDA 1
-
-     before building the executable.  The user can also add the "root" file format option by define 
+	setenv G4ANALYSIS_USE 1
+
+     before building the executable.  
+
+     The user can also use the executable with the ROOT system, if it is available. This is done by 
       
-       setenv G4ANALYSIS_USE_RROT 1
+       setenv G4ANALYSIS_USE_ROOT 1
        
-     before the compilation.
-
-     At the completion of a simulation run a file "exrdm.root" by default is produced which contains 
-     these data structures. The user can change the name of this output file with the command
+     again before the compilation. The AIDA and ROOT systems can be used individually, or in parallel 
+     at the same time!
+
+     If no analysis system is activated, there is no output file produced apart from the screen dump. 
+     A file called "exrdm.aida" is produced by default for AIDA system and "exrdm.root" if the ROOT 
+     system is selected. 
+  
+     The user can change the name of this output file with the command
 
 	/histo/fileName new-filename
 
-     The output file by default is in "root" format and can be analysed offline using the ROOT tool, 
-     which allows the histograms and ntuples to examined, manipulated, saved and printed.
-
-     User can also change the output file format to "hbook"  or "xml" using the commands
+     The output AIDA file by default is in xml format. The AIDA system allows the use of other file format
+     such as "root" and "hbook". User can change the output format to "hbook"  or "root" using the command 
+     /histo/fileType.e.g.
 	
 	/histo/fileType hbook  
-	/histo/fileType xml
+	/histo/fileType root
      
-     The output file, in "xml" or "hbook" or "root" format, conatins the 3 ntuples (100,200,300) whose details have been 
-     described in section 4. In addition, there are 7 histograms in the file:
+     When "root" format is selected for the AIDA system, the output AIDA file name is changed to 
+     fileName_aida.root. This is to separate it from the the ROOT system output file fileName.root, in case 
+     both systems are used.
+    
+     The output file, in "aida" or "hbook" or "root" format, conatins the 3 ntuples (100,200,300) which have 
+     been described in section 4. In addition, there are 7 histograms in the file:
 
 	histogram 10: The Pulse Height Spectrum (PHS) of the target.
@@ -153,12 +162,11 @@
         /histo/setHisto
 
-     It is assumed the detector and target pulses both have an integration time of 1 micro-second, and the 
-     coincidence gate is 2 microsecond wide. The target and detctor have a threshold of 10 keV in the 
-     anti-/coincidence modes.        
+     It is assumed the detector and target pulses both have an integration time of 1 microsecond, and the 
+     gate is 2 microsecond for the coincidence spectrum. The target and detctor have a threshold of 10 keV 
+     in the anti-/coincidence modes.        
 
      Histograms 10-15 were derived from the same data stored in ntuple-300(the energy depositions), while
      Histogram 16 is obtained with data in ntuple-100 (the emission particles). The user should be able to
-     reproduce these histograms, or new histograms, with the ntuple data in an analyis tool such as JAS3. 
-        
+     reproduce these histograms, or new histograms, with the ntuple data in an off-line analyis tool.
 
   7. GETTING STARTED:
@@ -167,13 +175,13 @@
      example by 
 
-	setenv G4ANALYSIS_USE_AIDA 1
- 
-     in addition if you want to add the ROOT file format, do
+	setenv G4ANALYSIS_USE 1
+ 
+     in addition if you want to add the ROOT link to the ROOT system, do
        
         setenv G4ANALYSIS_USE_ROOT 1
 
-     otherwise make sure the G4ANALYSIS_USE_AIDA and G4ANALYSIS_USE_ROOT are not definded
- 
-	unsetenv G4ANALYSIS_USE_AIDA
+     Otherwise make sure the G4ANALYSIS_USE and G4ANALYSIS_USE_ROOT are not definded
+ 
+	unsetenv G4ANALYSIS_USE
 	unsetenv G4ANALYSIS_USE_ROOT
 	 
@@ -184,5 +192,5 @@
          gmake
 
-     gmake will create tmp and bin directories in your $G4TMP and $G4BIN directories. 
+     Depends on the setup, gmake will create tmp and bin directories in your $G4TMP and $G4BIN directories. 
      The executable, named exRDM, will be in $G4BIN/$G4SYSTEM/ directory.
 
@@ -191,14 +199,13 @@
          $G4BIN/$G4SYSTEM/exRDM exrdm.in
 
-     If all goes well, the execution shall be terminated in a few seconds. If G4ANALYSIS_USE_ROOT is 
-     defined, there will be a proton.root file in the current directory.
-
-     One can use ROOT to exam the file.
+     If all goes well, the execution shall be terminated in a few seconds. If G4ANALYSIS_USE is defined, one
+     should see a "proton.aida" file created. If G4ANALYSIS_USE_ROOT is defined, there will be 
+     a proton.root file in the same directory.
 
  8. FURTHER EXAMPLES:
 
-    There are a number of g4mac files in the ./macros subdirectory, to show the features of the G4RadioactiveDecay
-    process. Most of them will lead to the creation of an aida file in the same name of the micro file, which can 
-    be examed and analysed with an analysis tool such as ROOT.
+    There are a number of g4mac files in the ./macros subdirectory, to show the features of the 
+    G4RadioactiveDecay process. Most of them will lead to the creation of an aida file in the same name 
+    of the micro file, which can be examed and analysed with an analysis tool such as OpenScientist ,or JAS3.
  
 	vrml.mac:  to visulise the geometry and the incident of one 100 MeV Cf240 isotope and its decay. A vrml
Index: trunk/examples/extended/radioactivedecay/exrdm/exRDM.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/exRDM.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/exRDM.cc	(revision 1230)
@@ -58,5 +58,5 @@
 
   // Creation of the analysis manager
-  exrdmAnalysisManager* analysis = exrdmAnalysisManager::getInstance();
+  exrdmAnalysisManager::getInstance();
 
   // set mandatory initialization classes
@@ -116,5 +116,5 @@
   delete visManager;
 #endif
-  delete analysis;
+  exrdmAnalysisManager::dispose();
   delete runManager;
 
Index: trunk/examples/extended/radioactivedecay/exrdm/exrdm.in
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/exrdm.in	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/exrdm.in	(revision 1230)
@@ -1,3 +1,3 @@
-/control/saveHistory
+#/control/saveHistory
 /exrdm/phys/SelectPhysics QGSP_BIC_HP
 #/exrdm/phys/SelectPhysics Hadron
@@ -20,5 +20,5 @@
 /gps/energy 1 GeV
 /tracking/verbose 0
-/run/beamOn 10
+/run/beamOn 1000
 
 
Index: trunk/examples/extended/radioactivedecay/exrdm/include/exrdmAnalysisManager.hh
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/include/exrdmAnalysisManager.hh	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/include/exrdmAnalysisManager.hh	(revision 1230)
@@ -58,12 +58,12 @@
 
   static exrdmAnalysisManager* getInstance();
+  static void dispose();
 
 private:
 
   exrdmAnalysisManager();
+  ~exrdmAnalysisManager();
 
 public: // Without description
-
-  ~exrdmAnalysisManager();
 
   void bookHisto();
Index: trunk/examples/extended/radioactivedecay/exrdm/include/exrdmHisto.hh
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/include/exrdmHisto.hh	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/include/exrdmHisto.hh	(revision 1230)
@@ -39,10 +39,7 @@
 #include <vector>
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-class exrdmHistoMessenger;
-
-#ifdef G4ANALYSIS_USE_AIDA
+#ifdef G4ANALYSIS_USE
 namespace AIDA {
+ class IAnalysisFactory;
  class ITree;
  class ITuple;
@@ -51,5 +48,8 @@
 #endif
 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
 #ifdef G4ANALYSIS_USE_ROOT
+// Root classes
 class TFile;
 class TH1D;
@@ -57,4 +57,5 @@
 #endif
 
+class exrdmHistoMessenger;
 
 class exrdmHisto
@@ -92,5 +93,5 @@
   void fillTuple(G4int, G4int, G4double);
   // Fill nTuple at a given col with a double
-  void fillTuple(G4int, const G4String&, G4String);
+  void fillTuple(G4int, const G4String&, G4String&);
   // Fill nTuple parameter with a string
 
@@ -115,8 +116,8 @@
   G4int    verbose;
   G4int    defaultAct;
-
-#ifdef G4ANALYSIS_USE_AIDA
+#ifdef G4ANALYSIS_USE
   std::vector<AIDA::IHistogram1D*> histo;
   std::vector<AIDA::ITuple*>   ntup;
+  AIDA::IAnalysisFactory* aida;
   AIDA::ITree*    tree;
 #endif
Index: trunk/examples/extended/radioactivedecay/exrdm/macros/f24.mac
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/macros/f24.mac	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/macros/f24.mac	(revision 1230)
@@ -33,10 +33,10 @@
 #
 # complete chain decays
-/histo/fileName f24c.aida
+/histo/fileName f24c
 /run/beamOn 1000
 #
 # complete chain decays in VR mode
 /grdm/analogueMC 0
-/histo/fileName f24c-b.aida
+/histo/fileName f24c-b
 /run/beamOn 1000
 #
Index: trunk/examples/extended/radioactivedecay/exrdm/macros/neutron-10ev.mac
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/macros/neutron-10ev.mac	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/macros/neutron-10ev.mac	(revision 1230)
@@ -1,5 +1,4 @@
 #################################################################################
 #                                                                              	#
-
 # THIS TEST TO DEMONSTRATE THAT ISOTOPES GENERATED IN HADRONIC                  #
 # PROCESSES CAN BE TREATED BY THE RDM.					        # 
@@ -8,10 +7,12 @@
 #
 #
-/exrdm/phys/SelectPhysics Hadron
 /geometry/material/add NaI Na-I 3.67
 /exrdm/det/setTargetMate NaI
+
 # material definitions has to be done before /run/initilalize
 /histo/fileName neutron-10ev
+/exrdm/phys/SelectPhysics Hadron
 /run/initialize
+
 /run/setCutForRegion Target 10 cm
 /run/setCutForRegion Detector 50 cm
@@ -24,6 +25,2 @@
 /gps/energy 10 eV
 /run/beamOn 1000
-
-
-
-
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmAnalysisManager.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmAnalysisManager.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmAnalysisManager.cc	(revision 1230)
@@ -46,4 +46,9 @@
   return fManager;
 }
+void exrdmAnalysisManager::dispose()
+{
+  delete fManager;
+  fManager = 0;
+}
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -58,14 +63,20 @@
   pulseWidth = 1.*microsecond;
   histo   = new exrdmHisto();
-#if defined G4ANALYSIS_USE_AIDA || defined G4ANALYSIS_USE_ROOT
-   bookHisto();
+  bookHisto();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+exrdmAnalysisManager::~exrdmAnalysisManager()
+{
+#ifdef G4ANALYSIS_USE 
+#define HISTDELETE
 #endif
-}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-exrdmAnalysisManager::~exrdmAnalysisManager()
-{
-//  delete histo;
+#ifdef G4ANALYSIS_USE_ROOT
+#define HISTDELETE
+#endif
+#ifdef HISTDELETE
+  delete histo;
+#endif
 }
 
@@ -94,7 +105,7 @@
   // in aida these histos are indiced from 0-6
   //
-  histo->addTuple( "100", "Emitted Particles","float PID, Energy, Time, Weight" );
-  histo->addTuple( "200", "RadioIsotopes","float PID, Time, Weight" );
-  histo->addTuple( "300", "Energy Depositions","float Energy, Time, Weight" );
+  histo->addTuple( "1", "Emitted Particles","double PID, Energy, Time, Weight" );
+  histo->addTuple( "2", "RadioIsotopes","double PID, Time, Weight" );
+  histo->addTuple( "3", "Energy Depositions","double Energy, Time, Weight" );
 
 }
@@ -104,11 +115,6 @@
 void exrdmAnalysisManager::BeginOfRun()
 {
-#if defined G4ANALYSIS_USE_AIDA || G4ANALYSIS_USE_ROOT
   histo->book();
-#endif
-  if(verbose > 0) {
-    G4cout << "exrdmAnalysisManager: Histograms are booked and the run has been started"
-           << G4endl;
-  }
+  G4cout << "exrdmAnalysisManager: Histograms are booked and the run has been started" << G4endl;
 }
 
@@ -117,7 +123,5 @@
 void exrdmAnalysisManager::EndOfRun()
 {
-#if defined G4ANALYSIS_USE_AIDA || G4ANALYSIS_USE_ROOT
   histo->save();  
-#endif
 }
 
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmEventAction.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmEventAction.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmEventAction.cc	(revision 1230)
@@ -67,8 +67,9 @@
 void exrdmEventAction::EndOfEventAction(const G4Event* evt)
 {
-  G4int event_id       = evt->GetEventID();
   //analysis
   exrdmAnalysisManager::getInstance()->EndOfEvent();
   // visualisation
+#ifdef G4VIS_USE
+  G4int event_id       = evt->GetEventID();
   if (event_id < 100 && G4VVisManager::GetConcreteInstance()) {
     G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
@@ -85,4 +86,5 @@
     }
   }
+#endif
 }
 
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmHisto.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmHisto.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmHisto.cc	(revision 1230)
@@ -24,12 +24,5 @@
 // ********************************************************************
 //
-
-#include "exrdmHisto.hh"
-#include "exrdmHistoMessenger.hh"
-#include "G4ParticleTable.hh"
-
-#include "G4Tokenizer.hh"
-
-#ifdef G4ANALYSIS_USE_AIDA
+#ifdef G4ANALYSIS_USE
 #include <AIDA/AIDA.h>
 #endif
@@ -47,18 +40,27 @@
 #include "TNtuple.h"
 #endif
+
+#include "exrdmHisto.hh"
+#include "exrdmHistoMessenger.hh"
+#include "G4ParticleTable.hh"
+
+#include "G4Tokenizer.hh"
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 exrdmHisto::exrdmHisto()
 {
-  verbose    = 0;
+  verbose    = 1;
   histName   = "exrdm";
-  histType   = "root";
+  histType   = "aida";
+  //histType   = "root";
   nHisto     = 0;
   nTuple     = 0;
   defaultAct = 1;
   //
-#ifdef G4ANALYSIS_USE_AIDA
-  histo.clear();
-  ntup.clear();
-#endif
+#ifdef G4ANALYSIS_USE
+  aida = 0;
+  tree = 0;
+#endif
+
 #ifdef G4ANALYSIS_USE_ROOT
   ROOThisto.clear();
@@ -67,4 +69,5 @@
   Rcol.clear();
 #endif
+
   active.clear();
   bins.clear();
@@ -78,5 +81,4 @@
   tupleList.clear();
   tupleListROOT.clear();
-  messenger  = 0;
 
   messenger = new exrdmHistoMessenger(this);
@@ -87,13 +89,20 @@
 exrdmHisto::~exrdmHisto()
 {
-#ifdef G4ANALYSIS_USE_AIDA
-  for(G4int i=0; i<nHisto; i++) {
-    if(histo[i]) delete histo[i];
-  }
-#endif
-#ifdef G4ANALYSIS_USE_ROOT
-  for(G4int i=0; i<nHisto; i++) {
-    if(ROOThisto[i]) delete ROOThisto[i];
-  }
+#ifdef G4ANALYSIS_USE
+  histo.clear();
+  ntup.clear();
+#endif
+#ifdef G4ANALYSIS_USE_ROOT
+  //FIXME : G.Barrand : the below is crashy.
+  //        In principle the TH are deleted
+  //        when doing the TFile::Close !
+  //         In fact the hfileROOT should 
+  //        be deleted in save(). And I am pretty
+  //        sure that the TApplication is not needed.
+  //
+  // removed by F.Lei
+  //  for(G4int i=0; i<nHisto; i++) {
+  //   if(ROOThisto[i]) delete ROOThisto[i];
+  // }
 #endif
   delete messenger;
@@ -104,45 +113,57 @@
 void exrdmHisto::book()
 {
+#ifdef G4ANALYSIS_USE
   G4cout << "### exrdmHisto books " << nHisto << " histograms " << G4endl; 
-#ifdef G4ANALYSIS_USE_AIDA
   // Creating the analysis factory
-  AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
+  aida = AIDA_createAnalysisFactory();
+  if(!aida) {
+    G4cout << "ERROR: can't get AIDA." << G4endl; 
+    return;
+  }
   // Creating the tree factory
-  AIDA::ITreeFactory* tf = af->createTreeFactory(); 
+ {AIDA::ITreeFactory* tf = aida->createTreeFactory(); 
   // Creating a tree mapped to a new aida file.
-  G4String aidaFileName;
-  if (fileType == "hbook")
-    aidaFileName = histName +G4String(".hbook");
-  else
-    aidaFileName = histName +G4String(".aida");
-  tree = tf->create(aidaFileName,histType,false,true,"uncompress");
-  if(tree) 
-    G4cout << "Tree store  : " << tree->storeName() << G4endl;
-  else
-    G4cout << "ERROR: Tree store " << histName  << " is not created!" << G4endl;
-
+  G4String fileName = histName + "." + histType;
+  if (histType == "root") fileName = histName + "_aida." + histType;
+  tree = tf->create(fileName,histType,false,true,"compress=yes");
+  delete tf;
+  if(!tree) { 
+    G4cout << "ERROR: Tree store " << histName  << " is not created!" << G4endl; 
+    return;
+  }
+  G4cout << "Tree store  : " << tree->storeName() << G4endl;}
   // Creating a histogram factory, whose histograms will be handled by the tree
-  AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
+ {AIDA::IHistogramFactory* hf = aida->createHistogramFactory(*tree);
   // Creating an 1-dimensional histograms in the root directory of the tree
   for(G4int i=0; i<nHisto; i++) {
     if(active[i]) {
-      histo[i] = hf->createHistogram1D(ids[i], titles[i], bins[i], xmin[i], xmax[i]);
+      if(verbose>1)
+        G4cout<<"book: histogram "<< i << " id= " << ids[i] <<G4endl;
+      G4String tit = ids[i];
+      if(histType == "root") tit = "h" + ids[i];
+      histo[i] = hf->createHistogram1D(tit, titles[i], bins[i], xmin[i], xmax[i]);
     }
   }
+  delete hf;
+  G4cout << "AIDA histograms are booked" << G4endl;}
+
   // Creating a tuple factory, whose tuples will be handled by the tree  
-  AIDA::ITupleFactory* tpf =  af->createTupleFactory( *tree );
+ {AIDA::ITupleFactory* tpf =  aida->createTupleFactory( *tree );
+  G4cout << "AIDA will book " << nTuple << " ntuples" << G4endl;
   for(G4int i=0; i<nTuple; i++) {
     if(tupleList[i] != "") {
-      G4cout << "Creating Ntuple: " << tupleName[i] << G4endl;
-      ntup[i] = tpf->create(tupleId[i], tupleName[i], tupleList[i]);
+      G4cout << "Creating Ntuple: " << tupleName[i] <<":" <<tupleList[i] <<G4endl;
+      ntup[i] = tpf->create(tupleId[i], tupleName[i], tupleList[i],"");
     }
   }
-#endif
-
-#ifdef G4ANALYSIS_USE_ROOT
-  new TApplication("App", ((int *)0), ((char **)0));
+  delete tpf;
+  G4cout << "AIDA ntuples are booked" << G4endl;}
+#endif
+
+#ifdef G4ANALYSIS_USE_ROOT
+//  new TApplication("App", ((int *)0), ((char **)0));
   G4String fileNameROOT = histName + G4String(".root");
   hfileROOT = new TFile(fileNameROOT.c_str() ,"RECREATE","ROOT file for exRDM");
-  
+  G4cout << "Root file: " << fileNameROOT << G4endl;
   // Creating an 1-dimensional histograms in the root directory of the tree
   for(G4int i=0; i<nHisto; i++) {
@@ -157,6 +178,8 @@
     if(tupleListROOT[i] != "") {
       G4String id = G4String("t")+tupleId[i];
-      G4cout << "Creating Ntuple "<<tupleId[i] << " in ROOT file: " << tupleName[i] << G4endl;
+      G4cout << "Creating Ntuple "<<tupleId[i] << " in ROOT file: " 
+	     << tupleName[i] << G4endl;
       ROOTntup[i] = new TNtuple(id, tupleName[i], tupleListROOT[i]);
+      G4cout << "ROOT Ntuple " << id << " " << tupleName[i] <<" "<< tupleListROOT[i]<< " booked " << G4endl;
     }
   }
@@ -169,5 +192,5 @@
 void exrdmHisto::save()
 {
-#ifdef G4ANALYSIS_USE_AIDA
+#ifdef G4ANALYSIS_USE
   // Write histogram file
   tree->commit();
@@ -175,4 +198,10 @@
   tree->close();
   G4cout << "Histograms and Ntuples are saved" << G4endl;
+  delete tree;
+  tree = 0;
+  delete aida;
+  aida = 0;
+  {for(G4int i=0; i<nHisto; i++) histo[i] = 0;}
+  {for(G4int i=0; i<nTuple; i++) ntup[i] = 0;}
 #endif
 #ifdef G4ANALYSIS_USE_ROOT
@@ -181,4 +210,8 @@
   G4cout << "ROOT: files closing..." << G4endl;
   hfileROOT->Close();
+  //
+  // F.Lei added following Guy's suggestion!
+  delete hfileROOT;
+
 #endif
 }
@@ -205,5 +238,5 @@
   ids.push_back(id);
   titles.push_back(name);
-#ifdef G4ANALYSIS_USE_AIDA
+#ifdef G4ANALYSIS_USE
   histo.push_back(0);
 #endif
@@ -241,7 +274,7 @@
            << G4endl;   
   }
-#ifdef G4ANALYSIS_USE_AIDA  
+#ifdef G4ANALYSIS_USE
   if(i>=0 && i<nHisto) {
-    histo[i]->fill((float)(x/unit[i]), (float)w);
+    histo[i]->fill(x/unit[i], w);
   } else {
     G4cout << "exrdmHisto::fill: WARNING! wrong AIDA histogram index " << i << G4endl;
@@ -264,5 +297,5 @@
     G4cout << "Scale histogram: #" << i << " by factor " << x << G4endl;   
   }
-#ifdef G4ANALYSIS_USE_AIDA  
+#ifdef G4ANALYSIS_USE
   if(i>=0 && i<nHisto) {
     histo[i]->scale(x);
@@ -281,16 +314,25 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-void exrdmHisto::addTuple(const G4String& w1, const G4String& w2, const G4String& w3)
-{
-//  G4cout << w1 << " " << w2 << " " << w3 << G4endl;
+#ifdef G4ANALYSIS_USE
+void exrdmHisto::addTuple(const G4String& w1, const G4String& w2, const G4String& w3 )
+#else
+void exrdmHisto::addTuple(const G4String& w1, const G4String& w2, const G4String& )
+#endif
+
+{
+  //G4cout << w1 << " " << w2 << " " << w3 << G4endl;
+  nTuple++;
+  tupleId.push_back(w1);
+  tupleName.push_back(w2) ;
+#ifdef G4ANALYSIS_USE
+  tupleList.push_back(w3);
+  ntup.push_back(0);
+#endif
+
+#ifdef G4ANALYSIS_USE_ROOT
   std::vector<float> ar;
   ar.clear();
   for (size_t i = 0; i < 20; i++) ar.push_back(0.);
-  nTuple++;
-#ifdef G4ANALYSIS_USE_ROOT
   Rarray.push_back(ar);
-#endif
-  tupleId.push_back(w1);
-  tupleName.push_back(w2) ;
   // convert AIDA header to ROOT header for ntuple
   G4Tokenizer next(w3);
@@ -300,5 +342,7 @@
   while ( token != "") {
    token = next();
-   ROOTList1 = ROOTList1 + token +G4String(":");
+   if (token == ",") token = next();
+   if (token.contains(",")) token.remove(token.size()-1);
+   ROOTList1 = ROOTList1 + token + G4String(":");
    col++;
   }
@@ -306,9 +350,4 @@
 //  G4cout << ROOTList << G4endl;
   tupleListROOT.push_back(ROOTList);
-  //
-#ifdef G4ANALYSIS_USE_AIDA  
-  ntup.push_back(0);
-#endif
-#ifdef G4ANALYSIS_USE_ROOT
   ROOTntup.push_back(0);
   Rcol.push_back(col-1);
@@ -323,6 +362,6 @@
     G4cout << "fill tuple # " << i 
 	   <<" with  parameter <" << parname << "> = " << x << G4endl; 
-#ifdef G4ANALYSIS_USE_AIDA  
-  if(ntup[i]) ntup[i]->fill(ntup[i]->findColumn(parname), (float)x);
+#ifdef G4ANALYSIS_USE
+  if(ntup[i]) ntup[i]->fill(ntup[i]->findColumn(parname), x);
 #endif
 }
@@ -336,6 +375,6 @@
 	   <<" in column < " << col << "> = " << x << G4endl; 
   }
-#ifdef G4ANALYSIS_USE_AIDA  
-  if(ntup[i]) ntup[i]->fill(col, (float)x);
+#ifdef G4ANALYSIS_USE
+  if(ntup[i]) ntup[i]->fill(col,double(x));
 #endif
 
@@ -348,5 +387,5 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-void exrdmHisto::fillTuple(G4int i, const G4String& parname, G4String x)
+void exrdmHisto::fillTuple(G4int i, const G4String& parname, G4String& x)
 {
   if(verbose > 1) {
@@ -354,7 +393,8 @@
 	   <<" with  parameter <" << parname << "> = " << x << G4endl; 
   }
-#ifdef G4ANALYSIS_USE_AIDA  
+#ifdef G4ANALYSIS_USE
   if(ntup[i]) ntup[i]->fill(ntup[i]->findColumn(parname), x);
 #endif
+
 }
 
@@ -363,5 +403,6 @@
 void exrdmHisto::addRow(G4int i)
 {
-#ifdef G4ANALYSIS_USE_AIDA
+  if(verbose > 1) G4cout << "Added a raw #" << i << " to tuple" << G4endl; 
+#ifdef G4ANALYSIS_USE
   if(ntup[i]) ntup[i]->addRow();
 #endif
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmHistoMessenger.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmHistoMessenger.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmHistoMessenger.cc	(revision 1230)
@@ -49,5 +49,5 @@
 
   fileCmd = new G4UIcmdWithAString("/histo/fileType",this);
-  fileCmd->SetGuidance("set type (hbook, XML) for the histograms file");
+  fileCmd->SetGuidance("set type (aida, hbook or root) for the histograms file");
   fileCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 
 
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmMaterial.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmMaterial.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmMaterial.cc	(revision 1230)
@@ -115,5 +115,5 @@
 
   G4Material* aMaterial = 0;
-  //  G4cout << name <<" "<< formula << " " << density/(g/cm3) << " " << tem <<" " <<pres << G4endl;
+  G4cout << name <<" "<< formula << " " << density/(g/cm3) << " " << tem <<" " <<pres << G4endl;
  
   if (state == "") {
@@ -237,11 +237,11 @@
       } else {
         if (natoms>0) { 
-	  aMaterial->AddElement( G4Element::GetElement(isotopename) , natoms);
+	  aMaterial->AddElement( G4Element::GetElement(isotopename,false) , natoms);
 	} else {
-	  aMaterial->AddElement( G4Element::GetElement(isotopename) , fatoms);
+	  aMaterial->AddElement( G4Element::GetElement(isotopename,false) , fatoms);
 	}
       }      
     } else {
-      if ( G4Element::GetElement(element) == NULL) {
+      if ( G4Element::GetElement(element,false) == NULL) {
         G4Element* aElement = new G4Element(element, element, Z, A[Z-1]*g/mole);
 	if (natoms>0) { 
@@ -253,7 +253,7 @@
       } else {
 	if (natoms>0) { 
-	  aMaterial->AddElement( G4Element::GetElement(element) , natoms);
+	  aMaterial->AddElement( G4Element::GetElement(element,false) , natoms);
 	} else {
-	  aMaterial->AddElement( G4Element::GetElement(element) , fatoms);
+	  aMaterial->AddElement( G4Element::GetElement(element,false) , fatoms);
 	} 
       }
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmMaterialMessenger.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmMaterialMessenger.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmMaterialMessenger.cc	(revision 1230)
@@ -130,5 +130,5 @@
     //    G4cout<< "stat = " <<state<< "tem = " << tem<< " pre = " << pres << G4endl;
     //     tick *= G4UIcommand::ValueOf(unt);
-    materialsManager->AddMaterial(material,formula,den,state,tem,pres);
+    materialsManager->AddMaterial(material,formula,den*g/cm3,state,tem,pres);
   }
 }
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmPhysListHadron.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmPhysListHadron.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmPhysListHadron.cc	(revision 1230)
@@ -253,4 +253,5 @@
   theAlphaInelasticProcess->RegisterMe(theTheoModel);
   pManager->AddDiscreteProcess(theAlphaInelasticProcess);
+
   // GenericIon
   pManager = G4GenericIon::GenericIon()->GetProcessManager();
@@ -266,11 +267,4 @@
   theIonInelasticProcess->RegisterMe(theIonBC);
   theIonInelasticProcess->RegisterMe(theTheoModel);
-  pManager->AddDiscreteProcess(theIonInelasticProcess);
-
-  // Add RadioactiveDecay Process
-
-  G4RadioactiveDecay*  theRadioactiveDecay = new G4RadioactiveDecay();
-  G4GenericIon* ion = G4GenericIon::GenericIon();
-  pManager->AddProcess(theRadioactiveDecay, 0, -1, 3);
- 
+  pManager->AddDiscreteProcess(theIonInelasticProcess); 
 }
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmPhysicsList.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmPhysicsList.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmPhysicsList.cc	(revision 1230)
@@ -75,5 +75,5 @@
   pMessenger = new exrdmPhysicsListMessenger(this);
 
-  SetVerboseLevel(2);
+  SetVerboseLevel(1);
 
   //default physics
@@ -87,5 +87,5 @@
   
   // Had physics 
-  hadPhysicsList = new exrdmPhysListHadron("hadron");
+  hadPhysicsList = 0;
   nhadcomp = 0;
 
@@ -131,4 +131,6 @@
   }
   if (hadPhysicsList) hadPhysicsList->ConstructProcess();
+  G4cout << "### exrdmPhysicsList::ConstructProcess is done" << G4endl;
+
 }
 
@@ -141,33 +143,24 @@
   }
   // default  Had physics
-  if (name == "Hadron" && nhadcomp == 0) {
-    if (hadPhysicsList) delete hadPhysicsList;
+  if (name == "Hadron" && !hadPhysicsList) {
     hadPhysicsList = new exrdmPhysListHadron("hadron");
   } else if (name == "QGSP_BERT") {
     AddExtraBuilders(false);
     hadPhysicsList = new HadronPhysicsQGSP_BERT("std-hadron");
-  } else if (name == "QGSP_BIC" && nhadcomp == 0) {
+  } else if (name == "QGSP_BIC" && !hadPhysicsList) {
     AddExtraBuilders(false);
     hadPhysicsList = new HadronPhysicsQGSP_BIC("std-hadron");
-  } else if (name == "QGSP_BERT_HP"  && nhadcomp == 0) {
+  } else if (name == "QGSP_BERT_HP"  && !hadPhysicsList) {
     AddExtraBuilders(true);
     hadPhysicsList = new HadronPhysicsQGSP_BERT_HP("std-hadron");
-  } else if (name == "QGSP_BIC_HP"  && nhadcomp == 0) {
+  } else if (name == "QGSP_BIC_HP"  && !hadPhysicsList) {
     AddExtraBuilders(true);
     hadPhysicsList = new HadronPhysicsQGSP_BIC_HP("std-hadron");
   } else if (name == "LowEnergy_EM") {
-    if (!hadPhysicsList ||(hadPhysicsList->GetPhysicsName()=="hadron") ) { 
-      if (emPhysicsList) delete emPhysicsList;
+      delete emPhysicsList;
       emPhysicsList = new exrdmPhysListEmLowEnergy("lowe-em");
-    } else {
-      G4cout << "exrdmPhysicsList: using EM comes with Std-hadron" <<G4endl;
-    }     
   } else if (name == "Standard_EM") {
-    if (!hadPhysicsList ||(hadPhysicsList->GetPhysicsName()=="hadron") ) { 
-      if (emPhysicsList) delete emPhysicsList;
+      delete emPhysicsList;
       emPhysicsList = new G4EmStandardPhysics();
-    } else {
-      G4cout << "exrdmPhysicsList: using EM comes with Std-hadron" <<G4endl;
-    }
   } else {
       G4cout << "exrdmPhysicsList WARNING wrong or unkonwn <" 
@@ -180,13 +173,5 @@
 void exrdmPhysicsList::AddExtraBuilders(G4bool flagHP)
 {
-  if (emPhysicsList) delete emPhysicsList;
-  emPhysicsList = new G4EmStandardPhysics();
-
-  if (hadPhysicsList) {
-    delete hadPhysicsList;
-    hadPhysicsList = 0;
-  }
-  nhadcomp = 6;
-
+  nhadcomp = 5;
   hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
   hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
@@ -194,5 +179,4 @@
   hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
   hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
-  hadronPhys.push_back( new G4RadioactiveDecayPhysics("radioactiveDecay"));
   hadronPhys.push_back( new G4NeutronTrackingCut("Neutron tracking cut"));
 }
@@ -202,5 +186,4 @@
 void exrdmPhysicsList::SetCuts()
 {
-
   SetCutValue(cutForGamma, "gamma");
   SetCutValue(cutForElectron, "e-");
@@ -226,4 +209,5 @@
 {
   cutForGamma = cut;
+  SetParticleCuts(cutForGamma, G4Gamma::Gamma());
 }
 
@@ -233,4 +217,5 @@
 {
   cutForElectron = cut;
+  SetParticleCuts(cutForElectron, G4Electron::Electron());
 }
 
@@ -240,4 +225,5 @@
 {
   cutForPositron = cut;
+  SetParticleCuts(cutForPositron, G4Positron::Positron());
 }
 
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmRunAction.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmRunAction.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmRunAction.cc	(revision 1230)
@@ -58,4 +58,5 @@
     G4cout << "### Run : " << RunN << G4endl;
 
+#ifdef G4VIS_USE
   if (G4VVisManager::GetConcreteInstance())
     {
@@ -64,4 +65,5 @@
       UI->ApplyCommand("/vis/draw/current");
     } 
+#endif
 }
 
@@ -74,6 +76,8 @@
   analysis->EndOfRun();
  
+#ifdef G4VIS_USE
   if (G4VVisManager::GetConcreteInstance())
     G4UImanager::GetUIpointer()->ApplyCommand("/vis/show/view");
+#endif
 }
 
Index: trunk/examples/extended/radioactivedecay/exrdm/src/exrdmSteppingAction.cc
===================================================================
--- trunk/examples/extended/radioactivedecay/exrdm/src/exrdmSteppingAction.cc	(revision 812)
+++ trunk/examples/extended/radioactivedecay/exrdm/src/exrdmSteppingAction.cc	(revision 1230)
@@ -46,8 +46,18 @@
 void exrdmSteppingAction::UserSteppingAction(const G4Step* fStep) 
 {
-#ifdef G4ANALYSIS_USE
   G4Track* fTrack = fStep->GetTrack();
   G4int StepNo = fTrack->GetCurrentStepNumber();
   if(StepNo >= 10000) fTrack->SetTrackStatus(fStopAndKill);
+
+#ifdef G4ANALYSIS_USE 
+#define COLLECT
+#endif
+#ifdef G4ANALYSIS_USE_ROOT
+#ifndef COLLECT
+#define COLLECT
+#endif
+#endif
+
+#ifdef COLLECT
   if (StepNo == 1) {
     if ( (fTrack->GetDefinition()->GetParticleType() == "nucleus") && 
@@ -80,7 +90,7 @@
     }
   }
-  // energy deposition: collect energy deposited by decay products only
+  // energy deposition
   if (fTrack->GetTrackID() != 1 ) {
-    if (fTrack->GetCreatorProcess()->GetProcessName() == "RadioactiveDecay") {	
+    //    if (fTrack->GetCreatorProcess()->GetProcessName() == "RadioactiveDecay") {	
       if (fStep->GetTotalEnergyDeposit() ) {
 	G4double time = fStep->GetPreStepPoint()->GetGlobalTime() ;
@@ -92,7 +102,7 @@
 	exrdmAnalysisManager::getInstance()->AddEnergy(edep,weight,time);
       }
-    }
+      //    }
   }
-#endif  
+#endif 
 }
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
