Index: /snovis/trunk/applications/Environment.h
===================================================================
--- /snovis/trunk/applications/Environment.h	(revision 100)
+++ /snovis/trunk/applications/Environment.h	(revision 100)
@@ -0,0 +1,44 @@
+#ifndef snovis_Environment_h
+#define snovis_Environment_h
+
+#include <Lib/main.h>
+
+#include <Lib/Printer.h>
+#include <Lib/System.h>
+
+//////////////////////////////////////////////////////////////////////////////
+inline bool check_envs(
+ const std::string& aArg0
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  if(!Lib::main::checkPackEnv(aArg0,"OnXLab")) return false;
+  if(!Lib::main::checkPackEnv(aArg0,"G4Lab")) return false;
+  if(!Lib::main::checkPackEnv(aArg0,"snovis")) return false;
+
+  Lib::Printer printer;
+  std::string fs = Lib::System::fileSeparator();
+  std::string dir = "Resources"+fs+"Geant4"+fs+"data"+fs;
+
+ {std::string to = dir+"G4NDL";
+  if(!Lib::main::checkEnv(aArg0,"NeutronHPCrossSections",to,
+                          printer,true)) return false;}
+
+ {std::string to = dir+"PhotonEvaporation";
+  if(!Lib::main::checkEnv(aArg0,"G4LEVELGAMMADATA",to,
+                          printer,true)) return false;}
+
+ {std::string to = dir+"RadioactiveDecay";
+  if(!Lib::main::checkEnv(aArg0,"G4RADIOACTIVEDATA",to,
+                          printer,true)) return false;}
+
+ {std::string to = dir+"G4EMLOW";
+  if(!Lib::main::checkEnv(aArg0,"G4LEDATA",to,
+                          printer,true)) return false;}
+
+
+  return true;
+}
+
+#endif
Index: /snovis/trunk/applications/prog_snova.cc
===================================================================
--- /snovis/trunk/applications/prog_snova.cc	(revision 100)
+++ /snovis/trunk/applications/prog_snova.cc	(revision 100)
@@ -0,0 +1,273 @@
+// -*- mode: C++; -*-
+/* prog_snova.cc
+ * SuperNEMO module G4 based simulation program
+ */
+
+#include <string>
+
+#include <snova/snova_const.hh>
+#include <snova/geometry2.hh>         // Geometry definition
+#include <snova/physics.hh>           // Physical proceses to consider
+#include <snova/generator.hh>         // Initial particles generator
+#include <snova/run.hh>               // User actions per run basis
+#include <snova/event.hh>             // User actions per event basis
+#include <snova/tracking.hh>          // User actions per track basis
+#include <snova/stacking.hh>          // User actions related with tracks stacking
+#include <snova/stepping.hh>          // User actions per step basis
+#include <snova/stepping_verbose.hh>  // Information dump per step basis
+
+#include "G4RunManager.hh"  // Program manager
+#include "G4UImanager.hh"   // User Interface manager
+#include "G4UIterminal.hh"  // User Interface manager through the terminal
+
+#ifdef G4UI_USE_TCSH
+#include "G4UItcsh.hh"      // For terminal tcsh use
+#endif
+
+#undef G4VIS_USE
+
+#ifdef G4VIS_USE
+#include "G4VisExecutive.hh"
+#endif
+
+#include <bhep/bhep_svc.h>
+#include <bhep/sreader.h>
+
+using namespace snova;
+
+int main( int argc_ , char** argv_ ) 
+{
+  bool        debug           = false;
+  std::string params_filename = snova::constants::DEF_PARAMS_FILENAME;
+  bool        automatic       = true;
+  bool        visual_mode     = false;
+  std::string G4_macro        = "";
+
+  // parse switches:
+  int iarg=1;
+  while ( iarg < argc_ ) {
+    
+    std::string arg = argv_[iarg];
+    
+    if ( arg[0] == '-' ) {
+
+      if ( arg == "-d" || arg == "--debug" ) debug=true;
+      
+      if ( arg == "-p" || arg == "--params" ) {
+	iarg++;
+	if (iarg==argc_) {
+	  throw std::runtime_error("Missing simulation parameters file!");
+	}
+	params_filename=argv_[iarg];
+      }
+
+    }
+    else {
+      G4cerr << "arg=" << arg << G4endl;
+
+      if ( arg == "vis" || arg == "visual" ) {
+	visual_mode = true;
+      }
+      else {
+	G4_macro=arg;
+      }
+
+    }
+    
+    iarg++;
+  }
+
+  if ( visual_mode || !G4_macro.empty() ) automatic=false;
+
+  // create a generic store:
+  bhep::gstore store;
+  G4cout << G4endl << "***** Reading parameters from '" 
+	 << params_filename << "' file ..." 
+	 << G4endl << G4endl;
+
+  // and a reader:
+  bhep::sreader reader(store);
+  reader.file(params_filename.c_str());
+  reader.info_level(NORMAL);
+  reader.group("GLOBAL");
+  reader.read();
+
+  G4String sim_verbosity = store.fetch_sstore("simulation_verbosity");
+  G4cout << "***** Simulation verbosity set to: " << sim_verbosity << G4endl;
+
+  G4String G4Tracking_verbosity = store.fetch_sstore("G4Tracking_verbosity");
+  G4cout << "***** G4 Tracking verbosity set to: " << G4Tracking_verbosity << G4endl;
+
+  G4String dst_fname = store.fetch_sstore("dst_fname");
+  G4cout << "***** DST output file name:" << dst_fname << G4endl;
+
+  G4String gen_source = store.fetch_sstore("gen_source");
+  G4double gen_min_E  = store.fetch_dstore("gen_min_E");
+  G4double gen_max_E  = store.fetch_dstore("gen_max_E");
+  G4int    num_events = store.fetch_istore("num_events");
+  G4String part_name  = store.fetch_sstore("part_name");
+
+  if (gen_source == "random") {
+    G4cout << "***** Generator data will follow a flat random distribution in: " << G4endl;
+    G4cout << "*****           Ekin  (Mev): (" << gen_min_E << " , " 
+	   << gen_max_E << ")" << G4endl;
+    G4cout << "*****           Theta (deg): (0 , 90)" <<  G4endl;
+    G4cout << "*****           Phi   (deg): (0 , 180)" <<  G4endl;
+    G4cout << "***** Initial events: " << num_events << " " << part_name << G4endl;
+  }
+  else {
+    G4cout << "***** Generator data source read from:" << gen_source << G4endl;
+    G4cout << "***** Initial events: " << num_events << " pairs of " << part_name << G4endl;
+  }
+
+  G4String geom_filename = store.fetch_sstore("geom_file");
+  G4cout << "***** Reading geometry parameters from: '" 
+	 << geom_filename << "'" << G4endl;
+  G4cout << "***** Reading physics parameters from:  '" 
+	 << params_filename << "'" << G4endl;
+  
+  G4cout << "**********************************************************"
+	 << G4endl << G4endl;
+  
+  // The ihep::event service is generated. This server must be instantiated
+  // wherever you want to access all the info.
+  bhep::bhep_svc bsvc;  
+
+  // my Verbose output class:
+  G4VSteppingVerbose* verbosity = new stepping_verbose;
+  G4VSteppingVerbose::SetInstance(verbosity);
+
+  // Run manager:
+  G4RunManager * runManager = new G4RunManager;
+
+  // UserInitialization classes (mandatory)
+
+  // geometry
+  geometry* geom = new geometry(geom_filename,params_filename);
+  geom->set_info_level(sim_verbosity);
+  runManager->SetUserInitialization(geom);
+
+  // physics
+  physics* phys = new physics(params_filename);
+  phys->set_info_level(sim_verbosity);
+  runManager->SetUserInitialization(phys);
+
+
+#ifdef G4VIS_USE
+  // Visualization, if you choose to have it!
+  G4VisManager* visManager = new G4VisExecutive;
+  visManager->Initialize();
+#endif
+
+  // UserAction classes
+  // generator
+  generator* my_gen = new generator( part_name , 
+				     gen_source , 
+				     gen_min_E , 
+				     gen_max_E , 
+				     geom->get_geom_mgr() , 
+				     params_filename );
+  my_gen->set_info_level(sim_verbosity);
+  runManager->SetUserAction(my_gen);
+
+  // run
+  run* my_run = new run(dst_fname);
+  runManager->SetUserAction(my_run);  
+
+  //event
+  snova::event* my_evt = new snova::event(part_name, dst_fname);
+  my_evt->set_info_level(sim_verbosity);
+  runManager->SetUserAction(my_evt);
+
+  // track
+  tracking* my_tracking = new tracking();
+  my_tracking->set_info_level(sim_verbosity);
+  runManager->SetUserAction(my_tracking);
+
+  // step
+  stepping* my_stepping = new stepping(part_name);
+  my_stepping->set_info_level(sim_verbosity);
+  runManager->SetUserAction(my_stepping);
+
+  // stack
+  stacking* my_stacking = new stacking(part_name);
+  my_stacking->set_info_level(sim_verbosity);
+  runManager->SetUserAction(my_stacking);
+
+
+  //Initialize G4 kernel
+  runManager->Initialize();
+
+
+  //////////////////////////////////////////////////////////////
+  //////////////////////////////////////////////////////////////
+  //get the pointer to the User Interface manager
+  //in order for the user to issue commands to the program 
+  G4UImanager * UI = G4UImanager::GetUIpointer();  
+
+
+  //////////////////////////////////////////////////////////////
+  // Automatic mode
+  if( automatic ) {
+
+#ifdef G4VIS_USE
+    visManager->SetVerboseLevel("quiet");
+#endif
+
+    G4String command = "/control/shell cp currentEvent.rndm currentRun.rndm";
+    UI->ApplyCommand(command);
+    command = "/random/setSavingFlag true";
+    UI->ApplyCommand(command);
+    command = "/random/resetEngineFrom currentRun.rndm";
+    UI->ApplyCommand(command);
+
+    command = "/tracking/verbose ";
+    UI->ApplyCommand(command + G4Tracking_verbosity);
+
+    command = "/run/beamOn ";
+    UI->ApplyCommand(command+to_string(num_events));
+
+  }
+  else {      
+    // Visual mode
+    if ( visual_mode ) {
+      
+      // G4UIterminal is a (dumb) terminal.
+      G4UIsession *session = 0;
+      
+#ifdef G4UI_USE_TCSH
+      session = new G4UIterminal(new G4UItcsh);      
+#else
+      session = new G4UIterminal();
+#endif     
+      
+      UI->ApplyCommand("/control/execute snova_vis.mac");    
+      session->SessionStart();
+      delete session;
+    }
+    // Batch mode
+    else {
+      
+#ifdef G4VIS_USE
+      visManager->SetVerboseLevel("quiet");
+#endif
+      
+      G4String command = "/control/execute ";
+      G4String fileName = G4_macro.c_str();
+      UI->ApplyCommand(command + fileName);
+
+    }
+    
+  }
+  
+#ifdef G4VIS_USE
+  delete visManager;
+#endif
+  
+  delete runManager;
+  delete verbosity;
+  
+  return 0;
+}
+
+// end of prog_snova.cc
Index: /snovis/trunk/applications/prog_snova2.cxx
===================================================================
--- /snovis/trunk/applications/prog_snova2.cxx	(revision 100)
+++ /snovis/trunk/applications/prog_snova2.cxx	(revision 100)
@@ -0,0 +1,127 @@
+// -*- mode: c++; -*- 
+// prog_snova2.cxx
+
+#include <cstdlib>
+#include <iostream>
+#include <string>
+#include <exception>
+
+#include <snova/snova_mgr.hh>
+
+#include <SNvertex/base_VG_factory.h>
+#include <SNvertex/CALO_basic_VG.h>
+#include <SNvertex/source_simple_VG.h>
+
+int main( int argc_ , char ** argv_ )
+{
+  int error_code=EXIT_SUCCESS;
+  try {
+
+    std::cout << "Hello, this is a sample program for class 'snova_mgr'!" << std::endl; 
+  
+    bool        debug           = false;
+    std::string params_filename = snova::constants::DEF_PARAMS_FILENAME;
+    std::string G4_macro        = "";
+    bool        visual_mode     = false;
+
+    int iarg=1;
+    while ( iarg<argc_ ) {
+    
+      std::string arg=argv_[iarg];
+      
+      if ( arg[0] == '-' ) {
+	
+	if ( arg == "-d" || arg == "--debug" ) debug=true;
+	
+	if ( arg == "-p" || arg == "--params" ) {
+	  iarg++;
+	  if (iarg==argc_) {
+	    throw std::runtime_error("Missing simulation parameters file!");
+	  }
+	  params_filename=argv_[iarg];
+	}
+	
+      }
+      else {
+	G4cerr << "arg=" << arg << G4endl;
+	
+	if ( arg == "vis" || arg == "visual" ) {
+	  visual_mode = true;
+	}
+	else {
+	  G4_macro=arg;
+	}
+	
+      }
+   
+      iarg++;
+    }
+    
+    // A snova manager:
+    snova::snova_mgr my_snova_mgr;
+
+    // Configure some properties of the snova manager:
+    my_snova_mgr.set_debug(debug);                     // debug verbosity
+    my_snova_mgr.set_params_filename(params_filename); // the main simulation configuration file
+    my_snova_mgr.set_visual_mode(visual_mode);         // use X11 display
+    my_snova_mgr.set_G4_macro(G4_macro);               // run G4 macro
+
+    // Use a dedicated vertex generator factory:
+    snemo::base_VG_factory my_VG_factory;
+    my_VG_factory.add("CALO_basic",    snemo::CALO_basic_VG::new_CALO_basic_VG );
+    my_VG_factory.add("source_simple", snemo::source_simple_VG::new_source_simple_VG );
+    // <here you may add more functors in the factory internal map... >
+    //my_VG_factory.add("TC_nblocks", snemo::TC_nblocks_VG::new_TC_nblocks_VG ); // NOT AVAILABLE YET!
+
+    my_VG_factory.init();
+    if( debug ) my_VG_factory.dump(std::cerr);
+    my_snova_mgr.set_VG_factory(my_VG_factory);
+
+    // Use a dedicated event generator factory:
+    /* 2007-01-31, FM: snova V2 beta release
+     *
+     * In a near future (SNevgen package?) I hope we will be able to plug here 
+     * any (E)vent (G)enerator factory; such code could look like:
+     *
+     *  snemo::base_EG_factory my_EG_factory;
+     *  my_EG_factory.add("single_particle", snemo::single_particle_EG::new_single_particle_VG );
+     *  my_EG_factory.add("from_genbb_file", snemo::from_genbb_file_EG::new_from_genbb_file_VG );
+     *  my_EG_factory.add("cosmics", snemo::cosmics_EG::cosmics_VG );
+     *  my_EG_factory.init();
+     *  my_snova_mgr.set_EG_factory(my_EG_factory);
+     *
+     * Now only support for a GENBB file reader is available,
+     * and hardcoded in the generator class...
+     * 
+     */
+
+    // Build the guts of the simulation process within the snova manager:
+    std::cerr << "prog_snova2: debug: " 
+	      << "Build the guts" << std::endl; 
+    my_snova_mgr.init(); // from this point 'set_XXXX' methods failed (manager is locked!)
+
+    // Run the simulation:
+    std::cerr << "prog_snova2: debug: " 
+	      << "Run the simulation" << std::endl; 
+    my_snova_mgr.run_sim();
+
+    // Clean the snova manager
+    std::cerr << "prog_snova2: debug: " 
+	      << "Clean the snova manager" << std::endl; 
+    my_snova_mgr.reset(); // not mandatory for we do it in the d-tor.
+
+    std::cerr << "prog_snova2: debug: " 
+	      << "Done" << std::endl; 
+  }
+  catch(std::exception & x){
+    std::cerr << "prog_snova2: error: " << x.what() << std::endl; 
+    error_code=EXIT_FAILURE;
+  }
+  catch(...){
+    std::cerr << "prog_snova2: error: " << "unexpected error!" << std::endl; 
+    error_code=EXIT_FAILURE;
+  }
+  return error_code;
+}
+
+// end of prog_snova2.cxx
Index: /snovis/trunk/applications/snovis_session.cc
===================================================================
--- /snovis/trunk/applications/snovis_session.cc	(revision 100)
+++ /snovis/trunk/applications/snovis_session.cc	(revision 100)
@@ -0,0 +1,120 @@
+/* 
+ * Version of prog_snova.cc to handle a G4Lab::UIOnX session
+ */
+
+#include <snova/snova_mgr.hh>
+
+#include <SNvertex/base_VG_factory.h>
+#include <SNvertex/CALO_basic_VG.h>
+#include <SNvertex/source_simple_VG.h>
+
+#include <G4Runmanager.hh>
+#include <G4UImanager.hh>
+
+// G4Lab :
+#include <G4Lab/UIOnX.h> //UIOnX
+#include "Environment.h"
+
+using namespace snova;
+
+namespace snovis {
+  class mgr : public snova::snova_mgr {
+  public:
+    mgr(){}
+    virtual ~mgr(){}
+  public:
+    void run_sim(int argc , char** argv) {
+      G4UImanager* UI = G4UImanager::GetUIpointer();  
+
+      UI->ApplyCommand("/control/shell cp currentEvent.rndm currentRun.rndm");
+      UI->ApplyCommand("/random/setSavingFlag true");
+      UI->ApplyCommand("/random/resetEngineFrom currentRun.rndm");
+      UI->ApplyCommand("/tracking/storeTrajectory 1");
+      //UI->ApplyCommand("/tracking/verbose 1");
+  
+      //G4RunManager* runManager = __runManager;
+      G4RunManager* runManager = G4RunManager::GetRunManager();
+
+      std::string gui = "$SNOVISROOT/scripts/OnX/snovis_session.onx"; //UIOnX
+      G4UIsession* session = 
+        new G4Lab::UIOnX(*runManager,gui,argc,argv); //UIOnX
+      session->SessionStart();
+      delete session;
+    }
+  };
+}
+
+int main( int argc , char** argv ) 
+{
+  if(argc<=0) return 1;
+  if(!check_envs(argv[0])) return 1;
+
+  //std::string params_filename = snova::constants::DEF_PARAMS_FILENAME;
+  std::string SNOVISROOT;
+  if(!Lib::System::getenv("SNOVISROOT",SNOVISROOT)) {
+    G4cout << "snovis_session :"
+	   << " Environment variable SNOVISROOT not defined."
+	   << G4endl;
+    return 1;
+  }
+
+  int error_code=EXIT_SUCCESS;
+  try {
+
+    std::cout << "Hello, this is a sample program for class 'snova_mgr'!" << std::endl; 
+  
+    bool        debug           = false;
+    //std::string params_filename = snova::constants::DEF_PARAMS_FILENAME;
+    std::string params_filename = SNOVISROOT+"/scripts/snova.par";
+    //G4String geom_filename = SNOVISROOT+"/scripts/snemo.geom";
+    std::string G4_macro        = "";
+    bool        visual_mode     = false;
+    
+    // A snova manager:
+    snovis::mgr my_snova_mgr;
+
+    // Configure some properties of the snova manager:
+    my_snova_mgr.set_debug(debug);                     // debug verbosity
+    my_snova_mgr.set_params_filename(params_filename); // the main simulation configuration file
+    my_snova_mgr.set_visual_mode(visual_mode);         // use X11 display
+    my_snova_mgr.set_G4_macro(G4_macro);               // run G4 macro
+
+    // Use a dedicated vertex generator factory:
+    snemo::base_VG_factory my_VG_factory;
+    my_VG_factory.add("CALO_basic",    snemo::CALO_basic_VG::new_CALO_basic_VG );
+    my_VG_factory.add("source_simple", snemo::source_simple_VG::new_source_simple_VG );
+    // <here you may add more functors in the factory internal map... >
+    //my_VG_factory.add("TC_nblocks", snemo::TC_nblocks_VG::new_TC_nblocks_VG ); // NOT AVAILABLE YET!
+
+    my_VG_factory.init();
+    if( debug ) my_VG_factory.dump(std::cerr);
+    my_snova_mgr.set_VG_factory(my_VG_factory);
+
+    // Build the guts of the simulation process within the snova manager:
+    std::cerr << "prog_snova2: debug: " 
+	      << "Build the guts" << std::endl; 
+    my_snova_mgr.init(); // from this point 'set_XXXX' methods failed (manager is locked!)
+
+    // Run the simulation:
+    std::cerr << "prog_snova2: debug: " 
+	      << "Run the simulation" << std::endl; 
+    my_snova_mgr.run_sim(argc,argv);
+
+    // Clean the snova manager
+    std::cerr << "prog_snova2: debug: " 
+	      << "Clean the snova manager" << std::endl; 
+    my_snova_mgr.reset(); // not mandatory for we do it in the d-tor.
+
+    std::cerr << "prog_snova2: debug: " 
+	      << "Done" << std::endl; 
+  }
+  catch(std::exception & x){
+    std::cerr << "prog_snova2: error: " << x.what() << std::endl; 
+    error_code=EXIT_FAILURE;
+  }
+  catch(...){
+    std::cerr << "prog_snova2: error: " << "unexpected error!" << std::endl; 
+    error_code=EXIT_FAILURE;
+  }
+  return error_code;
+}
Index: /snovis/trunk/build/build
===================================================================
--- /snovis/trunk/build/build	(revision 100)
+++ /snovis/trunk/build/build	(revision 100)
@@ -0,0 +1,257 @@
+#!/bin/sh -f 
+
+platform=`uname`
+
+uname_s=`uname -s`
+uname_m=`uname -m`
+platform_nemo="${uname_s}-${uname_m}"
+
+# Customize the below xxx_home to reach used packages :
+osc_home="/Users/barrand/OpenScientist/v16r0"
+bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p1/${platform}"
+HDF5_home=/usr/local/HDF5/1.6.5
+CLHEP_home=/usr/local/CLHEP/2.0.3.1
+G4_home=/geant4/geant4.8.2
+GeomUtils_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/GeomUtils"
+SNgeom2_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/SNgeom2"
+snova_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/snova"
+
+. ${osc_home}/aida-setup.sh
+
+if test "`onx-config --version`" = "" ; then
+  echo "onx-config not available."
+  exit
+fi
+
+if test "`aida-config --version`" = "" ; then
+  echo "aida-config not available."
+  exit
+fi
+
+if test "`g4lab-config --version`" = "" ; then
+  echo "g4lab-config not available."
+  exit
+fi
+
+#args=$*
+obuild_set_x=no
+
+do_snova=yes
+do_snovis=yes
+do_prog_snova=yes
+do_snovis_session=yes
+
+while test $# -ge 1 ; do
+  case $1 in
+    -h) 
+        echo "Usage :"
+        echo "  UNIX> ./build [Options] [Target]"
+        echo "Options :"
+        echo "  -x : execute with set -x."
+        echo "Target :"
+        echo "  If no option is specify and a ending"
+        echo " string is given ; this string is given"
+        echo " to a find command of the form :"
+        echo '    find ./sh -name "*target*" -exec {} \;'
+        echo " in order to execute selected scripts under"
+        echo " the sh directory."
+        echo "Examples :"
+        echo "  UNIX> sh/build app"
+        echo "  UNIX> sh/build -v _lib"
+        echo "  UNIX> sh/build -v -g dll_"
+        echo ""
+        exit ;;
+    -x) obuild_set_x=yes;obuild_args="${obuild_args} $1" ;;
+    -*) echo "unknwon option : $1" ; exit ;;
+     *) if [ $# = 1 ] ; then
+          if [ $1 = all ] ; then
+            do_snova=yes
+            do_snovis=yes
+            do_prog_snova=yes
+            do_snovis_session=yes
+          elif [ $1 = snova ] ; then
+            do_snova=yes
+            do_snovis=no
+            do_prog_snova=no
+            do_snovis_session=no
+          elif [ $1 = snovis ] ; then
+            do_snovis=yes
+            do_snova=no
+            do_prog_snova=no
+            do_snovis_session=no
+          elif [ $1 = prog_snova ] ; then
+            do_prog_snova=yes
+            do_snova=no
+            do_snovis=no
+            do_snovis_session=no
+          elif [ $1 = sess ] ; then
+            do_snovis_session=yes
+            do_snova=no
+            do_snovis=no
+            do_prog_snova=no
+          fi
+        else         
+          echo "unknwon option : $1"
+          exit
+        fi
+        ;;
+  esac
+  shift
+done
+
+if [ ${obuild_set_x} = yes ] ; then
+  set -x
+fi
+
+compiler=c++
+
+bin="../${platform}"
+/bin/mkdir -p ${bin}
+
+# snova library :
+if [ ${do_snova} = yes ] ; then
+
+snova_source="${snova_home}"
+
+cppflags=""
+#cppflags="${cppflags} -g -Wall"
+cppflags="${cppflags} -I${HDF5_home}/include -I${CLHEP_home}/include -I${bhep_home}/include -I${G4_home}/include"
+cppflags="${cppflags} -I${GeomUtils_home}/include"
+cppflags="${cppflags} -I${SNgeom2_home}/include"
+cppflags="${cppflags} -I${snova_home}"
+
+eval ${compiler} -c ${cppflags} -o ${bin}/snova_const.o ${snova_source}/base/snova_const.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/event.o ${snova_source}/base/event.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/generator.o ${snova_source}/base/generator.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/run.o ${snova_source}/base/run.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/stepping.o ${snova_source}/base/stepping.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/stepping_verbose.o ${snova_source}/base/stepping_verbose.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/tracking.o ${snova_source}/base/tracking.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/stacking.o ${snova_source}/base/stacking.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/gen_vtx.o ${snova_source}/vertex/gen_vtx.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/visibilities2.o ${snova_source}/geom/visibilities2.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/nemo_field2.o ${snova_source}/geom/nemo_field2.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/materials.o ${snova_source}/geom/materials.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/geometry2.o ${snova_source}/geom/geometry2.cc
+eval ${compiler} -c ${cppflags} -o ${bin}/physics.o ${snova_source}/physics/physics.cc
+
+objs="${bin}/snova_const.o ${bin}/event.o ${bin}/generator.o ${bin}/run.o ${bin}/stacking.o ${bin}/stepping.o ${bin}/stepping_verbose.o ${bin}/tracking.o ${bin}/geometry2.o ${bin}/materials.o ${bin}/nemo_field2.o ${bin}/visibilities2.o ${bin}/physics.o ${bin}/gen_vtx.o"
+
+#/bin/rm -f ${bin}/libsnova.a
+#ar cr ${bin}/libsnova.a ${objs}
+
+if test `uname` = "Darwin" ; then
+/bin/rm -f ${bin}/libsnova.dylib
+eval c++ -dynamiclib -twolevel_namespace -undefined dynamic_lookup -dynamic -single_module -o ${bin}/libsnova.dylib ${objs}
+fi
+
+if test `uname` = "Linux" ; then
+/bin/rm -f ${bin}/libsnova.so
+eval g++ -shared -o ${bin}/libsnova.dylib ${objs}
+fi
+
+fi
+
+# snovis dll :
+if [ ${do_snovis} = yes ] ; then
+
+cppflags="-I.."
+cppflags="${cppflags} `g4lab-config --cppflags`"
+cppflags="${cppflags} `onx-config --iv_cppflags`"
+cppflags="${cppflags} `aida-config --cppflags`"
+
+eval ${compiler} -c ${cppflags} -o ${bin}/Callbacks.o ../source/Callbacks.cxx
+eval ${compiler} -c ${cppflags} -o ${bin}/InventorCallbacks.o ../source/InventorCallbacks.cxx
+eval ${compiler} -c ${cppflags} -o ${bin}/Layouts.o ../source/Layouts.cxx
+
+objs="${bin}/Callbacks.o ${bin}/InventorCallbacks.o ${bin}/Layouts.o"
+
+libs=""
+libs="${libs} `g4lab-config --libs`"
+libs="${libs} `onx-config --iv_libs`"
+
+if test `uname` = "Darwin" ; then
+/bin/rm -f ${bin}/snovis.bundle
+eval c++ -bundle -twolevel_namespace -Wl,-headerpad_max_install_names -Wl,-headerpad,800 -o ${bin}/snovis.bundle ${objs} ${libs}
+fi
+
+if test `uname` = "Linux" ; then
+/bin/rm -f ${bin}/libsnovis.so
+eval g++ -shared -o ${bin}/libsnovis.so ${objs} ${libs}
+fi
+
+fi
+
+# prog_snova application :
+if [ ${do_prog_snova} = yes ] ; then
+
+cppflags=""
+#cppflags="${cppflags} -g"
+cppflags="${cppflags} -I${snova_home}"
+cppflags="${cppflags} -I${SNgeom2_home}/include"
+cppflags="${cppflags} -I${GeomUtils_home}/include"
+cppflags="${cppflags} -I${bhep_home}/include"
+cppflags="${cppflags} -I${G4_home}/include"
+cppflags="${cppflags} -I${HDF5_home}/include"
+cppflags="${cppflags} -I${CLHEP_home}/include"
+
+libs="-L${bin} -lsnova"
+libs="${libs} -L${SNgeom2_home}/${platform_nemo}/lib -lsngeom"
+libs="${libs} -L${GeomUtils_home}/${platform_nemo}/lib -lgeomutils"
+libs="${libs} -L${bhep_home}/lib -lbhep"
+libs="${libs} -L${G4_home}/Darwin/lib/Darwin-g++ -lG4interfaces -lG4physicslists -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global"
+libs="${libs} -L${CLHEP_home}/lib -lCLHEP"
+libs="${libs} -L${HDF5_home}/lib -lhdf5"
+libs="${libs} -lz"
+#echo ${libs}
+
+opts=
+#opts="${opts} -g"
+#if test `uname` = "Darwin" ; then
+#opts="${opts} -bind_at_load -multiply_defined suppress"
+#fi
+
+/bin/rm -f ${bin}prog_snova
+eval ${compiler} -c ${cppflags} -o ${bin}/prog_snova.o ../applications/prog_snova.cc
+eval ${compiler} ${opts} -o ${bin}/prog_snova ${bin}/prog_snova.o ${libs}
+
+fi
+
+# snovis_session application :
+if [ ${do_snovis_session} = yes ] ; then
+
+cppflags=""
+#cppflags="${cppflags} -g"
+cppflags="${cppflags} -I${snova_home}"
+cppflags="${cppflags} -I${SNgeom2_home}/include"
+cppflags="${cppflags} -I${GeomUtils_home}/include"
+cppflags="${cppflags} -I${bhep_home}/include"
+cppflags="${cppflags} -I${HDF5_home}/include"
+cppflags="${cppflags} `g4lab-config --cppflags`"
+cppflags="${cppflags} `aida-config --cppflags`"
+
+libs="-L${bin} -lsnova"
+libs="${libs} -L${SNgeom2_home}/${platform_nemo}/lib -lsngeom"
+libs="${libs} -L${GeomUtils_home}/${platform_nemo}/lib -lgeomutils"
+libs="${libs} -L${bhep_home}/lib -lbhep"
+libs="${libs} `g4lab-config --libs`"
+libs="${libs} `onx-config --iv_libs`"
+#libs="${libs} -L${CLHEP_home}/lib -lCLHEP"
+libs="${libs} -L${HDF5_home}/lib -lhdf5"
+libs="${libs} -lz"
+#echo ${libs}
+
+opts=
+#opts="${opts} -g"
+if test `uname` = "Darwin" ; then
+opts="${opts} -bind_at_load -multiply_defined suppress"
+fi
+
+eval ${compiler} -c ${cppflags} -o ${bin}/snovis_session.o ../applications/snovis_session.cc
+/bin/rm -f ${bin}snovis_session
+eval ${compiler} ${opts} -o ${bin}/snovis_session ${bin}/snovis_session.o ${libs}
+
+fi
+
+find ${bin} -name '*.o' -exec /bin/rm {} \;
+
Index: /snovis/trunk/build/install
===================================================================
--- /snovis/trunk/build/install	(revision 100)
+++ /snovis/trunk/build/install	(revision 100)
@@ -0,0 +1,43 @@
+#!/bin/sh -f
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/install )
+#   UNIX> sh/install
+#
+# This script is intended to install the 
+# setup.sh and setup.csh scripts. 
+#
+# For setup.sh, it edits the path line :
+#   path_<package>=@@absolute_dir@@
+# and for setup.csh, the path line :
+#   set path_BatchLab="@@absolute_dir@@"
+#
+# The script replaces in these lins the string : 
+#   @@absolute_dir@@ 
+# by the return of the pwd command.
+#
+#////////////////////////////////////////////////
+
+obuild_current=`pwd`
+
+obuild_dir=`echo ${obuild_current} | sed -e 's#/build##g'`
+
+obuild_from='="@@absolute_dir@@"'
+
+obuild_to='="'"${obuild_dir}"'"'
+
+if test -e setup.sh ; then
+  /bin/rm -f obuild_tmp
+  sed -e "s#${obuild_from}#${obuild_to}#g" setup.sh > obuild_tmp
+  /bin/mv obuild_tmp setup.sh
+  /bin/rm -f obuild_tmp
+fi
+
+if test -e setup.csh ; then
+  /bin/rm -f obuild_tmp
+  sed -e "s#${obuild_from}#${obuild_to}#g" setup.csh > obuild_tmp
+  /bin/mv obuild_tmp setup.csh
+  /bin/rm -f obuild_tmp
+fi
Index: /snovis/trunk/build/setup.csh
===================================================================
--- /snovis/trunk/build/setup.csh	(revision 100)
+++ /snovis/trunk/build/setup.csh	(revision 100)
@@ -0,0 +1,30 @@
+
+# Customize the below xxx_home :
+set osc_home="/Users/barrand/OpenScientist/v16r0"
+set SNgeom_home="/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0"
+
+source ${osc_home}/aida-setup.csh
+
+setenv ONXROOT    "${osc_home}/Resources/OnX"
+setenv ONXLABROOT "${osc_home}/Resources/OnXLab"
+setenv G4LABROOT  "${osc_home}/Resources/G4Lab"
+
+source ${SNgeom_home}/setup.csh
+
+set snovis_path="@@absolute_dir@@"
+
+setenv SNOVISROOT "${snovis_path}"
+
+set platform=`uname`
+set snovis_bin="${snovis_path}/${platform}"
+
+if ( `uname` == "Linux" ) then
+  setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}::${snovis_bin}"
+endif
+
+if ( `uname` == "Darwin" ) then
+  setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${snovis_bin}"
+endif
+
+setenv PATH "${PATH}:${snovis_bin}"
+
Index: /snovis/trunk/obuild/DOS/build.bat
===================================================================
--- /snovis/trunk/obuild/DOS/build.bat	(revision 100)
+++ /snovis/trunk/obuild/DOS/build.bat	(revision 100)
@@ -0,0 +1,177 @@
+@ECHO OFF
+SETLOCAL
+
+REM #
+REM # File produced by the obuild tool version 1.0
+REM # for the package snovis with version v1r0.
+REM #
+
+REM #////////////////////////////////////////////////
+REM # Usage :
+REM #   DOS> CD some_path\pack\version\obuild
+REM #   DOS> DOS\build
+REM # or :
+REM #   DOS> call DOS\build.bat
+REM #
+REM #////////////////////////////////////////////////
+
+REM #////////////////////////////////////////////////
+REM #/// Get path of this file :
+REM #////////////////////////////////////////////////
+SET obuild_snovis_path=%~dp0
+REM # Remove ending \obuild\DOS\
+SET obuild_snovis_path=%obuild_snovis_path:~0,-12%
+
+REM #////////////////////////////////////////////////
+REM #/// Treat arguments :
+REM #////////////////////////////////////////////////
+
+SET obuild_verbose=no
+SET obuild_debug=no
+SET obuild_do_mains=yes
+SET obuild_group=main
+
+SET obuild_args=
+
+:next_arg
+IF "%1%" == "" GOTO end_args
+
+IF NOT "%1%" == "-h" GOTO end_if_h
+  ECHO Usage :
+  ECHO   build [Options] [Target]
+  ECHO Options :
+  ECHO   -v : verbose.
+  ECHO   -g : build in debug mode.
+  ECHO   -e : erase binary directory.
+  ECHO   -x : execute with ECHO ON"
+  ECHO   -nm : build the not-main components.
+  ECHO   -group group : build the given group of components.
+  ECHO Target :
+  ECHO   If no option is specify and a ending
+  ECHO  string is given ; this string is given
+  ECHO  to a find command of the form :
+  ECHO     find ./sh -name "*target*" -exec {} \;
+  ECHO  in order to execute selected scripts under
+  ECHO  the sh directory.
+  ECHO Examples :
+  ECHO   build app
+  ECHO   build -v _lib
+  ECHO   build -v -g dll_
+  GOTO obuild_return
+:end_if_h
+
+IF NOT "%1%" == "-v" GOTO end_if_v
+  SET obuild_verbose=yes
+  SET obuild_args=%obuild_args% -v
+  SHIFT
+  GOTO next_arg
+:end_if_v
+
+IF NOT "%1%" == "-g" GOTO end_if_g
+  SET obuild_debug=yes
+  SET obuild_args=%obuild_args% -g
+  SHIFT
+  GOTO next_arg
+:end_if_g
+
+IF NOT "%1%" == "-e" GOTO end_if_e
+
+  IF "%OBUILD_PLATFORM%" == "" (
+    IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
+    SET obuild_platform=%OS%
+  ) ELSE (
+    SET obuild_platform=%OBUILD_PLATFORM%
+  )
+
+  IF "%obuild_platform%" == "" (
+    ECHO obuild_platform variable not defined.
+    GOTO obuild_return
+  )
+
+  IF "%OBUILD_DIR_BIN%" == "" (
+    SET obuild_dir_bin=%obuild_platform%_obuild
+  ) ELSE (
+    SET obuild_dir_bin=%OBUILD_DIR_BIN%
+  )
+
+  IF "%obuild_dir_bin%" == "" (
+    ECHO obuild_dir_bin variable not defined.
+    GOTO obuild_return
+  )
+
+  IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%"
+
+  GOTO obuild_return
+
+:end_if_e
+
+IF NOT "%1%" == "-x" GOTO end_if_x
+  SET obuild_args=%obuild_args% -x
+  SHIFT
+  GOTO next_arg
+:end_if_x
+
+IF NOT "%1%" == "-nm" GOTO end_if_nm
+  SET obuild_do_mains=no
+  SHIFT
+  GOTO next_arg
+:end_if_nm
+
+IF NOT "%1%" == "-group" GOTO end_if_group
+  SHIFT
+  SET obuild_group=%1%
+  SHIFT
+  GOTO next_arg
+:end_if_group
+
+REM # Argument without a leading "-" is assumed to 
+REM # be the last one and then to be a pattern 
+REM # to find and execute command files under 
+REM # the DOS directory.
+SET obuild_arg=%1%
+SET obuild_arg1=%1:~0,1%
+IF "%obuild_arg1%" == "-" GOTO obuild_return
+
+  FOR %%f IN (DOS\*%obuild_arg%*) DO %%f %obuild_args%
+
+  GOTO obuild_return
+
+:end_args
+
+REM #////////////////////////////////////////////////
+REM #/// End arguments.
+REM #////////////////////////////////////////////////
+
+
+IF NOT %obuild_group% == main GOTO end_if_group_0
+IF NOT %obuild_do_mains% == yes GOTO end_if_main_0
+  IF NOT EXIST .\DOS\build_dll_snovis.bat  GOTO end_if_build_0
+    CALL .\DOS\build_dll_snovis.bat %obuild_args%
+    @IF ERRORLEVEL 1 @GOTO obuild_return
+    @ECHO OFF
+:end_if_build_0
+:end_if_main_0
+:end_if_group_0
+
+IF NOT %obuild_group% == main GOTO end_if_group_1
+IF NOT %obuild_do_mains% == yes GOTO end_if_main_1
+  IF NOT EXIST .\DOS\build_app_prog_snova.bat  GOTO end_if_build_1
+    CALL .\DOS\build_app_prog_snova.bat %obuild_args%
+    @IF ERRORLEVEL 1 @GOTO obuild_return
+    @ECHO OFF
+:end_if_build_1
+:end_if_main_1
+:end_if_group_1
+IF NOT %obuild_group% == main GOTO end_if_group_2
+IF NOT %obuild_do_mains% == yes GOTO end_if_main_2
+  IF NOT EXIST .\DOS\build_app_snovis_session.bat  GOTO end_if_build_2
+    CALL .\DOS\build_app_snovis_session.bat %obuild_args%
+    @IF ERRORLEVEL 1 @GOTO obuild_return
+    @ECHO OFF
+:end_if_build_2
+:end_if_main_2
+:end_if_group_2
+
+:obuild_return
+ENDLOCAL
+@ECHO ON
Index: /snovis/trunk/obuild/DOS/build_app_prog_snova.bat
===================================================================
--- /snovis/trunk/obuild/DOS/build_app_prog_snova.bat	(revision 100)
+++ /snovis/trunk/obuild/DOS/build_app_prog_snova.bat	(revision 100)
@@ -0,0 +1,581 @@
+@ECHO OFF
+SETLOCAL
+
+REM #
+REM # File produced by the obuild tool version 1.0
+REM # for the package snovis with version v1r0.
+REM #
+
+REM #////////////////////////////////////////////////
+REM # Usage :
+REM #   DOS> CD some_path\pack\version\obuild
+REM #   DOS> DOS\build_prog_snova
+REM #
+REM #////////////////////////////////////////////////
+
+REM #////////////////////////////////////////////////
+REM #/// Get path of this file :
+REM #////////////////////////////////////////////////
+SET obuild_snovis_path=%~dp0
+REM # Remove ending \obuild\DOS\
+SET obuild_snovis_path=%obuild_snovis_path:~0,-12%
+
+REM #////////////////////////////////////////////////
+REM #/// Treat arguments :
+REM #////////////////////////////////////////////////
+
+SET obuild_verbose=no
+SET obuild_debug=no
+SET obuild_optimize=yes
+SET obuild_set_x=no
+
+:next_arg
+IF "%1%" == "" GOTO end_args
+
+IF NOT "%1%" == "-v" GOTO end_if_v
+  SET obuild_verbose=yes
+  SHIFT
+  GOTO next_arg
+:end_if_v
+
+IF NOT "%1%" == "-g" GOTO end_if_g
+  SET obuild_debug=yes
+  SHIFT
+  GOTO next_arg
+:end_if_g
+
+IF NOT "%1%" == "-x" GOTO end_if_x
+  SET obuild_set_x=yes
+  SHIFT
+  GOTO next_arg
+:end_if_x
+
+:end_args
+
+REM #////////////////////////////////////////////////
+REM #/// End arguments.
+REM #////////////////////////////////////////////////
+
+IF %obuild_set_x% == yes ECHO ON
+
+IF %obuild_debug% == yes SET obuild_optimize=no
+
+IF "%OBUILD_PLATFORM%" == "" (
+  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
+  SET obuild_platform=%OS%
+) ELSE (
+  SET obuild_platform=%OBUILD_PLATFORM%
+)
+
+IF "%obuild_platform%" == "" (
+  ECHO obuild_platform variable not defined.
+  GOTO obuild_return
+)
+
+IF "%OBUILD_DIR_BIN%" == "" (
+  SET obuild_dir_bin=%obuild_platform%_obuild
+) ELSE (
+  SET obuild_dir_bin=%OBUILD_DIR_BIN%
+)
+
+IF "%obuild_dir_bin%" == "" (
+  ECHO obuild_dir_bin variable not defined.
+  GOTO obuild_return
+)
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
+  IF EXIST obuild_platform.obj DEL obuild_platform.obj
+)
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
+:end_if_platform_1
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
+SET bhep_platform=Darwin
+:end_if_platform_3
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
+SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
+:end_if_platform_5
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
+SET snova_platform=Darwin
+:end_if_platform_7
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
+SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+:end_if_platform_9
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
+SET Geant4_home=/usr/local/geant4/8.2
+:end_if_platform_11
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
+SET obuild_cxx_command=c++
+:end_if_platform_12
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+SET obuild_cxx_command=c++
+:end_if_platform_13
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
+SET obuild_cxx_command=cxx
+:end_if_platform_14
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
+SET obuild_cxx_command=cl.exe
+:end_if_platform_15
+SET obuild_platform_result=
+IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
+SET obuild_cxx_optimize=-O
+:end_if_platform_16
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
+SET obuild_cxx_optimize=-O
+:end_if_platform_17
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
+SET obuild_cxx_optimize=-O
+:end_if_platform_18
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
+SET obuild_cxx_optimize=/O2
+:end_if_platform_19
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
+SET obuild_cxx_debug=-g
+:end_if_platform_20
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
+SET obuild_cxx_debug=-g
+:end_if_platform_21
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
+SET obuild_cxx_debug=-g
+:end_if_platform_22
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
+SET obuild_cxx_debug=/ZI /Od
+:end_if_platform_23
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
+SET obuild_cxx_options=-fPIC
+:end_if_platform_24
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
+SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
+:end_if_platform_25
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_prog_snova_sh_26
+  SET obuild_cxx_debug_local=%obuild_cxx_debug%
+  GOTO end_if_db_build_app_prog_snova_sh_26
+:else_if_db_build_app_prog_snova_sh_26
+  SET obuild_cxx_debug_local=
+:end_if_db_build_app_prog_snova_sh_26
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_prog_snova_sh_27
+  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
+  GOTO end_if_opt_build_app_prog_snova_sh_27
+:else_if_opt_build_app_prog_snova_sh_27
+  SET obuild_cxx_optimize_local=
+:end_if_opt_build_app_prog_snova_sh_27
+
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
+  IF EXIST obuild_find.obj DEL obuild_find.obj
+)
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_28
+SET obuild_cxx_includes=-I${snova_home}
+:end_if_platform_28
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_29
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/GeomUtils/include
+:end_if_platform_29
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNgeom2/include
+:end_if_platform_30
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_31
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNvertex/include
+:end_if_platform_31
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_32
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${bhep_home}
+:end_if_platform_32
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_33
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
+:end_if_platform_33
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_34
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
+:end_if_platform_34
+SET obuild_platform_result=
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HDF5_path%\include"
+
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova"
+
+@IF %obuild_verbose% == yes @ECHO ON 
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\app_prog_snova\prog_snova2.obj  /Tp"..\applications\prog_snova2.cxx" 1> cl_exe_error
+@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
+cd "%obuild_snovis_path%\obuild"
+
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
+SET obuild_cxx_linker_command=c++
+:end_if_platform_37
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_38
+SET obuild_cxx_linker_command=c++
+:end_if_platform_38
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_39
+SET obuild_cxx_linker_command=cxx
+:end_if_platform_39
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_40
+SET obuild_cxx_linker_command=link.exe
+:end_if_platform_40
+SET obuild_platform_result=
+IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_41
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_41
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_42
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_42
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_43
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_43
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_44
+SET obuild_cxx_linker_debug=/DEBUG
+:end_if_platform_44
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_45
+SET obuild_cxx_linker_options=/nologo
+:end_if_platform_45
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_prog_snova_sh_46
+  SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
+  GOTO end_if_db_build_app_prog_snova_sh_46
+:else_if_db_build_app_prog_snova_sh_46
+  SET obuild_cxx_linker_debug_local=
+:end_if_db_build_app_prog_snova_sh_46
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_prog_snova_sh_47
+  SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
+  GOTO end_if_opt_build_app_prog_snova_sh_47
+:else_if_opt_build_app_prog_snova_sh_47
+  SET obuild_cxx_linker_optimize_local=
+:end_if_opt_build_app_prog_snova_sh_47
+
+SET obuild_linked_libraries=-L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${bhep_home}/Darwin -lbhep
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4interfaces
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_51
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global
+:end_if_platform_51
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_52
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
+:end_if_platform_52
+SET obuild_platform_result=
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HDF5_path%\%obuild_dir_bin%\osc_HDF5.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF EXIST .\app_prog_snova\tmp_objs DEL .\app_prog_snova\tmp_objs
+FOR %%f IN (.\app_prog_snova\*.obj) DO ECHO %%f >> .\app_prog_snova\tmp_objs
+REM # Link prog_snova :
+IF EXIST .\prog_snova.exe DEL .\prog_snova.exe
+@IF %obuild_verbose% == yes @ECHO ON 
+%obuild_cxx_linker_command% %obuild_cxx_linker_debug_local% %obuild_cxx_linker_optimize_local% %obuild_cxx_linker_options% /out:.\prog_snova.exe @.\app_prog_snova\tmp_objs %obuild_linked_libraries%
+@IF ERRORLEVEL 1 @GOTO obuild_return
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+REM # Some cleanup :
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.ilk" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.ilk"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.pdb" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.pdb"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.exp"
+
+:obuild_return
+ENDLOCAL
+@ECHO ON
Index: /snovis/trunk/obuild/DOS/build_app_snovis_session.bat
===================================================================
--- /snovis/trunk/obuild/DOS/build_app_snovis_session.bat	(revision 100)
+++ /snovis/trunk/obuild/DOS/build_app_snovis_session.bat	(revision 100)
@@ -0,0 +1,776 @@
+@ECHO OFF
+SETLOCAL
+
+REM #
+REM # File produced by the obuild tool version 1.0
+REM # for the package snovis with version v1r0.
+REM #
+
+REM #////////////////////////////////////////////////
+REM # Usage :
+REM #   DOS> CD some_path\pack\version\obuild
+REM #   DOS> DOS\build_snovis_session
+REM #
+REM #////////////////////////////////////////////////
+
+REM #////////////////////////////////////////////////
+REM #/// Get path of this file :
+REM #////////////////////////////////////////////////
+SET obuild_snovis_path=%~dp0
+REM # Remove ending \obuild\DOS\
+SET obuild_snovis_path=%obuild_snovis_path:~0,-12%
+
+REM #////////////////////////////////////////////////
+REM #/// Treat arguments :
+REM #////////////////////////////////////////////////
+
+SET obuild_verbose=no
+SET obuild_debug=no
+SET obuild_optimize=yes
+SET obuild_set_x=no
+
+:next_arg
+IF "%1%" == "" GOTO end_args
+
+IF NOT "%1%" == "-v" GOTO end_if_v
+  SET obuild_verbose=yes
+  SHIFT
+  GOTO next_arg
+:end_if_v
+
+IF NOT "%1%" == "-g" GOTO end_if_g
+  SET obuild_debug=yes
+  SHIFT
+  GOTO next_arg
+:end_if_g
+
+IF NOT "%1%" == "-x" GOTO end_if_x
+  SET obuild_set_x=yes
+  SHIFT
+  GOTO next_arg
+:end_if_x
+
+:end_args
+
+REM #////////////////////////////////////////////////
+REM #/// End arguments.
+REM #////////////////////////////////////////////////
+
+IF %obuild_set_x% == yes ECHO ON
+
+IF %obuild_debug% == yes SET obuild_optimize=no
+
+IF "%OBUILD_PLATFORM%" == "" (
+  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
+  SET obuild_platform=%OS%
+) ELSE (
+  SET obuild_platform=%OBUILD_PLATFORM%
+)
+
+IF "%obuild_platform%" == "" (
+  ECHO obuild_platform variable not defined.
+  GOTO obuild_return
+)
+
+IF "%OBUILD_DIR_BIN%" == "" (
+  SET obuild_dir_bin=%obuild_platform%_obuild
+) ELSE (
+  SET obuild_dir_bin=%OBUILD_DIR_BIN%
+)
+
+IF "%obuild_dir_bin%" == "" (
+  ECHO obuild_dir_bin variable not defined.
+  GOTO obuild_return
+)
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
+  IF EXIST obuild_platform.obj DEL obuild_platform.obj
+)
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
+:end_if_platform_1
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
+SET bhep_platform=Darwin
+:end_if_platform_3
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
+SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
+:end_if_platform_5
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
+SET snova_platform=Darwin
+:end_if_platform_7
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
+SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+:end_if_platform_9
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
+SET Geant4_home=/usr/local/geant4/8.2
+:end_if_platform_11
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
+SET obuild_cxx_command=c++
+:end_if_platform_12
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+SET obuild_cxx_command=c++
+:end_if_platform_13
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
+SET obuild_cxx_command=cxx
+:end_if_platform_14
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
+SET obuild_cxx_command=cl.exe
+:end_if_platform_15
+SET obuild_platform_result=
+IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
+SET obuild_cxx_optimize=-O
+:end_if_platform_16
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
+SET obuild_cxx_optimize=-O
+:end_if_platform_17
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
+SET obuild_cxx_optimize=-O
+:end_if_platform_18
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
+SET obuild_cxx_optimize=/O2
+:end_if_platform_19
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
+SET obuild_cxx_debug=-g
+:end_if_platform_20
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
+SET obuild_cxx_debug=-g
+:end_if_platform_21
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
+SET obuild_cxx_debug=-g
+:end_if_platform_22
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
+SET obuild_cxx_debug=/ZI /Od
+:end_if_platform_23
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
+SET obuild_cxx_options=-fPIC
+:end_if_platform_24
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
+SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
+:end_if_platform_25
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_26
+  SET obuild_cxx_debug_local=%obuild_cxx_debug%
+  GOTO end_if_db_build_app_snovis_session_sh_26
+:else_if_db_build_app_snovis_session_sh_26
+  SET obuild_cxx_debug_local=
+:end_if_db_build_app_snovis_session_sh_26
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_27
+  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
+  GOTO end_if_opt_build_app_snovis_session_sh_27
+:else_if_opt_build_app_snovis_session_sh_27
+  SET obuild_cxx_optimize_local=
+:end_if_opt_build_app_snovis_session_sh_27
+
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
+  IF EXIST obuild_find.obj DEL obuild_find.obj
+)
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  AIDA v3r2p1`) DO SET obuild_AIDA_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_AIDA_path  ECHO Can't find AIDA package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Slash v1r*`) DO SET obuild_Slash_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Slash_path  ECHO Can't find Slash package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  expat v1r*`) DO SET obuild_expat_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_expat_path  ECHO Can't find expat package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  jpeg v1r*`) DO SET obuild_jpeg_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_jpeg_path  ECHO Can't find jpeg package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  dvi2bitmap v1r*`) DO SET obuild_dvi2bitmap_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_dvi2bitmap_path  ECHO Can't find dvi2bitmap package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  freetype2 v1r*`) DO SET obuild_freetype2_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_freetype2_path  ECHO Can't find freetype2 package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_28
+SET obuild_cxx_includes=-I${snova_home}
+:end_if_platform_28
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_29
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/GeomUtils/include
+:end_if_platform_29
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNgeom2/include
+:end_if_platform_30
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_31
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNvertex/include
+:end_if_platform_31
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_32
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${bhep_home}
+:end_if_platform_32
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_33
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
+:end_if_platform_33
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_34
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
+:end_if_platform_34
+SET obuild_platform_result=
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HDF5_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_AIDA_path%\src\cpp"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_G4Lab_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Lib_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Slash_path%"
+
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session"
+
+@IF %obuild_verbose% == yes @ECHO ON 
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\app_snovis_session\snovis_session.obj  /Tp"..\applications\snovis_session.cc" 1> cl_exe_error
+@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
+cd "%obuild_snovis_path%\obuild"
+
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_41
+SET obuild_cxx_linker_command=c++
+:end_if_platform_41
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_42
+SET obuild_cxx_linker_command=c++
+:end_if_platform_42
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_43
+SET obuild_cxx_linker_command=cxx
+:end_if_platform_43
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_44
+SET obuild_cxx_linker_command=link.exe
+:end_if_platform_44
+SET obuild_platform_result=
+IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_45
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_45
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_46
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_46
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_47
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_47
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_48
+SET obuild_cxx_linker_debug=/DEBUG
+:end_if_platform_48
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_49
+SET obuild_cxx_linker_options=/nologo
+:end_if_platform_49
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_50
+  SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
+  GOTO end_if_db_build_app_snovis_session_sh_50
+:else_if_db_build_app_snovis_session_sh_50
+  SET obuild_cxx_linker_debug_local=
+:end_if_db_build_app_snovis_session_sh_50
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_51
+  SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
+  GOTO end_if_opt_build_app_snovis_session_sh_51
+:else_if_opt_build_app_snovis_session_sh_51
+  SET obuild_cxx_linker_optimize_local=
+:end_if_opt_build_app_snovis_session_sh_51
+
+SET obuild_linked_libraries="%obuild_OnX_path%\%obuild_dir_bin%\OnXCore.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${bhep_home}/Darwin -lbhep
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HDF5_path%\%obuild_dir_bin%\osc_HDF5.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_G4Lab_path%\%obuild_dir_bin%\G4LabUIOnX.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_G4Lab_path%\%obuild_dir_bin%\G4LabCore.lib"
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_58
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global
+:end_if_platform_58
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_59
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
+:end_if_platform_59
+SET obuild_platform_result=
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_expat_path%\%obuild_dir_bin%\osc_expat.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibZip.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibUtils.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisGeometry.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisUtils.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_jpeg_path%\%obuild_dir_bin%\osc_jpeg.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_dvi2bitmap_path%\%obuild_dir_bin%\osc_dvi2bitmap.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_freetype2_path%\%obuild_dir_bin%\osc_freetype2.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_CoinGL_path%\%obuild_dir_bin%\osc_Coin.lib"
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_71
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+:end_if_platform_71
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_72
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+:end_if_platform_72
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_73
+SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
+:end_if_platform_73
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_74
+SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
+:end_if_platform_74
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_75
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
+:end_if_platform_75
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_76
+SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
+:end_if_platform_76
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF EXIST .\app_snovis_session\tmp_objs DEL .\app_snovis_session\tmp_objs
+FOR %%f IN (.\app_snovis_session\*.obj) DO ECHO %%f >> .\app_snovis_session\tmp_objs
+REM # Link snovis_session :
+IF EXIST .\snovis_session.exe DEL .\snovis_session.exe
+@IF %obuild_verbose% == yes @ECHO ON 
+%obuild_cxx_linker_command% %obuild_cxx_linker_debug_local% %obuild_cxx_linker_optimize_local% %obuild_cxx_linker_options% /out:.\snovis_session.exe @.\app_snovis_session\tmp_objs %obuild_linked_libraries%
+@IF ERRORLEVEL 1 @GOTO obuild_return
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+REM # Some cleanup :
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session\tmp_objs"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\snovis_session.ilk" DEL "%obuild_snovis_path%\%obuild_dir_bin%\snovis_session.ilk"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\snovis_session.pdb" DEL "%obuild_snovis_path%\%obuild_dir_bin%\snovis_session.pdb"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_snovis_session\tmp_objs"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\snovis_session.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\snovis_session.exp"
+
+:obuild_return
+ENDLOCAL
+@ECHO ON
Index: /snovis/trunk/obuild/DOS/build_dll_snovis.bat
===================================================================
--- /snovis/trunk/obuild/DOS/build_dll_snovis.bat	(revision 100)
+++ /snovis/trunk/obuild/DOS/build_dll_snovis.bat	(revision 100)
@@ -0,0 +1,623 @@
+@ECHO OFF
+SETLOCAL
+
+REM #
+REM # File produced by the obuild tool version 1.0
+REM # for the package snovis with version v1r0.
+REM #
+
+REM #////////////////////////////////////////////////
+REM # Usage :
+REM #   DOS> CD some_path\pack\version\obuild
+REM #   DOS> DOS\build_snovis
+REM #
+REM #////////////////////////////////////////////////
+
+REM #////////////////////////////////////////////////
+REM #/// Get path of this file :
+REM #////////////////////////////////////////////////
+SET obuild_snovis_path=%~dp0
+REM # Remove ending \obuild\DOS\
+SET obuild_snovis_path=%obuild_snovis_path:~0,-12%
+
+REM #////////////////////////////////////////////////
+REM #/// Treat arguments :
+REM #////////////////////////////////////////////////
+
+SET obuild_verbose=no
+SET obuild_debug=no
+SET obuild_optimize=yes
+SET obuild_set_x=no
+
+:next_arg
+IF "%1%" == "" GOTO end_args
+
+IF NOT "%1%" == "-v" GOTO end_if_v
+  SET obuild_verbose=yes
+  SHIFT
+  GOTO next_arg
+:end_if_v
+
+IF NOT "%1%" == "-g" GOTO end_if_g
+  SET obuild_debug=yes
+  SHIFT
+  GOTO next_arg
+:end_if_g
+
+IF NOT "%1%" == "-x" GOTO end_if_x
+  SET obuild_set_x=yes
+  SHIFT
+  GOTO next_arg
+:end_if_x
+
+:end_args
+
+REM #////////////////////////////////////////////////
+REM #/// End arguments.
+REM #////////////////////////////////////////////////
+
+IF %obuild_set_x% == yes ECHO ON
+
+IF %obuild_debug% == yes SET obuild_optimize=no
+
+IF "%OBUILD_PLATFORM%" == "" (
+  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
+  SET obuild_platform=%OS%
+) ELSE (
+  SET obuild_platform=%OBUILD_PLATFORM%
+)
+
+IF "%obuild_platform%" == "" (
+  ECHO obuild_platform variable not defined.
+  GOTO obuild_return
+)
+
+IF "%OBUILD_DIR_BIN%" == "" (
+  SET obuild_dir_bin=%obuild_platform%_obuild
+) ELSE (
+  SET obuild_dir_bin=%OBUILD_DIR_BIN%
+)
+
+IF "%obuild_dir_bin%" == "" (
+  ECHO obuild_dir_bin variable not defined.
+  GOTO obuild_return
+)
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
+  IF EXIST obuild_platform.obj DEL obuild_platform.obj
+)
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
+:end_if_platform_1
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
+SET bhep_platform=Darwin
+:end_if_platform_3
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
+SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
+:end_if_platform_5
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
+SET snova_platform=Darwin
+:end_if_platform_7
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
+SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+:end_if_platform_9
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
+SET Geant4_home=/usr/local/geant4/8.2
+:end_if_platform_11
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
+SET obuild_cxx_command=c++
+:end_if_platform_12
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+SET obuild_cxx_command=c++
+:end_if_platform_13
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
+SET obuild_cxx_command=cxx
+:end_if_platform_14
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
+SET obuild_cxx_command=cl.exe
+:end_if_platform_15
+SET obuild_platform_result=
+IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
+SET obuild_cxx_optimize=-O
+:end_if_platform_16
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
+SET obuild_cxx_optimize=-O
+:end_if_platform_17
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
+SET obuild_cxx_optimize=-O
+:end_if_platform_18
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
+SET obuild_cxx_optimize=/O2
+:end_if_platform_19
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
+SET obuild_cxx_debug=-g
+:end_if_platform_20
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
+SET obuild_cxx_debug=-g
+:end_if_platform_21
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
+SET obuild_cxx_debug=-g
+:end_if_platform_22
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
+SET obuild_cxx_debug=/ZI /Od
+:end_if_platform_23
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
+SET obuild_cxx_options=-fPIC
+:end_if_platform_24
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
+SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
+:end_if_platform_25
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_26
+  SET obuild_cxx_debug_local=%obuild_cxx_debug%
+  GOTO end_if_db_build_dll_snovis_sh_26
+:else_if_db_build_dll_snovis_sh_26
+  SET obuild_cxx_debug_local=
+:end_if_db_build_dll_snovis_sh_26
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_27
+  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
+  GOTO end_if_opt_build_dll_snovis_sh_27
+:else_if_opt_build_dll_snovis_sh_27
+  SET obuild_cxx_optimize_local=
+:end_if_opt_build_dll_snovis_sh_27
+
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
+  IF EXIST obuild_find.obj DEL obuild_find.obj
+)
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Slash v1r*`) DO SET obuild_Slash_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Slash_path  ECHO Can't find Slash package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  AIDA v3r2p1`) DO SET obuild_AIDA_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_AIDA_path  ECHO Can't find AIDA package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  BatchLab v1r*`) DO SET obuild_BatchLab_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_BatchLab_path  ECHO Can't find BatchLab package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  expat v1r*`) DO SET obuild_expat_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_expat_path  ECHO Can't find expat package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  jpeg v1r*`) DO SET obuild_jpeg_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_jpeg_path  ECHO Can't find jpeg package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  dvi2bitmap v1r*`) DO SET obuild_dvi2bitmap_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_dvi2bitmap_path  ECHO Can't find dvi2bitmap package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  freetype2 v1r*`) DO SET obuild_freetype2_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_freetype2_path  ECHO Can't find freetype2 package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
+
+SET obuild_cxx_includes=/I"%obuild_snovis_path%"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Lib_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Slash_path%"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_AIDA_path%\src\cpp"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_OnX_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_G4Lab_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_BatchLab_path%"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HEPVis_path%\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_CoinGL_path%\include"
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
+SET obuild_cxx_includes=%obuild_cxx_includes% -I/System/Library/Frameworks/OpenGL.framework/Headers
+:end_if_platform_37
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_38
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${OBUILD_OPENGL_HOME}/include
+:end_if_platform_38
+SET obuild_platform_result=
+
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis"
+
+@IF %obuild_verbose% == yes @ECHO ON 
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\dll_snovis\Callbacks.obj  /Tp"..\source\Callbacks.cxx" 1> cl_exe_error
+@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
+cd "%obuild_snovis_path%\obuild"
+
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\dll_snovis\InventorCallbacks.obj  /Tp"..\source\InventorCallbacks.cxx" 1> cl_exe_error
+@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
+cd "%obuild_snovis_path%\obuild"
+
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\dll_snovis\Layouts.obj  /Tp"..\source\Layouts.cxx" 1> cl_exe_error
+@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
+cd "%obuild_snovis_path%\obuild"
+
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+SET obuild_linked_libraries="%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_expat_path%\%obuild_dir_bin%\osc_expat.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibZip.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibUtils.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisGeometry.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisUtils.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_jpeg_path%\%obuild_dir_bin%\osc_jpeg.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_dvi2bitmap_path%\%obuild_dir_bin%\osc_dvi2bitmap.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_freetype2_path%\%obuild_dir_bin%\osc_freetype2.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_CoinGL_path%\%obuild_dir_bin%\osc_Coin.lib"
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_53
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+:end_if_platform_53
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_54
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+:end_if_platform_54
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_55
+SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
+:end_if_platform_55
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_56
+SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
+:end_if_platform_56
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_57
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
+:end_if_platform_57
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_58
+SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
+:end_if_platform_58
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF EXIST .\dll_snovis\tmp_objs DEL .\dll_snovis\tmp_objs
+FOR %%f IN (.\dll_snovis\*.obj) DO ECHO %%f >> .\dll_snovis\tmp_objs
+
+REM # Create the archive library snovis :
+@IF %obuild_verbose% == yes @ECHO ON 
+lib.exe /nologo /machine:ix86 /out:.\dll_snovis\snovis.arc @.\dll_snovis\tmp_objs
+@IF ERRORLEVEL 1 @GOTO obuild_return
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+REM # Build the obuild_windef.exe utility program :
+cl.exe /nologo /DWIN32 /MD /O2 /W3 /Feobuild_windef.exe "%obuild_snovis_path%\obuild\cpp\obuild_windef.c" 1> NUL
+IF EXIST obuild_windef.obj DEL obuild_windef.obj
+
+REM # Building the .def file :
+@IF %obuild_verbose% == yes @ECHO ON 
+dumpbin.exe /symbols /out:.\dll_snovis\tmp .\dll_snovis\snovis.arc 1> dumpbin_exe_error .\dll_snovis\snovis.arc
+@IF ERRORLEVEL 1 @TYPE dumpbin_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL dumpbin_exe_error
+@IF %obuild_verbose% == yes @ECHO OFF 
+.\obuild_windef.exe snovis < .\dll_snovis\tmp > .\dll_snovis\snovis.def
+REM # Building the linking library :
+REM # It produces a .exp file.
+@IF %obuild_verbose% == yes @ECHO ON 
+lib.exe /nologo /machine:ix86 /out:.\dll_snovis\snovis.lib /def:.\dll_snovis\snovis.def 1> lib_exe_error
+@IF ERRORLEVEL 1 @TYPE lib_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL lib_exe_error
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+REM # Building the DLL :
+IF EXIST .\snovis.dll DEL .\snovis.dll
+@IF %obuild_verbose% == yes @ECHO ON 
+link.exe /nologo /dll /out:.\snovis.dll .\dll_snovis\snovis.exp .\dll_snovis\snovis.arc %obuild_linked_libraries%
+@IF %obuild_verbose% == yes @ECHO OFF 
+
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+REM # Some cleanup :
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis\tmp_objs"
+IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\snovis.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\snovis.exp"
+
+:obuild_return
+ENDLOCAL
+@ECHO ON
Index: /snovis/trunk/obuild/cpp/obuild_find.cpp
===================================================================
--- /snovis/trunk/obuild/cpp/obuild_find.cpp	(revision 100)
+++ /snovis/trunk/obuild/cpp/obuild_find.cpp	(revision 100)
@@ -0,0 +1,549 @@
+//
+//  This program is and should be standalone so that :
+//     UNIX> c++ obuild_find.cxx 
+//      DOS> cl.exe obuild_find.cxx 
+// builds at first shoot.
+//
+
+#include <string>
+#include <vector>
+#include <stdlib.h>
+
+// From Lib :
+static bool Lib_System_getenv(const std::string&,std::string&);
+static std::string Lib_System_pathSeparator();
+static std::string Lib_System_fileSeparator();
+static std::vector<std::string> Lib_smanip_words(const std::string&,
+                                                 const std::string&,
+                                                 bool = false);
+static bool Lib_smanip_match(const std::string&,const std::string&);
+static bool Lib_smanip_printf(std::string&,int,const char*,...);
+
+static bool Lib_dirmanip_entries(const std::string&,
+                                 std::vector<std::string>&,bool = true);
+static bool Lib_dirmanip_isAnEntry(const std::string&,const std::string&,
+                                 bool&);
+static bool Lib_dirmanip_find(const std::vector<std::string>& aPaths,
+                   const std::string& aPackage,
+                   const std::string& aVersion,
+                   std::string& aPath,
+                   std::string& aError); 
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+int main(
+ int aArgc
+,char** aArgv
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  std::vector<std::string> args;
+ {for(int index=0;index<aArgc;index++) args.push_back(aArgv[index]);}
+  
+  std::string pack;
+  std::string vers;
+  if(args.size()==2) {
+    pack = args[1];
+  } else if(args.size()==3) {
+    pack = args[1];
+    vers = args[2];
+  } else {
+    fprintf(stderr,"obuild_find : one or two arguments expected.\n");
+    printf("\n");
+    return EXIT_FAILURE;
+  }
+
+  //fprintf(stderr,"obuild_find : \"%s\" vers \"%s\"\n",pack.c_str(),vers.c_str());
+
+  std::string::size_type star = vers.find('*');
+  bool vers_wildcard = (star==std::string::npos?false:true);
+
+  std::string opath;
+  if(!Lib_System_getenv("OBUILD_PATH",opath)) {
+    fprintf(stderr,"\
+obuild_find : environment variable OBUILD_PATH not defined.\n\
+\n\
+  OBUILD_PATH is a list of head directories\n\
+ containing packages. Directories are ':' separated on a UNIX\n\
+ and ';' separated on a Windows.\n\
+\n\
+  For example, on a UNIX, if /work/project1 contains package pack1\n\
+ and /usr/project2 contains the package pack2 ; then\n\
+ having for the obuild directories the directory hierachies :\n\
+    /work/project1/pack1/<version>/obuild\n\
+    /usr/project2/pack2/<version>/obuild\n\
+ someone set the OBUILD_PATH variable under a csh flavoured\n\
+ shell with :\n\
+    csh> setenv OBUILD_PATH \"/work/project1:/usr/project2\"\n\
+ and under a sh flavoured shell with :\n\
+     sh> OBUILD_PATH=\"/work/project1:/usr/project2\"\n\
+     sh> export OBUILD_PATH\n\
+ Under DOS :\n\
+    DOS> SET OBUILD_PATH=C:\\work\\project1;D:\\usr\\project2\"\n\
+\n\
+");
+    printf("\n");
+    return EXIT_FAILURE;
+  }
+    
+  std::string sep = Lib_System_pathSeparator();
+  std::vector<std::string> paths = Lib_smanip_words(opath,sep);
+
+  std::string path,serr;
+  std::string dir;
+  if(!Lib_dirmanip_find(paths,pack,vers,dir,serr)) {
+    fprintf(stderr,"%s\n",serr.c_str());
+    printf("\n");
+    return EXIT_FAILURE;
+  }
+  if(dir=="") {
+    printf("\n");
+    return EXIT_FAILURE; //Not found.
+  }
+  printf("%s\n",dir.c_str());          
+  return EXIT_SUCCESS;  
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+bool Lib_System_getenv(
+ const std::string& aString
+,std::string& aValue
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  const char* env = ::getenv(aString.c_str());
+  if(env) {
+    aValue = std::string(env?env:"");
+    return true;
+  } else {
+    aValue = "";
+    return false;
+  }
+}
+//////////////////////////////////////////////////////////////////////////////
+std::string Lib_System_fileSeparator(
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+#ifdef WIN32
+  return "\\";
+#else
+  return "/";
+#endif
+}
+//////////////////////////////////////////////////////////////////////////////
+std::string Lib_System_pathSeparator(
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+#ifdef WIN32
+  return ";";
+#else
+  return ":";
+#endif
+}
+//////////////////////////////////////////////////////////////////////////////
+#include <string.h> /* strcpy */
+#include <stdlib.h> /* malloc,free */
+
+#define Lib_strdup(str)  ((str) != NULL ? (::strcpy((char*)::malloc((unsigned)::strlen(str) + 1), str)) : (char*)NULL)
+#define Lib_strdel(str) {if((str)!=NULL) {::free(str);str=NULL;}}
+//////////////////////////////////////////////////////////////////////////////
+bool Lib_smanip_match(
+ const std::string& aString   
+,const std::string& aPattern 
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  int lpattern = aPattern.length();
+  int lstring  = aString.length();
+  if ((lpattern==0)&&(lstring==0)) return true;
+  if ((lpattern==0)&&(lstring!=0)) return true;
+  if ((lpattern!=0)&&(lstring==0)) return false;
+  // pattern is * :
+  if(aPattern=="*") return true;
+  int wcount = 0;
+  int count;
+  for(count=0;count<lpattern;count++) {
+    if(aPattern[count]=='*') wcount++;
+  }
+  // no wildcard :
+  if(wcount==0) {
+    return (aPattern==aString ? true : false );
+  }
+
+  // complex pattern :
+#define PACKET 32
+  char** words = (char**)::malloc(PACKET * sizeof(char*));
+  if(words==NULL) return false;
+  int wmax = PACKET;
+  int wnumber= 0;
+  char* s = Lib_strdup(aPattern.c_str());
+  char* token = s;
+  while(1) { 
+    char* pos = ::strstr (token,"*");
+    if(pos) {
+      *pos = '\0';
+      if(*token!='\0') {
+        if(wnumber>=wmax) {
+          words = (char**)::realloc(words,(wmax+PACKET) * sizeof(char*));
+          if(words==NULL) {
+            Lib_strdel(s);
+            return false;
+          }
+          wmax += PACKET;
+        }
+        words[wnumber] = token;
+        wnumber++;
+      }
+      token = pos + 1;
+    } else { // last word :
+      if(*token!='\0') {
+        if(wnumber>=wmax) {
+          words = (char**)::realloc(words,(wmax+PACKET) * sizeof(char*));
+          if(words==NULL) {
+            Lib_strdel(s);
+            return false;
+          }
+          wmax += PACKET;
+        }
+        words[wnumber] = token;
+        wnumber++;
+      }
+      break;
+    }
+  }
+  // check that at least one word is not empty :
+  bool ok = false;
+  for(count=0;count<wnumber;count++) { 
+    if(*(words[count])!='\0') {
+      ok = true;
+      break;
+    }
+  }
+  if(!ok) { // only wildcards :
+    Lib_strdel(s);
+    if(words) ::free(words);
+    return true;
+  } 
+
+  // loop on words :
+  bool match = true;
+  token = (char*)aString.c_str();
+  for(count=0;count<wnumber;count++) { 
+    int   lword;
+    lword = ::strlen(words[count]); 
+    if(lword>0) { 
+      char* pos;
+      if(count==0) {
+        if(aPattern[0]!='*') {
+          // Begin of pattern (words[0]) and aString must match :
+          if(::strncmp(token,words[count],lword)!=0) {
+            match = false; // Different.
+            break;      
+          }
+          token = token + lword;
+          continue;
+        }
+      }
+      pos = ::strstr (token,words[count]);
+      if(!pos) {
+        match = false;
+        break;
+      }
+      if((count==(wnumber-1)) && (aPattern[lpattern-1]!='*') ) {
+        // Last word :
+        if(::strcmp(aString.c_str()+lstring-lword,words[count])!=0) 
+          match = false; // Compare last word and end of aString.
+        break;
+      } else {
+        token = pos + lword;
+      }
+    }
+  }
+  Lib_strdel(s);
+  if(words) ::free(words);
+  return match;
+}
+//////////////////////////////////////////////////////////////////////////////
+std::vector<std::string> Lib_smanip_words(
+ const std::string& aString
+,const std::string& aLimiter 
+,bool aTakeEmpty // false
+)
+//////////////////////////////////////////////////////////////////////////////
+//  If aLimiter is for exa "|" and for "xxx||xxx" :
+//  - aTakeEmpty false : {"xxx","xxx"} will be created (and NOT {"xxx","","xxx"}).
+//  - aTakeEmpty true : {"xxx","","xxx"} will be created.
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  std::vector<std::string> words;
+  if(aString=="") return words;
+  std::string::size_type lim = (aTakeEmpty?0:1);
+  if(aLimiter=="") {
+    words.push_back(aString);
+  } else {
+    std::string::size_type l = aString.length();
+    std::string::size_type llimiter = aLimiter.length();
+    std::string::size_type pos = 0;
+    while(1) {
+      std::string::size_type index = aString.find(aLimiter,pos);
+      if(index==std::string::npos){ // Last word.
+        if((l-pos)>=lim) words.push_back(aString.substr(pos,l-pos));
+        break;
+      } else {
+        //     abcxxxef
+        //     0  3  67
+        if((index-pos)>=lim) words.push_back(aString.substr(pos,index-pos));
+        pos = index + llimiter;
+      }
+    }
+  }
+  return words;
+}
+#include <stdarg.h>
+//////////////////////////////////////////////////////////////////////////////
+bool Lib_smanip_printf(
+ std::string& aString
+,int aLength
+,const char* aFormat
+,...
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  aString = "";
+  if(aLength<0) return false;
+  if(!aFormat) return false;
+  char* s = new char[aLength+1];
+  if(!s) return false;
+  s[aLength] = '\0';
+  va_list args;
+  va_start (args,aFormat);
+  vsprintf (s,aFormat,args);
+  va_end   (args);
+  if(s[aLength]!='\0') {
+    delete [] s;
+    return false;
+  }
+  aString = s;
+  delete [] s;
+  return true;
+}
+
+#ifdef WIN32
+#include <windows.h>
+#include <direct.h>
+#else //UNIX
+#include <dirent.h>
+#if defined(_POSIX_SOURCE)
+#define REAL_DIR_ENTRY(dp) 1
+#else
+#define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
+#endif
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+//////////////////////////////////////////////////////////////////////////////
+bool Lib_dirmanip_entries(
+ const std::string& aPath
+,std::vector<std::string>& aList
+,bool aFullPath
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  aList.clear();
+  struct stat finfo;
+  if (::stat(aPath.c_str(),&finfo) < 0)  return false;
+#ifdef WIN32
+  if (!(finfo.st_mode & S_IFDIR)) return false;
+  std::string entry = aPath;
+  if (!(entry[entry.size()] == '/' || entry[entry.size()] == '\\' ))
+    entry += "\\";
+  entry += "*";
+  WIN32_FIND_DATA findFileData;
+  HANDLE dir = ::FindFirstFile(entry.c_str(),&findFileData);
+  if(dir == INVALID_HANDLE_VALUE) return false;
+  // Get file names :
+  for (;;) {
+    if(!::FindNextFile(dir,&findFileData)) break;
+    std::string name = (const char*)findFileData.cFileName;
+    if(aFullPath)
+      aList.push_back(aPath+"\\"+name);
+    else
+      aList.push_back(name);
+  }
+  ::FindClose(dir);
+#else
+  if (!S_ISDIR(finfo.st_mode)) return false;
+  DIR* dir = ::opendir(aPath.c_str());
+  if(!dir) return false;
+  // Get file names :
+  for (;;) {
+    struct dirent* dp = ::readdir(dir);
+    //struct direct* dp;
+    if (dp==NULL) break;
+    if (REAL_DIR_ENTRY(dp)) {
+      std::string name = dp->d_name;
+      // Be sure we can work on the file :
+      std::string fname = aPath+"/"+name;
+      if (::stat(fname.c_str(),&finfo) < 0)  continue;
+      if(aFullPath)
+        aList.push_back(fname);
+      else
+        aList.push_back(name);
+    }
+  }
+  ::closedir(dir);
+#endif
+  return true;
+}
+//////////////////////////////////////////////////////////////////////////////
+bool Lib_dirmanip_isAnEntry(
+ const std::string& aPath
+,const std::string& aName
+,bool& aFound
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  aFound = false;
+  struct stat finfo;
+  if (::stat(aPath.c_str(),&finfo) < 0)  return false;
+#ifdef WIN32
+  if (!(finfo.st_mode & S_IFDIR)) return false;
+  std::string entry = aPath;
+  if (!(entry[entry.size()] == '/' || entry[entry.size()] == '\\' ))
+    entry += "\\";
+  entry += "*";
+  WIN32_FIND_DATA findFileData;
+  HANDLE dir = ::FindFirstFile(entry.c_str(),&findFileData);
+  if(dir == INVALID_HANDLE_VALUE) return false;
+  // Get file names :
+  for (;;) {
+    if(!::FindNextFile(dir,&findFileData)) break;
+    std::string name = (const char*)findFileData.cFileName;
+    if(name==aName) {
+      aFound = true;
+      ::FindClose(dir);
+      return true;
+    }
+  }
+  ::FindClose(dir);
+#else
+  if (!S_ISDIR(finfo.st_mode)) return false;
+  DIR* dir = ::opendir(aPath.c_str());
+  if(!dir) return false;
+  // Get file names :
+  for (;;) {
+    struct dirent* dp = ::readdir(dir);
+    //struct direct* dp;
+    if (dp==NULL) break;
+    if (REAL_DIR_ENTRY(dp)) {
+      std::string name = dp->d_name;
+      if(name==aName) {
+        aFound = true;
+        ::closedir(dir);
+        return true;
+      }
+    }
+  }
+  ::closedir(dir);
+#endif
+  return true;
+}
+//////////////////////////////////////////////////////////////////////////////
+bool Lib_dirmanip_find(
+ const std::vector<std::string>& aPaths
+,const std::string& aPackage
+,const std::string& aVersion
+,std::string& aPath
+,std::string& aError
+) 
+//////////////////////////////////////////////////////////////////////////////
+// aVersion could be empty and can contain woldcards.
+// The list of paths is searched first to last.
+// return true and aPath="" mean not found.
+// return false : something went wrong in directory manipulation.
+//                aError contains then an error message.
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  if(aPackage=="") {
+    aError = "Lib::dirmanip::find : empty package name.";
+    return false;
+  }
+
+  std::string sep = Lib_System_fileSeparator();
+
+  std::string::size_type star = aVersion.find('*');
+  bool vers_wildcard = (star==std::string::npos?false:true);
+
+  unsigned int pathn = aPaths.size();
+  //fprintf(stderr,"obuild_find : number of path %d\n",pathn);
+  for(unsigned int pathi=0;pathi<pathn;pathi++) {
+    std::string dir = aPaths[pathi];
+    //fprintf(stderr,"Lib::dirmanip::find : look directory \"%s\"\n",
+    //  dir.c_str());
+    bool found;
+    if(!Lib_dirmanip_isAnEntry(dir,aPackage,found)) {
+      aPath = "";
+      Lib_smanip_printf(aError,128+dir.size(),
+        "Lib::dirmanip::find : can't open directory \"%s\"\n",dir.c_str());
+      return false;
+    }
+    if(found) {
+      if(aVersion=="") {
+        dir += sep+aPackage;
+        aPath = dir;
+        aError = "";
+        return true;
+      }
+      // Look version :
+      dir += sep+aPackage;
+      if(vers_wildcard) {
+        std::vector<std::string> files;
+        if(Lib_dirmanip_entries(dir,files,false)) {
+          unsigned int number = files.size();
+          for(unsigned int index=0;index<number;index++) {
+            const std::string& file = files[index];
+            //std::string p,n,s;
+            //Lib::smanip::pathNameSuffix(file,p,n,s);
+            if(Lib_smanip_match(file,aVersion)) {
+              dir += sep+file;
+              aPath = dir;
+              aError = "";
+              return true;
+            }
+          } 
+        } 
+      } else {
+        bool found;
+        if(!Lib_dirmanip_isAnEntry(dir,aVersion,found)) {
+          aPath = "";
+          Lib_smanip_printf(aError,128+dir.size(),
+            "Lib::dirmanip::find : can't open directory \"%s\"\n",dir.c_str());
+          return false;
+        }
+        dir += sep+aVersion;
+        aPath = dir;
+        aError = "";
+        return true;
+      }
+    }
+  }
+
+  aPath = ""; // return true and aPath="" mean not found.
+  aError = "";
+  return true;
+}
Index: /snovis/trunk/obuild/cpp/obuild_platform.cpp
===================================================================
--- /snovis/trunk/obuild/cpp/obuild_platform.cpp	(revision 100)
+++ /snovis/trunk/obuild/cpp/obuild_platform.cpp	(revision 100)
@@ -0,0 +1,206 @@
+//
+//  This program is and should be standalone so that :
+//     UNIX> c++ obuild_platform.cxx 
+//      DOS> cl.exe obuild_platform.cxx 
+// builds at first shoot.
+//
+
+#include <string>
+#include <vector>
+#include <stdlib.h>
+#include <stdio.h>
+
+// From Lib :
+static std::vector<std::string> Lib_smanip_words(const std::string&,
+                                                 const std::string&,
+                                                 bool = false);
+
+//////////////////////////////////////////////////////////////////////////////
+static bool isKnownKeyword(
+ const std::string& aString
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  if(aString=="Windows_NT") {
+    return true;
+  } else if(aString=="Linux") {
+    return true;
+  } else if(aString=="Darwin") {
+    return true;
+  } else if(aString=="SunOS") {
+    return true;
+  } else if(aString=="OSF1") {
+    return true;
+  } else if(aString=="UNIX") {
+    return true;
+  } else {
+    return false;
+  }
+}
+//////////////////////////////////////////////////////////////////////////////
+static bool isUNIX(
+ const std::string& aString
+,bool& aResult
+)
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  if(!isKnownKeyword(aString)) {
+    aResult = false;
+    return false;
+  }
+  if(aString=="Windows_NT") {
+    aResult = false;
+  } else {
+    aResult = true;
+  }
+  return true;
+}
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+int main(
+ int aArgc
+,char** aArgv
+) 
+//////////////////////////////////////////////////////////////////////////////
+// aArgs[0] : program name.
+// aArgs[1] : we expect the result of `uname`.
+// aArgs[2] : an expression to compare with.
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  std::vector<std::string> args;
+ {for(int index=0;index<aArgc;index++) args.push_back(aArgv[index]);}
+  
+  if(args.size()!=3) {
+    fprintf(stderr,"obuild_platform : two arguments expected.\n");
+    printf("no\n");
+    return EXIT_FAILURE;
+  }
+
+  std::string uname = args[1];
+  if(!isKnownKeyword(uname)) {
+    fprintf(stderr,"obuild_platform : unknwon keyword \"%s\".\n",
+            uname.c_str());
+    printf("no\n");
+    return EXIT_FAILURE;
+  }
+
+  std::string expression = args[2];
+
+  std::vector<std::string> words = Lib_smanip_words(expression," ");
+
+  unsigned int wordn = words.size();
+  if(wordn==1) {
+
+    const std::string& keyword = words[0];
+
+    if(keyword=="UNIX") {
+
+      bool is_unix;
+      if(!isUNIX(uname,is_unix)) {
+      } else {
+        if(is_unix) {
+          printf("yes\n");
+          return EXIT_SUCCESS;
+        } else {
+          printf("no\n");
+          return EXIT_SUCCESS;
+        }
+      }
+
+    } else if(keyword==uname) {
+
+      printf("yes\n");
+      return EXIT_SUCCESS;
+
+    } else if(isKnownKeyword(keyword)) {
+
+      printf("no\n");
+      return EXIT_SUCCESS;
+
+    }
+
+  } else if(wordn==2) {
+
+    if(words[0]=="not") {
+
+      const std::string& keyword = words[1];
+
+      if(keyword=="UNIX") {
+
+        bool is_unix;
+        if(!isUNIX(uname,is_unix)) {
+        } else {
+          if(is_unix) {
+            printf("no\n");
+            return EXIT_SUCCESS;
+          } else {
+            printf("yes\n");
+            return EXIT_SUCCESS;
+          }
+        }
+
+      } else if(keyword==uname) {
+
+        printf("no\n");
+        return EXIT_SUCCESS;
+
+      } else if(isKnownKeyword(keyword)) {
+
+        printf("yes\n");
+        return EXIT_SUCCESS;
+
+      }
+
+    }
+
+  }
+
+  fprintf(stderr,"obuild_platform : expression \"%s\" not yet supported.\n",
+          expression.c_str());
+  printf("no\n");
+  return EXIT_FAILURE;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+std::vector<std::string> Lib_smanip_words(
+ const std::string& aString
+,const std::string& aLimiter 
+,bool aTakeEmpty // false
+)
+//////////////////////////////////////////////////////////////////////////////
+//  If aLimiter is for exa "|" and for "xxx||xxx" :
+//  - aTakeEmpty false : {"xxx","xxx"} will be created (and NOT {"xxx","","xxx"}).
+//  - aTakeEmpty true : {"xxx","","xxx"} will be created.
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  std::vector<std::string> words;
+  if(aString=="") return words;
+  std::string::size_type lim = (aTakeEmpty?0:1);
+  if(aLimiter=="") {
+    words.push_back(aString);
+  } else {
+    std::string::size_type l = aString.length();
+    std::string::size_type llimiter = aLimiter.length();
+    std::string::size_type pos = 0;
+    while(1) {
+      std::string::size_type index = aString.find(aLimiter,pos);
+      if(index==std::string::npos){ // Last word.
+        if((l-pos)>=lim) words.push_back(aString.substr(pos,l-pos));
+        break;
+      } else {
+        //     abcxxxef
+        //     0  3  67
+        if((index-pos)>=lim) words.push_back(aString.substr(pos,index-pos));
+        pos = index + llimiter;
+      }
+    }
+  }
+  return words;
+}
Index: /snovis/trunk/obuild/cpp/obuild_windef.c
===================================================================
--- /snovis/trunk/obuild/cpp/obuild_windef.c	(revision 100)
+++ /snovis/trunk/obuild/cpp/obuild_windef.c	(revision 100)
@@ -0,0 +1,178 @@
+/* +---------------------- Copyright notice -------------------------------+ */
+/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr)    | */
+/* |   Permission to use, copy, modify, and distribute this software       | */
+/* |   and its documentation for any purpose and without fee is hereby     | */
+/* |   granted, provided that the above copyright notice appear in all     | */
+/* |   copies and that both that copyright notice and this permission      | */
+/* |   notice appear in supporting documentation.  This software is        | */
+/* |   provided "as is" without express or implied warranty.               | */
+/* +---------------------- Copyright notice -------------------------------+ */
+
+/*
+  This program is a tool to build .def file
+ used by lib.exe to build the DLL on Windows.
+  It takes the output of a "dumpbin" over an
+ archive library and produces the .def file for
+ this library. For example :
+   DOS> dumpbin /out:tmp /symbols MyLib.arc
+   DOS> obuild_windef.exe MyLib < tmp > MyLib.def
+ Note that obuild_windef is a standalone program that 
+ can be easily reconstructed with :
+   DOS> cl /Foobuild_windef.exe obuild_windef.c
+*/
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+char** GetWords (char*,char*,int*);
+/*****************************************************************************/
+int main (
+ int aArgn 
+,char** aArgs
+)
+/*****************************************************************************/
+{
+#define MAX_STRING 2048
+  char buffer[MAX_STRING+1];
+  int length;
+
+
+  /*EXETYPE WINDOWS\n\ */
+  printf("\
+LIBRARY %s\n\
+EXPORTS\n",aArgs[1]);
+
+  while(1){
+    if(fgets(buffer,MAX_STRING,stdin)==NULL) return EXIT_FAILURE;
+    /*
+      On some system (NT) editors when saving binary files 
+      put \r\n at place of \n ; we then look for \r\n.
+    */
+    length = strlen(buffer);
+    if( (length>=2) && (buffer[length-2]=='\r') && (buffer[length-1]=='\n') ) {
+      buffer[length-2] = '\0';
+      length--;
+      length--;
+    } else if((length>=1) && (buffer[length-1]=='\n')) {
+      buffer[length-1] = '\0';
+      length--;
+    }
+    if(strstr(buffer,"SECT")==NULL) continue;
+    if(strstr(buffer,"External")==NULL) continue;
+    if(strstr(buffer,"??_")!=NULL) {
+      if(strstr(buffer,"operator/=")==NULL) continue;
+      /* Keep operator /= */
+    }
+
+    {    
+      char** words;
+      int    wordn;
+      words  = GetWords (buffer," ",&wordn);
+      if(wordn>=8) {
+	int iword = 7;
+        int offset = 0;
+	if(strcmp(words[4],"()")==0) {
+	  iword = 7;
+	} else if(strcmp(words[4],"External")==0) {
+	  iword = 6;
+	}
+        /* FIXME : in cmt_generator.cxx 
+        else return;  */
+	if(words[iword][0]=='_') offset = 1;
+
+        if( (iword==6) && 
+            ( (strstr(buffer,": static")!=NULL) ||
+              (strstr(buffer,"(class")!=NULL) ) ){
+	  /* static data members are not DATA */
+	  /* extern objects are not DATA */
+	  printf(" %s\n",words[iword]+offset);
+	} else if(iword==6) {
+          /* DATA */
+	  printf(" %s\tDATA\n",words[iword]+offset);
+	} else {
+          /* code */
+	  printf(" %s\n",words[iword]+offset);
+	}
+
+      }
+      {int count;
+      for(count=0;count<wordn;count++) if(words[count]) free(words[count]);
+      if(words) free(words);}
+    }
+    /*printf("%s\n",buffer);*/
+  }
+  return EXIT_SUCCESS;
+}
+/*****************************************************************************/
+char** GetWords (
+ char* a_string 
+,char* a_limiter 
+,int* a_number
+)
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+#define STRDUP(str)  ((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : (char*)NULL)
+#define STRDEL(str) {if((str)!=NULL) {free(str);str=NULL;}}
+  int count;
+  char*  string;
+  char*  token;
+  int    iline;
+  char** list  = NULL;
+  int    nline = 0;
+
+  if(a_number!=NULL) *a_number      = 0;
+  if( (a_string==NULL) || (*a_string=='\0') )  return NULL;
+  if(a_limiter==NULL) return NULL;
+
+  string = STRDUP(a_string);
+  if(string==NULL) return NULL;
+
+  nline = 16;
+  list = (char**)malloc(nline*sizeof(char*));
+  if(list==NULL) return NULL;
+  iline = 0;
+
+  token = string;
+  while(1) { 
+    char* pos;
+    pos = strstr (token,a_limiter);
+    if(pos!=NULL) {
+      *pos = '\0';
+      if(*token!='\0') {
+	if(iline>=nline) { 
+	  nline    +=16;
+	  list      = (char**)realloc(list,nline*sizeof(char*));
+	  if(list==NULL) return NULL;
+	}
+	list[iline]      = token;
+	iline++;
+      }
+      token = pos + strlen(a_limiter);          
+    } else { /*last word*/
+      if(*token!='\0') {
+	if(iline>=nline) {
+	  nline    += 16;
+	  list      = (char**)realloc(list,nline*sizeof(char*));
+	  if(list==NULL) return NULL;
+	}
+	list[iline]      = token;
+	iline++;
+      }
+      break;
+    }
+  }
+  
+  for(count=0;count<iline;count++) list[count] = STRDUP(list[count]);
+  STRDEL(string);
+
+  if(iline==0)  {
+    if(list) free(list);
+    if(a_number!=NULL) *a_number = 0;
+    return             NULL;
+  } else {
+    if(a_number!=NULL) *a_number = iline;
+    return             list;
+  }
+}
Index: /snovis/trunk/obuild/meta_setup.csh
===================================================================
--- /snovis/trunk/obuild/meta_setup.csh	(revision 100)
+++ /snovis/trunk/obuild/meta_setup.csh	(revision 100)
@@ -0,0 +1,10 @@
+
+set osc_home="/Users/barrand/dev/OpenScientist/head dev"
+
+# obuild :
+setenv PATH "${PATH}:${osc_home}/obuild/v1r0/`uname`_obuild"
+setenv OBUILD_PATH "${osc_home}"
+
+alias 2osc 'cd "${osc_home}"'
+alias bld "./sh/build"
+
Index: /snovis/trunk/obuild/setup.bat
===================================================================
--- /snovis/trunk/obuild/setup.bat	(revision 100)
+++ /snovis/trunk/obuild/setup.bat	(revision 100)
@@ -0,0 +1,160 @@
+@ECHO OFF
+
+REM #
+REM # File produced by the obuild tool version 1.0
+REM # for the package snovis with version v1r0.
+REM #
+
+REM #////////////////////////////////////////////////
+REM # Usage :
+REM #   DOS> setup
+REM # or :
+REM #   DOS> setup.bat
+REM # or :
+REM #   DOS> call setup.bat
+REM #////////////////////////////////////////////////
+
+SET obuild_snovis_path=%~dp0
+REM # Remove ending \obuild\
+SET obuild_snovis_path=%obuild_snovis_path:~0,-8%
+
+IF "%OBUILD_PLATFORM%" == "" (
+  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
+  SET obuild_platform=%OS%
+) ELSE (
+  SET obuild_platform=%OBUILD_PLATFORM%
+)
+
+IF "%obuild_platform%" == "" (
+  ECHO obuild_platform variable not defined.
+  GOTO obuild_return
+)
+
+IF "%OBUILD_DIR_BIN%" == "" (
+  SET obuild_dir_bin=%obuild_platform%_obuild
+) ELSE (
+  SET obuild_dir_bin=%OBUILD_DIR_BIN%
+)
+
+IF "%obuild_dir_bin%" == "" (
+  ECHO obuild_dir_bin variable not defined.
+  GOTO obuild_return
+)
+
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
+  IF EXIST obuild_platform.obj DEL obuild_platform.obj
+)
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
+:end_if_platform_1
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
+SET bhep_platform=Darwin
+:end_if_platform_3
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
+SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
+:end_if_platform_5
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
+SET snova_platform=Darwin
+:end_if_platform_7
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
+SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+:end_if_platform_9
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
+SET Geant4_home=/usr/local/geant4/8.2
+:end_if_platform_11
+SET obuild_platform_result=
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
+  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
+  IF EXIST obuild_find.obj DEL obuild_find.obj
+)
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
+
+REM # Execute setup of used packages :
+IF NOT EXIST "%obuild_OnX_path%\obuild\setup.bat"  ECHO setup.bat not found for package OnX.  && GOTO obuild_return
+CALL "%obuild_OnX_path%\obuild\setup.bat"
+@ECHO OFF
+
+IF NOT EXIST "%obuild_G4Lab_path%\obuild\setup.bat"  ECHO setup.bat not found for package G4Lab.  && GOTO obuild_return
+CALL "%obuild_G4Lab_path%\obuild\setup.bat"
+@ECHO OFF
+
+REM # Set environment variables of this package :
+SET SNOVISROOT=%obuild_snovis_path%
+SET G4RADIOACTIVEDATA=%Geant4_home%\data\RadiativeDecay3.1
+SET G4LEVELGAMMADATA=%Geant4_home%\data\PhotonEvaporation2.0
+SET G4LEDATA=%Geant4_home%\data\G4EMLOW4.2
+SET NeutronHPCrossSections=%Geant4_home%\data\G4NDL3.10
+
+IF DEFINED PATH GOTO else_if_path_snovis_17
+  SET PATH=%obuild_snovis_path%\%obuild_dir_bin%
+  GOTO end_if_path_snovis_17
+:else_if_path_snovis_17
+  SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin%
+:end_if_path_snovis_17
+
+:obuild_return
+
+SET obuild_snovis_path=
+
+REM # FIXME SET obuild_platform=
+REM # FIXME SET obuild_dir_bin=
+
+@ECHO ON
Index: /snovis/trunk/obuild/setup.csh
===================================================================
--- /snovis/trunk/obuild/setup.csh	(revision 100)
+++ /snovis/trunk/obuild/setup.csh	(revision 100)
@@ -0,0 +1,329 @@
+#!/bin/csh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   csh> source setup.csh
+#////////////////////////////////////////////////
+
+#set verbose  # uncomment this line to have full verbosity.
+
+#////////////////////////////////////////////////
+# Set the absolute path of this package.
+# If in the below line there is the keyword :
+#
+#     @@absolute_dir@@
+#
+# then the package had not been installed.
+#
+#  Someone has to replace @@absolute_dir@@
+# by the absolute path of the package.
+# By "absolute path of the package", we mean that
+# if the obuild directory of the package is 
+# found under :
+#    some_path/pack/vers/obuild
+# then the "absolute path of the package" is :
+#    some_path/pack/vers
+#
+#  This replacement can be done on the setup
+# scripts of the package by using the sh/build 
+# with the -i option.
+#
+#  This replacement can be done recursively
+# on the setups of the used packages by using 
+# the sh/build script with the -bci option 
+# ("bci" for broadcast install).
+#
+#////////////////////////////////////////////////
+
+set obuild_snovis_path="@@absolute_dir@@"
+
+
+if ( "${obuild_snovis_path}" == '@@absolute_dir@@' ) then
+  echo '  The package snovis had not been installed.'
+  echo ''
+  echo ' In the file :'
+  echo '    snovis/<vers>/obuild/setup.csh'
+  echo ' someone has to replace '
+  echo '    @@absolute_dir@@'
+  echo ' by the absolute path of the package.'
+  echo '  By "absolute path of the package", we mean that'
+  echo ' if the obuild directory of the package is found under :'
+  echo '    some_path/pack/vers/obuild'
+  echo ' then the "absolute path of the package" is :'
+  echo '    some_path/pack/vers'
+  echo ''
+  echo '  If having the write access, this replacement can be done'
+  echo ' on the setup scripts of the package by using the sh/build'
+  echo ' with the -i option. This replacement can be done recursively'
+  echo ' on the setups of the used packages by using the sh/build script'
+  echo ' with the -bci option ("bci" for broadcast install).'
+  echo ''
+  exit
+endif
+
+if ( $?OBUILD_PLATFORM ) then
+  if ( "${OBUILD_PLATFORM}" == "" ) then
+    set obuild_platform=`uname`
+  else
+    set obuild_platform=${OBUILD_PLATFORM}
+  endif
+else
+  set obuild_platform=`uname`
+endif
+
+if ( "${obuild_platform}" == "" ) then
+  echo "obuild_platform variable not defined."
+  exit
+endif
+
+if ( $?OBUILD_DIR_BIN ) then
+  if (  "${OBUILD_DIR_BIN}" == "" ) then
+    set obuild_dir_bin=${obuild_platform}_obuild
+  else
+    set obuild_dir_bin=${OBUILD_DIR_BIN}
+  endif
+else
+  set obuild_dir_bin=${obuild_platform}_obuild
+endif
+
+if ( "${obuild_dir_bin}" == "" ) then
+  echo "obuild_dir_bin variable not defined."
+  exit
+endif
+
+if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ) then
+  if ( ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ) then
+    echo "Program source obuild_platform.cpp not found."
+    exit
+  endif
+  if ( $?obuild_cxx_command ) then
+    if ( "${obuild_cxx_command}" == "" ) then
+      if (  $?OBUILD_CXX ) then
+        set obuild_platform_compiler=${OBUILD_CXX}
+      else
+        set obuild_platform_compiler=c++
+      endif
+    else
+      set obuild_platform_compiler=${obuild_cxx_command}
+    endif
+  else
+    set obuild_platform_compiler=c++
+  endif
+  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
+  unset obuild_platform_compiler
+  if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ) then
+    echo "Program obuild_platform not found."
+    exit
+  endif
+endif
+set obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
+if ( ${obuild_platform_result} == yes ) then
+set bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
+endif
+unset obuild_platform_result
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+set bhep_platform="Darwin"
+endif
+unset obuild_platform_result
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
+if ( ${obuild_platform_result} == yes ) then
+set snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
+endif
+unset obuild_platform_result
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+set snova_platform="Darwin"
+endif
+unset obuild_platform_result
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
+if ( ${obuild_platform_result} == yes ) then
+set CLHEP_home="/usr/local/CLHEP/2.0.3.1"
+endif
+unset obuild_platform_result
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} UNIX`
+if ( ${obuild_platform_result} == yes ) then
+set Geant4_home="/usr/local/geant4/8.2"
+endif
+unset obuild_platform_result
+if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
+  if ( ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ) then
+    echo "Program source obuild_find.cpp not found."
+    exit
+  endif
+  if ( $?obuild_cxx_command ) then
+    if ( "${obuild_cxx_command}" == "" ) then
+      if (  $?OBUILD_CXX ) then
+        set obuild_find_compiler=${OBUILD_CXX}
+      else
+        set obuild_find_compiler=c++
+      endif
+    else
+      set obuild_find_compiler=${obuild_cxx_command}
+    endif
+  else
+    set obuild_find_compiler=c++
+  endif
+  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
+  unset obuild_find_compiler
+  if ( ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ) then
+    echo "Program obuild_find not found."
+    exit
+  endif
+endif
+set obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+if ( "${obuild_find_exe}" == "" ) then
+  echo "Variable obuild_find_exe not defined."
+  exit
+endif
+set obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
+if ( "${obuild_find_exe}" == "" ) then
+  echo "Variable obuild_find_exe not defined."
+  exit
+endif
+set obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+
+# Execute setup of used packages :
+source "${obuild_OnX_path}/obuild/setup.csh"
+
+source "${obuild_G4Lab_path}/obuild/setup.csh"
+
+# Set environment variables of this package :
+setenv SNOVISROOT "${obuild_snovis_path}"
+setenv G4RADIOACTIVEDATA "${Geant4_home}/data/RadiativeDecay3.1"
+setenv G4LEVELGAMMADATA "${Geant4_home}/data/PhotonEvaporation2.0"
+setenv G4LEDATA "${Geant4_home}/data/G4EMLOW4.2"
+setenv NeutronHPCrossSections "${Geant4_home}/data/G4NDL3.10"
+
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+  if (  $?DYLD_LIBRARY_PATH ) then
+    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${bhep_home}/Darwin"
+  else
+    setenv DYLD_LIBRARY_PATH "${bhep_home}/Darwin"
+  endif
+endif
+unset obuild_platform_result
+else
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+  if (  $?LD_LIBRARY_PATH ) then
+    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${bhep_home}/Darwin"
+  else
+    setenv LD_LIBRARY_PATH "${bhep_home}/Darwin"
+  endif
+endif
+unset obuild_platform_result
+endif
+unset obuild_platform_result
+
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+  if (  $?DYLD_LIBRARY_PATH ) then
+    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${snova_home}/Darwin"
+  else
+    setenv DYLD_LIBRARY_PATH "${snova_home}/Darwin"
+  endif
+endif
+unset obuild_platform_result
+else
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+  if (  $?LD_LIBRARY_PATH ) then
+    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${snova_home}/Darwin"
+  else
+    setenv LD_LIBRARY_PATH "${snova_home}/Darwin"
+  endif
+endif
+unset obuild_platform_result
+endif
+unset obuild_platform_result
+
+if ( "${obuild_platform_exe}" == "" ) then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+endif
+set obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} Darwin`
+if ( ${obuild_platform_result} == yes ) then
+  if (  $?DYLD_LIBRARY_PATH ) then
+    setenv DYLD_LIBRARY_PATH "${DYLD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
+  else
+    setenv DYLD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
+  endif
+else
+  if (  $?LD_LIBRARY_PATH ) then
+    setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
+  else
+    setenv LD_LIBRARY_PATH "${obuild_snovis_path}/${obuild_dir_bin}"
+  endif
+endif
+unset obuild_platform_result
+
+if (  $?PATH ) then
+  setenv PATH "${PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
+else
+  setenv PATH "${obuild_snovis_path}/${obuild_dir_bin}"
+endif
+
+unset obuild_snovis_path
+
+#FIXME unset obuild_platform
+#FIXME unset obuild_dir_bin
Index: /snovis/trunk/obuild/setup.sh
===================================================================
--- /snovis/trunk/obuild/setup.sh	(revision 100)
+++ /snovis/trunk/obuild/setup.sh	(revision 100)
@@ -0,0 +1,346 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   sh> . setup.sh
+#////////////////////////////////////////////////
+
+#set -x  # uncomment this line to have full verbosity.
+
+#////////////////////////////////////////////////
+# Set the absolute path of this package.
+# If in the below line there is the keyword :
+#
+#     @@absolute_dir@@
+#
+# then the package had not been installed.
+#
+#  Someone has to replace @@absolute_dir@@
+# by the absolute path of the package.
+# By "absolute path of the package", we mean that
+# if the obuild directory of the package is 
+# found under :
+#    some_path/pack/vers/obuild
+# then the "absolute path of the package" is :
+#    some_path/pack/vers
+#
+#  This replacement can be done on the setup
+# scripts of the package by using the sh/build 
+# with the -i option.
+#
+#  This replacement can be done recursively
+# on the setups of the used packages by using 
+# the sh/build script with the -bci option 
+# ("bci" for broadcast install).
+#
+#////////////////////////////////////////////////
+
+obuild_snovis_path="@@absolute_dir@@"
+
+if [ "${obuild_snovis_path}" = '@@absolute_dir@@' ] ; then
+  echo '  The package snovis had not been installed.'
+  echo ''
+  echo ' In the file :'
+  echo '    snovis/<vers>/obuild/setup.sh'
+  echo ' someone has to replace '
+  echo '    @@absolute_dir@@'
+  echo ' by the absolute path of the package.'
+  echo '  By "absolute path of the package", we mean that'
+  echo ' if the obuild directory of the package is found under :'
+  echo '    some_path/pack/vers/obuild'
+  echo ' then the "absolute path of the package" is :'
+  echo '    some_path/pack/vers'
+  echo ''
+  echo '  If having the write access, this replacement can be done'
+  echo ' on the setup scripts of the package by using the sh/build'
+  echo ' with the -i option. This replacement can be done recursively'
+  echo ' on the setups of the used packages by using the sh/build script'
+  echo ' with the -bci option ("bci" for broadcast install).'
+  echo ''
+  return
+fi
+
+if [  "${OBUILD_PLATFORM}" = "" ] ; then
+  obuild_platform=`uname`
+else
+  obuild_platform=${OBUILD_PLATFORM}
+fi
+
+if [ "${obuild_platform}" = "" ] ; then
+  echo "obuild_platform variable not defined."
+  return
+fi
+
+if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+  obuild_dir_bin=${obuild_platform}_obuild
+else
+  obuild_dir_bin=${OBUILD_DIR_BIN}
+fi
+
+if [ "${obuild_dir_bin}" = "" ] ; then
+  echo "obuild_dir_bin variable not defined."
+  return
+fi
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
+    echo "Program source obuild_platform.cpp not found."
+    return
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then 
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_platform_compiler=${OBUILD_CXX}
+    else
+      obuild_platform_compiler=c++ 
+    fi
+  else
+    obuild_platform_compiler=${obuild_cxx_command} 
+  fi
+  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
+  unset obuild_platform_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+    echo "Program obuild_platform not found."
+    return
+  fi
+fi
+obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+CLHEP_home="/usr/local/CLHEP/2.0.3.1"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+Geant4_home="/usr/local/geant4/8.2"
+fi
+unset obuild_platform_result
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
+    echo "Program source obuild_find.cpp not found."
+    return
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_find_compiler=${OBUILD_CXX}
+    else
+      obuild_find_compiler=c++
+    fi
+  else
+    obuild_find_compiler=${obuild_cxx_command}
+  fi
+  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
+  unset obuild_find_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+    echo "Program obuild_find not found."
+    return
+  fi
+fi
+obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  return
+fi
+obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
+if [ "${obuild_OnX_path}" = "" ] ; then
+  echo "Can't find OnX package."
+  return
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  return
+fi
+obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+if [ "${obuild_G4Lab_path}" = "" ] ; then
+  echo "Can't find G4Lab package."
+  return
+fi
+
+# Execute setup of used packages :
+if [ ! -e "${obuild_OnX_path}/obuild/setup.sh" ] ; then
+  echo "setup.sh not found for package OnX."
+  return
+fi
+. "${obuild_OnX_path}/obuild/setup.sh"
+
+if [ ! -e "${obuild_G4Lab_path}/obuild/setup.sh" ] ; then
+  echo "setup.sh not found for package G4Lab."
+  return
+fi
+. "${obuild_G4Lab_path}/obuild/setup.sh"
+
+# Set environment variables of this package :
+SNOVISROOT="${obuild_snovis_path}"
+export SNOVISROOT
+G4RADIOACTIVEDATA="${Geant4_home}/data/RadiativeDecay3.1"
+export G4RADIOACTIVEDATA
+G4LEVELGAMMADATA="${Geant4_home}/data/PhotonEvaporation2.0"
+export G4LEVELGAMMADATA
+G4LEDATA="${Geant4_home}/data/G4EMLOW4.2"
+export G4LEDATA
+NeutronHPCrossSections="${Geant4_home}/data/G4NDL3.10"
+export NeutronHPCrossSections
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+  if [  "${DYLD_LIBRARY_PATH}" = "" ] ; then
+    DYLD_LIBRARY_PATH="${bhep_home}/Darwin"
+    export DYLD_LIBRARY_PATH
+  else
+    DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${bhep_home}/Darwin"
+    export DYLD_LIBRARY_PATH
+  fi
+fi
+unset obuild_platform_result
+else
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+  if [  "${LD_LIBRARY_PATH}" = "" ] ; then
+    LD_LIBRARY_PATH="${bhep_home}/Darwin"
+    export LD_LIBRARY_PATH
+  else
+    LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${bhep_home}/Darwin"
+    export LD_LIBRARY_PATH
+  fi
+fi
+unset obuild_platform_result
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+  if [  "${DYLD_LIBRARY_PATH}" = "" ] ; then
+    DYLD_LIBRARY_PATH="${snova_home}/Darwin"
+    export DYLD_LIBRARY_PATH
+  else
+    DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${snova_home}/Darwin"
+    export DYLD_LIBRARY_PATH
+  fi
+fi
+unset obuild_platform_result
+else
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+  if [  "${LD_LIBRARY_PATH}" = "" ] ; then
+    LD_LIBRARY_PATH="${snova_home}/Darwin"
+    export LD_LIBRARY_PATH
+  else
+    LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${snova_home}/Darwin"
+    export LD_LIBRARY_PATH
+  fi
+fi
+unset obuild_platform_result
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  return
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+  if [  "${DYLD_LIBRARY_PATH}" = "" ] ; then
+    DYLD_LIBRARY_PATH="${obuild_snovis_path}/${obuild_dir_bin}"
+    export DYLD_LIBRARY_PATH
+  else
+    DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
+    export DYLD_LIBRARY_PATH
+  fi
+else
+  if [  "${LD_LIBRARY_PATH}" = "" ] ; then
+    LD_LIBRARY_PATH="${obuild_snovis_path}/${obuild_dir_bin}"
+    export LD_LIBRARY_PATH
+  else
+    LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
+    export LD_LIBRARY_PATH
+  fi
+fi
+unset obuild_platform_result
+
+if [  "${PATH}" = "" ] ; then
+  PATH="${obuild_snovis_path}/${obuild_dir_bin}"
+  export PATH
+else
+  PATH="${PATH}:${obuild_snovis_path}/${obuild_dir_bin}"
+  export PATH
+fi
+unset obuild_snovis_path
+
+#FIXME unset obuild_platform
+#FIXME unset obuild_dir_bin
Index: /snovis/trunk/obuild/sh/broadcast_install
===================================================================
--- /snovis/trunk/obuild/sh/broadcast_install	(revision 100)
+++ /snovis/trunk/obuild/sh/broadcast_install	(revision 100)
@@ -0,0 +1,128 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/broadcast_install )
+#   UNIX> sh/broadcast_install
+#
+#////////////////////////////////////////////////
+
+obuild_args="$*"
+
+obuild_verbose=no
+
+obuild_set_x=no
+while test $# -ge 1 ; do
+  case $1 in
+    -v) obuild_verbose=yes ;;
+    -x) obuild_set_x=yes ;;
+    *) echo "unknown option : $1";exit ;;
+  esac
+  shift
+done
+
+if [ ${obuild_set_x} = yes ] ; then
+  set -x
+fi
+
+# Binary directory is needed to create the obuild_find program.
+
+if [  "${OBUILD_PLATFORM}" = "" ] ; then
+  obuild_platform=`uname`
+else
+  obuild_platform=${OBUILD_PLATFORM}
+fi
+
+if [ "${obuild_platform}" = "" ] ; then
+  echo "obuild_platform variable not defined."
+  exit
+fi
+
+if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+  obuild_dir_bin=${obuild_platform}_obuild
+else
+  obuild_dir_bin=${OBUILD_DIR_BIN}
+fi
+
+if [ "${obuild_dir_bin}" = "" ] ; then
+  echo "obuild_dir_bin variable not defined."
+  exit
+fi
+
+obuild_snovis_path=..
+
+# Create the bin directory :
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
+
+if [ ! -e "${obuild_snovis_path}/obuild/sh/install" ] ; then
+  echo "install script not found for package snovis."
+  exit
+fi
+if [ ${obuild_verbose} = yes ] ; then
+  echo "install setups of snovis"...
+fi
+cd "${obuild_snovis_path}/obuild"
+./sh/install
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
+    echo "Program source obuild_find.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_find_compiler=${OBUILD_CXX}
+    else
+      obuild_find_compiler=c++
+    fi
+  else
+    obuild_find_compiler=${obuild_cxx_command}
+  fi
+  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
+  unset obuild_find_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+    echo "Program obuild_find not found."
+    exit
+  fi
+fi
+obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
+if [ "${obuild_OnX_path}" = "" ] ; then
+  echo "Can't find OnX package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+if [ "${obuild_G4Lab_path}" = "" ] ; then
+  echo "Can't find G4Lab package."
+  exit
+fi
+
+# install setup scripts of used packages :
+if [ ! -e "${obuild_OnX_path}/obuild/sh/broadcast_install" ] ; then
+  echo "broadcast_install script not found for package OnX."
+  exit
+fi
+cd "${obuild_OnX_path}/obuild"
+./sh/broadcast_install ${obuild_args}
+
+if [ ! -e "${obuild_G4Lab_path}/obuild/sh/broadcast_install" ] ; then
+  echo "broadcast_install script not found for package G4Lab."
+  exit
+fi
+cd "${obuild_G4Lab_path}/obuild"
+./sh/broadcast_install ${obuild_args}
+
Index: /snovis/trunk/obuild/sh/build
===================================================================
--- /snovis/trunk/obuild/sh/build	(revision 100)
+++ /snovis/trunk/obuild/sh/build	(revision 100)
@@ -0,0 +1,146 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/build )
+#   UNIX> sh/build
+#
+#////////////////////////////////////////////////
+
+#obuild_args="$*"
+
+obuild_verbose=no
+obuild_debug=no
+obuild_set_x=no
+obuild_erase_dir_bin=no
+obuild_do_mains=yes
+obuild_group=main
+
+obuild_args=""
+while test $# -ge 1 ; do
+  case $1 in
+    -h) 
+        echo "Usage :"
+        echo "  UNIX> sh/build [Options] [Target]"
+        echo "Options :"
+        echo "  -v : verbose."
+        echo "  -g : build in debug mode."
+        echo "  -i : install setup scripts."
+        echo "  -bci : broadacst install setup scripts."
+        echo "  -e : erase binary directory."
+        echo "  -x : execute with set -x."
+        echo "  -l : link only, do not (re)compile."
+        echo "  -k : do not erase result of compilations (.o, .obj)."
+        echo "  -nm : build the not-main components."
+        echo "  -group group : build the given group of components."
+        echo "Target :"
+        echo "  If no option is specify and a ending"
+        echo " string is given ; this string is given"
+        echo " to a find command of the form :"
+        echo '    find ./sh -name "*target*" -exec {} \;'
+        echo " in order to execute selected scripts under"
+        echo " the sh directory."
+        echo "Examples :"
+        echo "  UNIX> sh/build app"
+        echo "  UNIX> sh/build -v _lib"
+        echo "  UNIX> sh/build -v -g dll_"
+        echo ""
+        exit ;;
+    -v) obuild_verbose=yes;obuild_args="${obuild_args} $1" ;;
+    -g) obuild_debug=yes;obuild_args="${obuild_args} $1" ;;
+    -i) ./sh/install; exit ;;
+    -bci) if [ ! -e ./sh/broadcast_install ] ; then 
+            echo "Nothing to do for this package." 
+            exit
+          fi
+          ./sh/broadcast_install ${obuild_args}
+          exit ;;
+    -x) obuild_set_x=yes;obuild_args="${obuild_args} $1" ;;
+    -l) obuild_args="${obuild_args} $1" ;;
+    -k) obuild_args="${obuild_args} $1" ;;
+    -e) obuild_erase_dir_bin=yes ;;
+    -nm) obuild_do_mains=no ;;
+    -group) shift
+        if [ $# != 0 ] ; then
+          obuild_group=$1 
+        else         
+          echo "give a group name after the -group option."
+          exit 
+        fi ;;
+    -*) echo "unknwon option : $1" ; exit ;;
+     *) if [ $# = 1 ] ; then
+          find ./sh -name "*$1*" -exec {} ${obuild_args} \;
+        else         
+          echo "unknwon option : $1"
+        fi
+        exit ;;
+  esac
+  shift
+done
+
+if [ ${obuild_set_x} = yes ] ; then
+  set -x
+fi
+
+if [ ${obuild_erase_dir_bin} = "yes" ] ; then
+  if [  "${OBUILD_PLATFORM}" = "" ] ; then
+    obuild_platform=`uname`
+  else
+    obuild_platform=${OBUILD_PLATFORM}
+  fi
+  if [ "${obuild_platform}" = "" ] ; then
+    echo "obuild_platform variable not defined."
+    exit
+  fi
+  if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+    obuild_dir_bin=${obuild_platform}_obuild
+  else
+    obuild_dir_bin=${OBUILD_DIR_BIN}
+  fi
+  if [ "${obuild_dir_bin}" = "" ] ; then
+    echo "obuild_dir_bin variable not defined."
+    exit
+  fi
+  obuild_pwd=`pwd`
+  obuild_snovis_path=`dirname "${obuild_pwd}"`
+  unset obuild_pwd
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}"
+  exit  
+fi
+
+if [ "${obuild_group}" = main ] ; then
+if [ "${obuild_do_mains}" = yes ] ; then
+  if [ -e ./sh/build_dll_snovis ] ; then
+    ./sh/build_dll_snovis ${obuild_args}
+    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+  fi
+fi
+fi
+
+if [ "${obuild_group}" = main ] ; then
+if [ "${obuild_do_mains}" = yes ] ; then
+  if [ -e ./sh/build_app_prog_snova ] ; then
+    ./sh/build_app_prog_snova ${obuild_args}
+    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+  fi
+fi
+fi
+if [ "${obuild_group}" = main ] ; then
+if [ "${obuild_do_mains}" = yes ] ; then
+  if [ -e ./sh/build_app_snovis_session ] ; then
+    ./sh/build_app_snovis_session ${obuild_args}
+    obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+  fi
+fi
+fi
+
+if [ -e ./sh/install ] ; then
+  ./sh/install
+fi
+
Index: /snovis/trunk/obuild/sh/build_app_prog_snova
===================================================================
--- /snovis/trunk/obuild/sh/build_app_prog_snova	(revision 100)
+++ /snovis/trunk/obuild/sh/build_app_prog_snova	(revision 100)
@@ -0,0 +1,579 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/build_prog_snova )
+#   UNIX> sh/build_prog_snova
+#
+#////////////////////////////////////////////////
+
+obuild_verbose=no
+obuild_debug=no
+obuild_optimize=yes
+obuild_do_not_compile=no
+obuild_dir_bin_o_cleanup=yes
+
+obuild_set_x=no
+while test $# -ge 1 ; do
+  case $1 in
+    -h) 
+        echo "Options :"
+        echo "  -v : verbose."
+        echo "  -d : build in debug mode."
+        echo "  -g : build in debug mode."
+        echo "  -x : execute script with set -x."
+        echo "  -l : link only, do not (re)compile."
+        echo "  -k : do not remove result of compilations (.o, .obj)."
+        echo ""
+        exit ;;
+    -v) obuild_verbose=yes ;;
+    -x) obuild_set_x=yes ;;
+    -d) obuild_debug=yes ;;
+    -g) obuild_debug=yes ;;
+    -l) obuild_do_not_compile=yes ;;
+    -k) obuild_dir_bin_o_cleanup=no ;;
+    *) echo "unknown option : $1";exit ;;
+  esac
+  shift
+done
+
+if [ ${obuild_set_x} = yes ] ; then
+  set -x
+fi
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_optimize=no
+fi
+
+if [  "${OBUILD_PLATFORM}" = "" ] ; then
+  obuild_platform=`uname`
+else
+  obuild_platform=${OBUILD_PLATFORM}
+fi
+
+if [ "${obuild_platform}" = "" ] ; then
+  echo "obuild_platform variable not defined."
+  exit
+fi
+
+if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+  obuild_dir_bin=${obuild_platform}_obuild
+else
+  obuild_dir_bin=${OBUILD_DIR_BIN}
+fi
+
+if [ "${obuild_dir_bin}" = "" ] ; then
+  echo "obuild_dir_bin variable not defined."
+  exit
+fi
+
+obuild_pwd=`pwd`
+obuild_snovis_path=`dirname "${obuild_pwd}"`
+unset obuild_pwd
+
+# Create the bin directory :
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
+    echo "Program source obuild_platform.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then 
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_platform_compiler=${OBUILD_CXX}
+    else
+      obuild_platform_compiler=c++ 
+    fi
+  else
+    obuild_platform_compiler=${obuild_cxx_command} 
+  fi
+  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
+  unset obuild_platform_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+    echo "Program obuild_platform not found."
+    exit
+  fi
+fi
+obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+CLHEP_home="/usr/local/CLHEP/2.0.3.1"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+Geant4_home="/usr/local/geant4/8.2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="cxx"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="cl.exe"
+fi
+unset obuild_platform_result
+if [ "${obuild_cxx_command}" = "" ] ; then
+  echo "Variable obuild_cxx_command not defined."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="/O2"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="/ZI /Od"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_options="-fPIC"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_options="/nologo /DWIN32 /MD /GX /GR /W3"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_cxx_debug_local=${obuild_cxx_debug}
+else
+  obuild_cxx_debug_local=
+fi
+
+if [ ${obuild_optimize} = yes ] ; then
+  obuild_cxx_optimize_local=${obuild_cxx_optimize}
+else
+  obuild_cxx_optimize_local=
+fi
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
+    echo "Program source obuild_find.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_find_compiler=${OBUILD_CXX}
+    else
+      obuild_find_compiler=c++
+    fi
+  else
+    obuild_find_compiler=${obuild_cxx_command}
+  fi
+  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
+  unset obuild_find_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+    echo "Program obuild_find not found."
+    exit
+  fi
+fi
+obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'`
+if [ "${obuild_HDF5_path}" = "" ] ; then
+  echo "Can't find HDF5 package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'`
+if [ "${obuild_HDF5_path}" = "" ] ; then
+  echo "Can't find HDF5 package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_zlib_path=`"${obuild_find_exe}" zlib 'v1r*'`
+if [ "${obuild_zlib_path}" = "" ] ; then
+  echo "Can't find zlib package."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="-I${snova_home}"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/GeomUtils/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/SNgeom2/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/SNvertex/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${bhep_home}"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${CLHEP_home}/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${Geant4_home}/include"
+fi
+unset obuild_platform_result
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_HDF5_path}/include\""
+
+if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/app_prog_snova"
+fi
+
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/app_prog_snova"
+
+# Compile prog_snova files :
+if [ ${obuild_do_not_compile} = no ] ; then
+
+if [ ${obuild_verbose} = yes ] ; then set -x;fi
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+ eval ${obuild_cxx_command} -c ${obuild_cxx_debug_local} ${obuild_cxx_optimize_local} ${obuild_cxx_options} ${obuild_cxx_macros} ${obuild_cxx_includes} -o ./app_prog_snova/prog_snova2.o \"../applications/prog_snova2.cxx\"
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+cd "${obuild_snovis_path}/obuild"
+
+if [ ${obuild_verbose} = yes ] ; then set +x;fi
+
+fi #do_not_compile
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="cxx"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="link.exe"
+fi
+unset obuild_platform_result
+if [ "${obuild_cxx_linker_command}" = "" ] ; then
+  echo "Variable obuild_cxx_linker_command not defined."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="/DEBUG"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_options="/nologo"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_cxx_linker_debug_local=${obuild_cxx_linker_debug}
+else
+  obuild_cxx_linker_debug_local=
+fi
+
+if [ ${obuild_optimize} = yes ] ; then
+  obuild_cxx_linker_optimize_local=${obuild_cxx_linker_optimize}
+else
+  obuild_cxx_linker_optimize_local=
+fi
+obuild_linked_libraries="-L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils"
+obuild_linked_libraries="${obuild_linked_libraries} -L${bhep_home}/Darwin -lbhep"
+obuild_linked_libraries="${obuild_linked_libraries} -L${Geant4_home}/lib -lG4interfaces"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L${Geant4_home}/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L${CLHEP_home}/lib -lCLHEP"
+fi
+unset obuild_platform_result
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HDF5_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_HDF5"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_zlib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_z"
+
+# Link prog_snova :
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+obuild_objs=`find ./app_prog_snova -name '*.o' -print`
+/bin/rm -f ./prog_snova
+if [ ${obuild_verbose} = yes ] ; then set -x;fi
+ eval ${obuild_cxx_linker_command} ${obuild_cxx_linker_debug_local} ${obuild_cxx_linker_optimize_local} ${obuild_cxx_linker_options} -o \"${obuild_snovis_path}/${obuild_dir_bin}/prog_snova\" ${obuild_objs} ${obuild_linked_paths} ${obuild_linked_libraries}
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+if [ ${obuild_verbose} = yes ] ; then set +x;fi
+cd "${obuild_snovis_path}/obuild"
+
+# Some cleanup :
+if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/app_prog_snova"
+fi
+/bin/rm -f "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+
Index: /snovis/trunk/obuild/sh/build_app_snovis_session
===================================================================
--- /snovis/trunk/obuild/sh/build_app_snovis_session	(revision 100)
+++ /snovis/trunk/obuild/sh/build_app_snovis_session	(revision 100)
@@ -0,0 +1,815 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/build_snovis_session )
+#   UNIX> sh/build_snovis_session
+#
+#////////////////////////////////////////////////
+
+obuild_verbose=no
+obuild_debug=no
+obuild_optimize=yes
+obuild_do_not_compile=no
+obuild_dir_bin_o_cleanup=yes
+
+obuild_set_x=no
+while test $# -ge 1 ; do
+  case $1 in
+    -h) 
+        echo "Options :"
+        echo "  -v : verbose."
+        echo "  -d : build in debug mode."
+        echo "  -g : build in debug mode."
+        echo "  -x : execute script with set -x."
+        echo "  -l : link only, do not (re)compile."
+        echo "  -k : do not remove result of compilations (.o, .obj)."
+        echo ""
+        exit ;;
+    -v) obuild_verbose=yes ;;
+    -x) obuild_set_x=yes ;;
+    -d) obuild_debug=yes ;;
+    -g) obuild_debug=yes ;;
+    -l) obuild_do_not_compile=yes ;;
+    -k) obuild_dir_bin_o_cleanup=no ;;
+    *) echo "unknown option : $1";exit ;;
+  esac
+  shift
+done
+
+if [ ${obuild_set_x} = yes ] ; then
+  set -x
+fi
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_optimize=no
+fi
+
+if [  "${OBUILD_PLATFORM}" = "" ] ; then
+  obuild_platform=`uname`
+else
+  obuild_platform=${OBUILD_PLATFORM}
+fi
+
+if [ "${obuild_platform}" = "" ] ; then
+  echo "obuild_platform variable not defined."
+  exit
+fi
+
+if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+  obuild_dir_bin=${obuild_platform}_obuild
+else
+  obuild_dir_bin=${OBUILD_DIR_BIN}
+fi
+
+if [ "${obuild_dir_bin}" = "" ] ; then
+  echo "obuild_dir_bin variable not defined."
+  exit
+fi
+
+obuild_pwd=`pwd`
+obuild_snovis_path=`dirname "${obuild_pwd}"`
+unset obuild_pwd
+
+# Create the bin directory :
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
+    echo "Program source obuild_platform.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then 
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_platform_compiler=${OBUILD_CXX}
+    else
+      obuild_platform_compiler=c++ 
+    fi
+  else
+    obuild_platform_compiler=${obuild_cxx_command} 
+  fi
+  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
+  unset obuild_platform_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+    echo "Program obuild_platform not found."
+    exit
+  fi
+fi
+obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+CLHEP_home="/usr/local/CLHEP/2.0.3.1"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+Geant4_home="/usr/local/geant4/8.2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="cxx"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="cl.exe"
+fi
+unset obuild_platform_result
+if [ "${obuild_cxx_command}" = "" ] ; then
+  echo "Variable obuild_cxx_command not defined."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="/O2"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="/ZI /Od"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_options="-fPIC"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_options="/nologo /DWIN32 /MD /GX /GR /W3"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_cxx_debug_local=${obuild_cxx_debug}
+else
+  obuild_cxx_debug_local=
+fi
+
+if [ ${obuild_optimize} = yes ] ; then
+  obuild_cxx_optimize_local=${obuild_cxx_optimize}
+else
+  obuild_cxx_optimize_local=
+fi
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
+    echo "Program source obuild_find.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_find_compiler=${OBUILD_CXX}
+    else
+      obuild_find_compiler=c++
+    fi
+  else
+    obuild_find_compiler=${obuild_cxx_command}
+  fi
+  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
+  unset obuild_find_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+    echo "Program obuild_find not found."
+    exit
+  fi
+fi
+obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'`
+if [ "${obuild_HDF5_path}" = "" ] ; then
+  echo "Can't find HDF5 package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_AIDA_path=`"${obuild_find_exe}" AIDA 'v3r2p1'`
+if [ "${obuild_AIDA_path}" = "" ] ; then
+  echo "Can't find AIDA package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+if [ "${obuild_G4Lab_path}" = "" ] ; then
+  echo "Can't find G4Lab package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Slash_path=`"${obuild_find_exe}" Slash 'v1r*'`
+if [ "${obuild_Slash_path}" = "" ] ; then
+  echo "Can't find Slash package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
+if [ "${obuild_OnX_path}" = "" ] ; then
+  echo "Can't find OnX package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'`
+if [ "${obuild_HDF5_path}" = "" ] ; then
+  echo "Can't find HDF5 package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+if [ "${obuild_G4Lab_path}" = "" ] ; then
+  echo "Can't find G4Lab package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+if [ "${obuild_G4Lab_path}" = "" ] ; then
+  echo "Can't find G4Lab package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_expat_path=`"${obuild_find_exe}" expat 'v1r*'`
+if [ "${obuild_expat_path}" = "" ] ; then
+  echo "Can't find expat package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_zlib_path=`"${obuild_find_exe}" zlib 'v1r*'`
+if [ "${obuild_zlib_path}" = "" ] ; then
+  echo "Can't find zlib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'`
+if [ "${obuild_HEPVis_path}" = "" ] ; then
+  echo "Can't find HEPVis package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'`
+if [ "${obuild_HEPVis_path}" = "" ] ; then
+  echo "Can't find HEPVis package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_jpeg_path=`"${obuild_find_exe}" jpeg 'v1r*'`
+if [ "${obuild_jpeg_path}" = "" ] ; then
+  echo "Can't find jpeg package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_dvi2bitmap_path=`"${obuild_find_exe}" dvi2bitmap 'v1r*'`
+if [ "${obuild_dvi2bitmap_path}" = "" ] ; then
+  echo "Can't find dvi2bitmap package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_freetype2_path=`"${obuild_find_exe}" freetype2 'v1r*'`
+if [ "${obuild_freetype2_path}" = "" ] ; then
+  echo "Can't find freetype2 package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_CoinGL_path=`"${obuild_find_exe}" CoinGL 'v1r*'`
+if [ "${obuild_CoinGL_path}" = "" ] ; then
+  echo "Can't find CoinGL package."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="-I${snova_home}"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/GeomUtils/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/SNgeom2/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/SNvertex/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${bhep_home}"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${CLHEP_home}/include"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${Geant4_home}/include"
+fi
+unset obuild_platform_result
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_HDF5_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_AIDA_path}/src/cpp\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_G4Lab_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_Lib_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_Slash_path}\""
+
+if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/app_snovis_session"
+fi
+
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/app_snovis_session"
+
+# Compile snovis_session files :
+if [ ${obuild_do_not_compile} = no ] ; then
+
+if [ ${obuild_verbose} = yes ] ; then set -x;fi
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+ eval ${obuild_cxx_command} -c ${obuild_cxx_debug_local} ${obuild_cxx_optimize_local} ${obuild_cxx_options} ${obuild_cxx_macros} ${obuild_cxx_includes} -o ./app_snovis_session/snovis_session.o \"../applications/snovis_session.cc\"
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+cd "${obuild_snovis_path}/obuild"
+
+if [ ${obuild_verbose} = yes ] ; then set +x;fi
+
+fi #do_not_compile
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="cxx"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_command="link.exe"
+fi
+unset obuild_platform_result
+if [ "${obuild_cxx_linker_command}" = "" ] ; then
+  echo "Variable obuild_cxx_linker_command not defined."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_debug="/DEBUG"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_linker_options="/nologo"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_cxx_linker_debug_local=${obuild_cxx_linker_debug}
+else
+  obuild_cxx_linker_debug_local=
+fi
+
+if [ ${obuild_optimize} = yes ] ; then
+  obuild_cxx_linker_optimize_local=${obuild_cxx_linker_optimize}
+else
+  obuild_cxx_linker_optimize_local=
+fi
+obuild_linked_paths="-L\"${obuild_OnX_path}/${obuild_dir_bin}\""
+obuild_linked_libraries=" -lOnXCore"
+obuild_linked_libraries="${obuild_linked_libraries} -L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils"
+obuild_linked_libraries="${obuild_linked_libraries} -L${bhep_home}/Darwin -lbhep"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HDF5_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_HDF5"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_G4Lab_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lG4LabUIOnX"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_G4Lab_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lG4LabCore"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L${Geant4_home}/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L${CLHEP_home}/lib -lCLHEP"
+fi
+unset obuild_platform_result
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lLibXML"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_expat_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_expat"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lLibZip"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_zlib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_z"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lLibUtils"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HEPVis_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lHEPVisGeometry"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HEPVis_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lHEPVisUtils"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_jpeg_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_jpeg"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_dvi2bitmap_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_dvi2bitmap"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_freetype2_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_freetype2"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_CoinGL_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_Coin"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -framework OpenGL -framework AGL"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -framework ApplicationServices"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L/usr/lib -lGLU -lGL -lm"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} glu32.lib opengl32.lib gdi32.lib user32.lib"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -lpthread"
+fi
+unset obuild_platform_result
+
+# Link snovis_session :
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+obuild_objs=`find ./app_snovis_session -name '*.o' -print`
+/bin/rm -f ./snovis_session
+if [ ${obuild_verbose} = yes ] ; then set -x;fi
+ eval ${obuild_cxx_linker_command} ${obuild_cxx_linker_debug_local} ${obuild_cxx_linker_optimize_local} ${obuild_cxx_linker_options} -o \"${obuild_snovis_path}/${obuild_dir_bin}/snovis_session\" ${obuild_objs} ${obuild_linked_paths} ${obuild_linked_libraries}
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+if [ ${obuild_verbose} = yes ] ; then set +x;fi
+cd "${obuild_snovis_path}/obuild"
+
+# Some cleanup :
+if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/app_snovis_session"
+fi
+/bin/rm -f "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+
Index: /snovis/trunk/obuild/sh/build_dll_snovis
===================================================================
--- /snovis/trunk/obuild/sh/build_dll_snovis	(revision 100)
+++ /snovis/trunk/obuild/sh/build_dll_snovis	(revision 100)
@@ -0,0 +1,766 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/build_snovis )
+#   UNIX> sh/build_snovis
+#
+#////////////////////////////////////////////////
+
+obuild_verbose=no
+obuild_debug=no
+obuild_optimize=yes
+obuild_do_not_compile=no
+obuild_dir_bin_o_cleanup=yes
+
+obuild_set_x=no
+while test $# -ge 1 ; do
+  case $1 in
+    -h) 
+        echo "Options :"
+        echo "  -v : verbose."
+        echo "  -d : build in debug mode."
+        echo "  -g : build in debug mode."
+        echo "  -x : execute script with set -x."
+        echo "  -l : link only, do not (re)compile."
+        echo "  -k : do not remove result of compilations (.o, .obj)."
+        echo ""
+        exit ;;
+    -v) obuild_verbose=yes ;;
+    -x) obuild_set_x=yes ;;
+    -d) obuild_debug=yes ;;
+    -g) obuild_debug=yes ;;
+    -l) obuild_do_not_compile=yes ;;
+    -k) obuild_dir_bin_o_cleanup=no ;;
+    *) echo "unknown option : $1";exit ;;
+  esac
+  shift
+done
+
+if [ ${obuild_set_x} = yes ] ; then
+  set -x
+fi
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_optimize=no
+fi
+
+if [  "${OBUILD_PLATFORM}" = "" ] ; then
+  obuild_platform=`uname`
+else
+  obuild_platform=${OBUILD_PLATFORM}
+fi
+
+if [ "${obuild_platform}" = "" ] ; then
+  echo "obuild_platform variable not defined."
+  exit
+fi
+
+if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+  obuild_dir_bin=${obuild_platform}_obuild
+else
+  obuild_dir_bin=${OBUILD_DIR_BIN}
+fi
+
+if [ "${obuild_dir_bin}" = "" ] ; then
+  echo "obuild_dir_bin variable not defined."
+  exit
+fi
+
+obuild_pwd=`pwd`
+obuild_snovis_path=`dirname "${obuild_pwd}"`
+unset obuild_pwd
+
+# Create the bin directory :
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
+    echo "Program source obuild_platform.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then 
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_platform_compiler=${OBUILD_CXX}
+    else
+      obuild_platform_compiler=c++ 
+    fi
+  else
+    obuild_platform_compiler=${obuild_cxx_command} 
+  fi
+  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
+  unset obuild_platform_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+    echo "Program obuild_platform not found."
+    exit
+  fi
+fi
+obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+CLHEP_home="/usr/local/CLHEP/2.0.3.1"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+Geant4_home="/usr/local/geant4/8.2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="cxx"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_command="cl.exe"
+fi
+unset obuild_platform_result
+if [ "${obuild_cxx_command}" = "" ] ; then
+  echo "Variable obuild_cxx_command not defined."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="-O"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_optimize="/O2"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="-g"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_debug="/ZI /Od"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_options="-fPIC"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_options="/nologo /DWIN32 /MD /GX /GR /W3"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_cxx_debug_local=${obuild_cxx_debug}
+else
+  obuild_cxx_debug_local=
+fi
+
+if [ ${obuild_optimize} = yes ] ; then
+  obuild_cxx_optimize_local=${obuild_cxx_optimize}
+else
+  obuild_cxx_optimize_local=
+fi
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
+    echo "Program source obuild_find.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_find_compiler=${OBUILD_CXX}
+    else
+      obuild_find_compiler=c++
+    fi
+  else
+    obuild_find_compiler=${obuild_cxx_command}
+  fi
+  ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
+  unset obuild_find_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
+    echo "Program obuild_find not found."
+    exit
+  fi
+fi
+obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Slash_path=`"${obuild_find_exe}" Slash 'v1r*'`
+if [ "${obuild_Slash_path}" = "" ] ; then
+  echo "Can't find Slash package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_AIDA_path=`"${obuild_find_exe}" AIDA 'v3r2p1'`
+if [ "${obuild_AIDA_path}" = "" ] ; then
+  echo "Can't find AIDA package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
+if [ "${obuild_OnX_path}" = "" ] ; then
+  echo "Can't find OnX package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
+if [ "${obuild_G4Lab_path}" = "" ] ; then
+  echo "Can't find G4Lab package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_BatchLab_path=`"${obuild_find_exe}" BatchLab 'v1r*'`
+if [ "${obuild_BatchLab_path}" = "" ] ; then
+  echo "Can't find BatchLab package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'`
+if [ "${obuild_HEPVis_path}" = "" ] ; then
+  echo "Can't find HEPVis package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_CoinGL_path=`"${obuild_find_exe}" CoinGL 'v1r*'`
+if [ "${obuild_CoinGL_path}" = "" ] ; then
+  echo "Can't find CoinGL package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_expat_path=`"${obuild_find_exe}" expat 'v1r*'`
+if [ "${obuild_expat_path}" = "" ] ; then
+  echo "Can't find expat package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_zlib_path=`"${obuild_find_exe}" zlib 'v1r*'`
+if [ "${obuild_zlib_path}" = "" ] ; then
+  echo "Can't find zlib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'`
+if [ "${obuild_Lib_path}" = "" ] ; then
+  echo "Can't find Lib package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'`
+if [ "${obuild_HEPVis_path}" = "" ] ; then
+  echo "Can't find HEPVis package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'`
+if [ "${obuild_HEPVis_path}" = "" ] ; then
+  echo "Can't find HEPVis package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_jpeg_path=`"${obuild_find_exe}" jpeg 'v1r*'`
+if [ "${obuild_jpeg_path}" = "" ] ; then
+  echo "Can't find jpeg package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_dvi2bitmap_path=`"${obuild_find_exe}" dvi2bitmap 'v1r*'`
+if [ "${obuild_dvi2bitmap_path}" = "" ] ; then
+  echo "Can't find dvi2bitmap package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_freetype2_path=`"${obuild_find_exe}" freetype2 'v1r*'`
+if [ "${obuild_freetype2_path}" = "" ] ; then
+  echo "Can't find freetype2 package."
+  exit
+fi
+if [ "${obuild_find_exe}" = "" ] ; then
+  echo "Variable obuild_find_exe not defined."
+  exit
+fi
+obuild_CoinGL_path=`"${obuild_find_exe}" CoinGL 'v1r*'`
+if [ "${obuild_CoinGL_path}" = "" ] ; then
+  echo "Can't find CoinGL package."
+  exit
+fi
+
+obuild_cxx_includes="-I\"${obuild_snovis_path}\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_Lib_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_Slash_path}\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_AIDA_path}/src/cpp\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_OnX_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_G4Lab_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_BatchLab_path}\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_HEPVis_path}/include\""
+obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_CoinGL_path}/include\""
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I/System/Library/Frameworks/OpenGL.framework/Headers"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_includes="${obuild_cxx_includes} -I${OBUILD_OPENGL_HOME}/include"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/dll_snovis"
+fi
+
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/dll_snovis"
+
+# Compile snovis files :
+if [ ${obuild_do_not_compile} = no ] ; then
+
+if [ ${obuild_verbose} = yes ] ; then set -x;fi
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+ eval ${obuild_cxx_command} -c ${obuild_cxx_debug_local} ${obuild_cxx_optimize_local} ${obuild_cxx_options} ${obuild_cxx_macros} ${obuild_cxx_includes} -o ./dll_snovis/Callbacks.o \"../source/Callbacks.cxx\"
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+cd "${obuild_snovis_path}/obuild"
+
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+ eval ${obuild_cxx_command} -c ${obuild_cxx_debug_local} ${obuild_cxx_optimize_local} ${obuild_cxx_options} ${obuild_cxx_macros} ${obuild_cxx_includes} -o ./dll_snovis/InventorCallbacks.o \"../source/InventorCallbacks.cxx\"
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+cd "${obuild_snovis_path}/obuild"
+
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+ eval ${obuild_cxx_command} -c ${obuild_cxx_debug_local} ${obuild_cxx_optimize_local} ${obuild_cxx_options} ${obuild_cxx_macros} ${obuild_cxx_includes} -o ./dll_snovis/Layouts.o \"../source/Layouts.cxx\"
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+cd "${obuild_snovis_path}/obuild"
+
+if [ ${obuild_verbose} = yes ] ; then set +x;fi
+
+fi #do_not_compile
+
+obuild_linked_paths="-L\"${obuild_Lib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries=" -lLibXML"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_expat_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_expat"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lLibZip"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_zlib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_z"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lLibUtils"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HEPVis_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lHEPVisGeometry"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HEPVis_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -lHEPVisUtils"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_jpeg_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_jpeg"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_dvi2bitmap_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_dvi2bitmap"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_freetype2_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_freetype2"
+obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_CoinGL_path}/${obuild_dir_bin}\""
+obuild_linked_libraries="${obuild_linked_libraries}  -losc_Coin"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -framework OpenGL -framework AGL"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -framework ApplicationServices"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L/usr/lib -lGLU -lGL -lm"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} glu32.lib opengl32.lib gdi32.lib user32.lib"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_linked_libraries="${obuild_linked_libraries} -lpthread"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_command="c++"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_command="cxx"
+fi
+unset obuild_platform_result
+if [ "${obuild_cxx_dll_builder_command}" = "" ] ; then
+  echo "Variable obuild_cxx_dll_builder_command not defined."
+  exit
+fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_options="-bundle -twolevel_namespace -Wl,-headerpad_max_install_names -Wl,-headerpad,800"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_options="-shared"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_options="-shared"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_prefix="lib"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_prefix="lib"
+fi
+unset obuild_platform_result
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_suffix="bundle"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_suffix="so"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'`
+if [ ${obuild_platform_result} = yes ] ; then
+obuild_cxx_dll_builder_suffix="so"
+fi
+unset obuild_platform_result
+
+if [ ${obuild_debug} = yes ] ; then
+  obuild_cxx_dll_builder_debug_local=${obuild_cxx_dll_builder_debug}
+else
+  obuild_cxx_dll_builder_debug_local=
+fi
+
+if [ ${obuild_optimize} = yes ] ; then
+  obuild_cxx_dll_builder_optimize_local=${obuild_cxx_dll_builder_optimize}
+else
+  obuild_cxx_dll_builder_optimize_local=
+fi
+# Create the dll snovis :
+cd "${obuild_snovis_path}/${obuild_dir_bin}"
+obuild_objs=`find ./dll_snovis -name '*.o' -print`
+/bin/rm -f ./${obuild_cxx_dll_builder_prefix}snovis.${obuild_cxx_dll_builder_suffix}
+if [ ${obuild_verbose} = yes ] ; then set -x;fi
+ eval ${obuild_cxx_dll_builder_command} ${obuild_cxx_dll_builder_options} -o \"${obuild_snovis_path}/${obuild_dir_bin}/${obuild_cxx_dll_builder_prefix}snovis.${obuild_cxx_dll_builder_suffix}\" ${obuild_objs} ${obuild_linked_paths} ${obuild_linked_libraries}
+obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+if [ ${obuild_verbose} = yes ] ; then set +x;fi
+cd "${obuild_snovis_path}/obuild"
+
+# Some cleanup :
+if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then
+  /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/dll_snovis"
+fi
+/bin/rm -f "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
+
Index: /snovis/trunk/obuild/sh/check_foreigns
===================================================================
--- /snovis/trunk/obuild/sh/check_foreigns	(revision 100)
+++ /snovis/trunk/obuild/sh/check_foreigns	(revision 100)
@@ -0,0 +1,157 @@
+#!/bin/sh -f
+
+#
+# File produced by the obuild tool version 1.0
+# for the package snovis with version v1r0.
+#
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/check_foreigns )
+#   UNIX> sh/check_foreigns
+#
+#////////////////////////////////////////////////
+
+# Binary directory is needed to create the obuild_plaform program.
+
+if [  "${OBUILD_PLATFORM}" = "" ] ; then
+  obuild_platform=`uname`
+else
+  obuild_platform=${OBUILD_PLATFORM}
+fi
+
+if [ "${obuild_platform}" = "" ] ; then
+  echo "obuild_platform variable not defined."
+  exit
+fi
+
+if [  "${OBUILD_DIR_BIN}" = "" ] ; then
+  obuild_dir_bin=${obuild_platform}_obuild
+else
+  obuild_dir_bin=${OBUILD_DIR_BIN}
+fi
+
+if [ "${obuild_dir_bin}" = "" ] ; then
+  echo "obuild_dir_bin variable not defined."
+  exit
+fi
+
+obuild_pwd=`pwd`
+obuild_snovis_path=`dirname "${obuild_pwd}"`
+unset obuild_pwd
+
+# Create the bin directory :
+/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
+
+obuild_check_what=$1
+if [ "${obuild_check_what}" = "" ] ; then
+  echo "check_foreigns : no argument given"
+  exit 1
+fi
+
+if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
+    echo "Program source obuild_platform.cpp not found."
+    exit
+  fi
+  if [ "${obuild_cxx_command}" = "" ] ; then 
+    if [  "${OBUILD_CXX}" != "" ] ; then
+      obuild_platform_compiler=${OBUILD_CXX}
+    else
+      obuild_platform_compiler=c++ 
+    fi
+  else
+    obuild_platform_compiler=${obuild_cxx_command} 
+  fi
+  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
+  unset obuild_platform_compiler
+  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
+    echo "Program obuild_platform not found."
+    exit
+  fi
+fi
+obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+bhep_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+snova_platform="Darwin"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+CLHEP_home="/usr/local/CLHEP/2.0.3.1"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+Geant4_home="/usr/local/geant4/8.2"
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ "${obuild_check_what}" = "CLHEP" ] ; then
+  if [ ! -d "${CLHEP_home}" ] ; then
+    echo "WARNING : CLHEP not found under ${CLHEP_home}"
+    exit 1
+  fi
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ "${obuild_check_what}" = "Geant4" ] ; then
+  if [ ! -d "${Geant4_home}" ] ; then
+    echo "WARNING : Geant4 not found under ${Geant4_home}"
+    exit 1
+  fi
+fi
+fi
+unset obuild_platform_result
+
Index: /snovis/trunk/obuild/sh/install
===================================================================
--- /snovis/trunk/obuild/sh/install	(revision 100)
+++ /snovis/trunk/obuild/sh/install	(revision 100)
@@ -0,0 +1,43 @@
+#!/bin/sh -f
+
+#////////////////////////////////////////////////
+# Usage :
+#   UNIX> cd some_path/pack/version/obuild
+# ( UNIX> chmod a+x sh/install )
+#   UNIX> sh/install
+#
+# This script is intended to install the 
+# setup.sh and setup.csh scripts. 
+#
+# For setup.sh, it edits the path line :
+#   path_<package>=@@absolute_dir@@
+# and for setup.csh, the path line :
+#   set path_BatchLab="@@absolute_dir@@"
+#
+# The script replaces in these lins the string : 
+#   @@absolute_dir@@ 
+# by the return of the pwd command.
+#
+#////////////////////////////////////////////////
+
+obuild_current=`pwd`
+
+obuild_dir=`echo ${obuild_current} | sed -e 's#/obuild##g'`
+
+obuild_from='="@@absolute_dir@@"'
+
+obuild_to='="'"${obuild_dir}"'"'
+
+if test -e setup.sh ; then
+  /bin/rm -f obuild_tmp
+  sed -e "s#${obuild_from}#${obuild_to}#g" setup.sh > obuild_tmp
+  /bin/mv obuild_tmp setup.sh
+  /bin/rm -f obuild_tmp
+fi
+
+if test -e setup.csh ; then
+  /bin/rm -f obuild_tmp
+  sed -e "s#${obuild_from}#${obuild_to}#g" setup.csh > obuild_tmp
+  /bin/mv obuild_tmp setup.csh
+  /bin/rm -f obuild_tmp
+fi
Index: /snovis/trunk/obuild/snova.obuild
===================================================================
--- /snovis/trunk/obuild/snova.obuild	(revision 100)
+++ /snovis/trunk/obuild/snova.obuild	(revision 100)
@@ -0,0 +1,69 @@
+<!--
+  Access to SuperNemo software.
+-->
+
+<obuild>
+
+  <foreign name="snova">
+
+<!--
+    <native_version>8.2</native_version>
+-->
+
+    <variable name="bhep_home" platform="UNIX">/Users/barrand/dev/exp/nemo/bhep/v1r4p2</variable>
+    <variable name="bhep_platform" platform="Darwin">Darwin</variable>
+
+    <variable name="snova_home" platform="UNIX">/Users/barrand/dev/exp/nemo/snova/v2r0p0</variable>
+    <variable name="snova_platform" platform="Darwin">Darwin</variable>
+
+    <load_library_path platform="Darwin" verbatim="yes">${bhep_home}/Darwin</load_library_path>
+    <load_library_path platform="Darwin" verbatim="yes">${snova_home}/Darwin</load_library_path>
+
+    <release>
+
+      <!-- bhep -->
+      <copy_files platform="Darwin">
+        <from>${bhep_home}/${bhep_platform}/bin</from>
+        <what>bhep-config</what>
+        <to>bin/.</to>
+      </copy_files>
+
+      <copy_files platform="Darwin">
+        <from>${bhep_home}/${bhep_platform}/lib</from>
+        <what>libbhep.dylib</what>
+        <to>lib/.</to>
+      </copy_files>
+
+      <!-- GeomUtils -->
+      <copy_files platform="Darwin">
+        <from>${GeomUtils_home}/${GeomUtils_platform}/bin</from>
+        <what>test_*</what>
+        <to>bin/.</to>
+      </copy_files>
+
+      <copy_files platform="Darwin">
+        <from>${GeomUtils_home}/${GeomUtils_platform}/lib</from>
+        <what>libgeomutils.dylib</what>
+        <to>lib/.</to>
+      </copy_files>
+
+      <!-- SNgeom2 -->
+<!--
+      <copy_files platform="Darwin">
+        <from>${SNgeom2_home}/${SNgeom2_platform}/bin</from>
+        <what>test_*</what>
+        <to>bin/.</to>
+      </copy_files>
+
+      <copy_files platform="Darwin">
+        <from>${SNgeom2_home}/${SNgeom2_platform}/lib</from>
+        <what>libsngeom.dylib</what>
+        <to>lib/.</to>
+      </copy_files>
+-->
+
+    </release>
+
+  </foreign>
+
+</obuild>
Index: /snovis/trunk/obuild/this.obuild
===================================================================
--- /snovis/trunk/obuild/this.obuild	(revision 100)
+++ /snovis/trunk/obuild/this.obuild	(revision 100)
@@ -0,0 +1,151 @@
+<obuild>
+
+  <package name="snovis" version="v1r0">
+
+    <repository>svn.lal.in2p3.fr/nemo/packages</repository>
+
+    <!-- not this : -->
+
+    <reference package="snovis" version="v1r*" file="obuild/snova.obuild"/>
+
+    <reference package="G4Lab" version="v8r*" file="obuild/export.obuild"/>
+  
+    <use name="HDF5" version="v1r*">
+      <c_include>include</c_include>
+      <lib>osc_HDF5</lib>
+    </use>
+
+    <!-- this : -->
+
+    <dll name="snovis">
+      <directory>../source</directory>
+
+      <cxx_include>${obuild_snovis_path}</cxx_include>
+
+      <!-- not this : -->
+
+      <cxx_include copy="cxx_include" from="Lib"/>
+      <cxx_include copy="cxx_include" from="Slash"/>
+      <cxx_include copy="cxx_include" from="AIDA"/>
+      <cxx_include copy="cxx_include" from="OnX"/> <!-- Helpers -->
+      <cxx_include copy="cxx_include" from="G4Lab"/>
+      <cxx_include copy="cxx_include" from="BatchLab"/>
+
+      <cxx_include copy="cxx_include" from="HEPVis"/>
+      <cxx_include copy="cxx_include" from="CoinGL"/>
+
+      <lib copy="lib_LibXML" from="Lib"/>
+      <lib copy="lib" from="expat"/>
+      <lib copy="lib_LibZip" from="Lib"/>
+      <lib copy="lib" from="zlib"/>
+      <lib copy="lib_LibUtils" from="Lib"/>
+
+      <!-- graphics. -->
+      <lib copy="lib_HEPVisGeometry" from="HEPVis"/>
+      <lib copy="lib_HEPVisUtils" from="HEPVis"/>
+      <lib copy="lib" from="jpeg"/>
+      <lib copy="lib" from="dvi2bitmap"/>
+      <lib copy="lib" from="freetype2"/>
+      <lib copy="lib" from="CoinGL"/>
+    </dll>
+
+    <application name="prog_snova">
+      <file>../applications/prog_snova2.cxx</file>
+
+      <!-- not this : -->
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}/source/GeomUtils/include</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}/source/SNgeom2/include</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}/source/SNvertex/include</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${bhep_home}</cxx_include>
+
+      <cxx_include copy="cxx_include" from="CLHEP"/>
+      <cxx_include copy="cxx_include" from="Geant4"/>
+      <cxx_include copy="c_include" from="HDF5"/>
+
+      <lib verbatim="yes">-L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils</lib>
+      <lib verbatim="yes">-L${bhep_home}/Darwin -lbhep</lib>
+
+      <lib copy="interfaces_lib" from="Geant4"/>
+
+      <lib copy="lib" from="Geant4"/>
+      <lib copy="lib" from="CLHEP"/>
+      <lib copy="lib" from="HDF5"/>
+      <lib copy="lib" from="zlib"/>
+    </application>
+
+    <application name="snovis_session">
+      <file>../applications/snovis_session.cc</file>
+
+      <!-- not this : -->
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}/source/GeomUtils/include</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}/source/SNgeom2/include</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${snova_home}/source/SNvertex/include</cxx_include>
+      <cxx_include platform="UNIX" verbatim="yes">-I${bhep_home}</cxx_include>
+
+      <cxx_include copy="cxx_include" from="CLHEP"/>
+      <cxx_include copy="cxx_include" from="Geant4"/>
+      <cxx_include copy="c_include" from="HDF5"/>
+
+      <cxx_include copy="cxx_include" from="AIDA"/>
+      <cxx_include copy="cxx_include" from="G4Lab"/>
+
+      <cxx_include copy="cxx_include" from="Lib"/>
+      <cxx_include copy="cxx_include" from="Slash"/>
+
+      <lib copy="lib" from="OnX"/>
+
+      <lib verbatim="yes">-L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils</lib>
+      <lib verbatim="yes">-L${bhep_home}/Darwin -lbhep</lib>
+
+      <lib copy="lib" from="HDF5"/>
+
+      <lib copy="lib_G4LabUIOnX" from="G4Lab"/>
+      <lib copy="lib_G4LabCore" from="G4Lab"/>
+      <lib copy="lib" from="Geant4"/>
+      <lib copy="lib" from="CLHEP"/>
+
+      <lib copy="lib_LibXML" from="Lib"/>
+      <lib copy="lib" from="expat"/>
+      <lib copy="lib_LibZip" from="Lib"/>
+      <lib copy="lib" from="zlib"/>
+      <lib copy="lib_LibUtils" from="Lib"/>
+
+      <!-- graphics. -->
+      <lib copy="lib_HEPVisGeometry" from="HEPVis"/>
+      <lib copy="lib_HEPVisUtils" from="HEPVis"/>
+      <lib copy="lib" from="jpeg"/>
+      <lib copy="lib" from="dvi2bitmap"/>
+      <lib copy="lib" from="freetype2"/>
+      <lib copy="lib" from="CoinGL"/>
+    </application>
+
+    <setup>
+      <exec from="OnX"/>
+      <exec from="G4Lab"/>
+
+      <env name="SNOVISROOT">${obuild_snovis_path}</env> 
+
+      <run_path/>
+
+      <load_library_path copy="load_library_path" from="snova"/>
+
+      <load_library_path/>
+
+      <env name="G4RADIOACTIVEDATA">${Geant4_home}/data/RadiativeDecay3.1</env>
+      <env name="G4LEVELGAMMADATA">${Geant4_home}/data/PhotonEvaporation2.0</env>
+      <env name="G4LEDATA">${Geant4_home}/data/G4EMLOW4.2</env>
+      <env name="NeutronHPCrossSections">${Geant4_home}/data/G4NDL3.10</env>
+    </setup>
+
+    <release>
+      <copy_dir>
+        <from>scripts</from>
+        <to>Resources/snovis/.</to>
+      </copy_dir>
+    </release>
+
+  </package>
+
+</obuild>
Index: /snovis/trunk/scripts/Help/Tutorial.help
===================================================================
--- /snovis/trunk/scripts/Help/Tutorial.help	(revision 100)
+++ /snovis/trunk/scripts/Help/Tutorial.help	(revision 100)
@@ -0,0 +1,24 @@
+  First steps :
+  -----------
+  Click in 'snovis/Detector' to visualize some default geometry.
+ 
+  Click in 'snovis/Run...' to map the Run dialog box.
+  
+  Click in Apply to start a run.
+
+  After each event, control is given to the GUI.
+ Someone can play with the Inventor viewer controls
+ to manipulate the scene.
+
+  Click in 'snovis/Next evt' to produce a new event.
+
+  By default, the command prompt is set to Geant4 commands.
+
+  Geometry viewing :
+  ----------------
+  Click in 'Tree/PhysicalVolumes' to display the geometry
+ hierachy in the tree widget (the one at the
+ left of the viewer).
+
+  Choose an item in the tree to visualize it.
+
Index: /snovis/trunk/scripts/Inventor/Floor.iv
===================================================================
--- /snovis/trunk/scripts/Inventor/Floor.iv	(revision 100)
+++ /snovis/trunk/scripts/Inventor/Floor.iv	(revision 100)
@@ -0,0 +1,28 @@
+#Inventor V1.0 ascii
+
+DEF sceneGraph Separator {
+  DEF highlight Switch {
+    whichChild 0
+    Material {diffuseColor 0.8 0.8 0.8}
+    Material {diffuseColor 1 1 1}    
+  }
+  Transform {translation -2500 -2500 -2500}
+  SoSeparator {
+    Scale {scaleFactor 1000 1000 1000}
+    RotationXYZ {axis X angle 1.57079}
+    Array {
+#      origin CENTER
+      numElements1 5
+      numElements2 5
+      Coordinate3 {
+        point [ 0.0  0.0  0.0,
+                1.0  0.0  0.0,
+                1.0  1.0  0.0,
+                0.0  1.0  0.0]
+      }
+      IndexedLineSet {
+        coordIndex [ 0, 1, 2, 3, 0, -1 ]
+      }
+   }
+  }
+}
Index: /snovis/trunk/scripts/OnX/Camera.onx
===================================================================
--- /snovis/trunk/scripts/OnX/Camera.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/Camera.onx	(revision 100)
@@ -0,0 +1,33 @@
+<!--
+   The orientation field of an SoCamera defines
+  a rotation from the default position, that is to say
+  a camera looking toward -z axis with up along y axis.
+-->
+
+
+<widget class="CascadeButton">
+  <label>Camera</label>
+  <widget class="Menu">
+    <widget class="MenuItem">
+      <label>Front (+z)</label>
+      <activate exec="DLD">OnX region_setNode type SoCamera height 5000 position 0 0 5000 orientation 0 1 0 0</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Back (-z)</label>
+      <activate exec="DLD">OnX region_setNode type SoCamera height 5000 position 0 0 -5000 orientation 0 1 0 3.14</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Side +z at left</label>
+      <activate exec="DLD">OnX region_setNode type SoCamera height 5000 position 5000 0 0 orientation 0 1 0 1.57</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Side +z at right</label>
+      <activate exec="DLD">OnX region_setNode type SoCamera height 5000  position -5000 0 0 orientation 0 1 0 -1.57</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Top</label>
+      <activate exec="DLD">OnX region_setNode type SoCamera height 5000 position 0 5000 0 orientation 1 0 0 -1.57</activate>
+    </widget>
+    <reference file="$ONXROOT/scripts/OnX/Camera.onx"/>
+  </widget>
+</widget>
Index: /snovis/trunk/scripts/OnX/Help.onx
===================================================================
--- /snovis/trunk/scripts/OnX/Help.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/Help.onx	(revision 100)
@@ -0,0 +1,11 @@
+<widget class="CascadeButton">
+  <label>Help</label>
+  <widget class="Menu">
+    <reference file="$ONXROOT/scripts/OnX/Help.onx"/>
+    <widget class="MenuItem">
+      <label>Tutorial</label>
+      <activate exec="DLD">OnX ui_help_file $SNOVISROOT/scripts/Help/Tutorial.help</activate>
+    </widget>
+  </widget>
+</widget>
+
Index: /snovis/trunk/scripts/OnX/InputLayout.onx
===================================================================
--- /snovis/trunk/scripts/OnX/InputLayout.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/InputLayout.onx	(revision 100)
@@ -0,0 +1,9 @@
+<OnX version="v15r0">
+
+  <widget class="InputDialog" name="snovis_InputLayout">
+    <label>Layout</label>
+    <input name="layout" label="Layout" type="option" items="default\nfront_top\nCAD"/>
+    <ok exec="DLD">snovis snovis_InputLayout_ok</ok>
+  </widget>
+
+</OnX>
Index: /snovis/trunk/scripts/OnX/Pages.onx
===================================================================
--- /snovis/trunk/scripts/OnX/Pages.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/Pages.onx	(revision 100)
@@ -0,0 +1,12 @@
+<widget class="TabStack" name="ViewerTabStack">
+  <select exec="DLD bg">OnX OnX_Tab_select</select>
+  <widget class="PageViewer" name="Viewer_1">
+    <tabLabel>Viewer_1</tabLabel>
+    <create exec="DLD">OnX page_create</create>
+    <destroy exec="DLD">OnX page_destroy</destroy>
+    <create exec="DLD">snovis snovis_Page_create</create>
+    <collect exec="DLD">OnX viewer_collect</collect>
+    <popupItems>No highlighted</popupItems>
+    <popup exec="DLD">OnX viewer_popup</popup>
+  </widget>
+</widget>
Index: /snovis/trunk/scripts/OnX/Scene.onx
===================================================================
--- /snovis/trunk/scripts/OnX/Scene.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/Scene.onx	(revision 100)
@@ -0,0 +1,14 @@
+<widget class="CascadeButton">
+  <label>Scene</label>
+  <widget class="Menu">
+    <reference file="$G4LABROOT/scripts/OnX/Scene.onx"/>
+    <widget class="MenuItem">
+      <label>Floor</label>
+      <activate exec="DLD">OnX region_readInventorFile $SNOVISROOT/scripts/Inventor/Floor.iv</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Set a layout...</label>
+      <activate exec="DLD">OnX ui_show_dialog $SNOVISROOT/scripts/OnX/InputLayout.onx snovis_InputLayout_dialog</activate>
+    </widget>
+  </widget>
+</widget>
Index: /snovis/trunk/scripts/OnX/snovis.onx
===================================================================
--- /snovis/trunk/scripts/OnX/snovis.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/snovis.onx	(revision 100)
@@ -0,0 +1,39 @@
+<widget class="CascadeButton">
+  <label>snovis</label>
+  <widget class="Menu">
+    <widget class="MenuItem">
+      <label>Detector</label>
+      <activate exec="DLD">snovis snovis_layout_default</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Run...</label>
+      <activate exec="DLD">OnX ui_show_dialog $G4LABROOT/scripts/OnX/InputRun.onx G4Lab_InputRun_dialog</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Next evt</label>
+      <activate exec="DLD">OnX ui_exit</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Execute snovis_eventEnd</label>
+      <activate exec="DLD">snovis snovis_execute_eventEnd</activate>
+    </widget>
+<!--
+    <widget class="MenuItem">
+      <label>Customize next event action</label>
+      <activate exec="DLD">OnX ui_show_dialog $G4SIMPLEROOT/scripts/OnX/InputNextEventAction.onx G4Simple_InputNextEventAction_dialog</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Gun pi0 toward right end cap</label>
+      <activate exec="G4">/gun/particle pi0</activate>
+      <activate exec="G4">/gun/direction 0.1 0.1 1</activate>
+    </widget>
+    <widget class="MenuItem">
+      <label>Dump Cell hits</label>
+      <activate exec="DLD">OnX data_collect CellHC</activate>
+      <activate exec="DLD">OnX data_dump</activate>
+    </widget>
+-->
+    <reference file="$G4LABROOT/scripts/OnX/Geant4.onx"/>
+  </widget>
+</widget>
+
Index: /snovis/trunk/scripts/OnX/snovis_session.onx
===================================================================
--- /snovis/trunk/scripts/OnX/snovis_session.onx	(revision 100)
+++ /snovis/trunk/scripts/OnX/snovis_session.onx	(revision 100)
@@ -0,0 +1,80 @@
+<OnX version="v15r0">
+  <create exec="DLD">OnX OnX_Initialize</create>
+  <create exec="DLD">OnXLab OnXLab_Initialize</create>
+  <create exec="DLD">snovis snovis_Initialize</create>
+  <destroy exec="DLD">snovis snovis_Finalize</destroy>
+  <widget class="Window" name="main">
+    <geometry>850x650+0+0</geometry>
+    <title>snovis</title>
+    <widget class="MenuBar" name="menuBar">
+      <reference file="$ONXROOT/scripts/OnX/File.onx"/>
+      <reference file="$SNOVISROOT/scripts/OnX/snovis.onx"/>
+      <reference file="$SNOVISROOT/scripts/OnX/Scene.onx"/>
+      <reference file="$SNOVISROOT/scripts/OnX/Camera.onx"/>
+      <reference file="$ONXROOT/scripts/OnX/Page.onx"/>
+      <reference file="$ONXROOT/scripts/OnX/Plotter.onx"/>
+      <reference file="$ONXLABROOT/scripts/OnX/Analysis.onx" optional="yes"/>
+      <reference file="$ONXROOT/scripts/OnX/Viewers.onx"/>
+      <reference file="$SNOVISROOT/scripts/OnX/Help.onx"/>
+    </widget>
+    <widget class="ToolBar">
+      <widget class="ToolBarItem">
+        <label>Print...</label>
+        <pixmap>$ONXROOT/scripts/images/fileprint.xpm</pixmap>
+        <tooltip>Map print dialog</tooltip>
+        <activate exec="DLD">OnX ui_show_dialog $ONXROOT/scripts/OnX/InputPrint.onx OnX_InputPrint_dialog</activate>
+      </widget>
+      <widget class="ToolBarItem">
+        <label>Clear region</label>
+        <pixmap>$ONXROOT/scripts/images/editdelete.xpm</pixmap>
+        <tooltip>Clear region</tooltip>
+        <activate exec="DLD">OnX region_clear</activate>
+      </widget>
+      <widget class="ToolBarItem">
+        <label>Next event</label>
+        <pixmap>$ONXROOT/scripts/images/civil_arrow_right.xpm</pixmap>
+        <tooltip>Next event</tooltip>
+        <activate exec="DLD">G4Lab G4Lab_nextEvent</activate>
+      </widget>
+    </widget>
+    <widget class="VPaned"> 
+      <splitPosition>450</splitPosition>
+      <widget class="HPaned">
+        <splitPosition>200</splitPosition>
+        <widget class="VBox">
+          <expand>second</expand>
+          <sizeOfFixed>30</sizeOfFixed>
+          <widget class="OptionMenu" name="optionTree">
+            <label>Tree actions</label>
+            <items>PhysicalVolumes\nPhysicsTables\nAIDA trees</items>
+            <default>PhysicalVolumes</default>
+            <valueChanged exec="DLD">G4Lab G4Lab_tree_option</valueChanged>
+          </widget>
+          <widget class="ScrolledTree" name="mainTree">
+            <select exec="DLD">G4Lab G4Lab_tree_select</select>
+          </widget>
+        </widget>
+        <reference file="$SNOVISROOT/scripts/OnX/Pages.onx"/>
+      </widget>
+      <widget class="VBox"> 
+        <expand>first</expand>
+        <sizeOfFixed>30</sizeOfFixed>
+        <widget class="ScrolledText" name="consoleText"/>
+        <widget class="HBox"> 
+          <expand>second</expand>
+          <sizeOfFixed>80</sizeOfFixed>
+          <widget class="OptionMenu" name="consolePrompt">
+            <label>Interpreter</label>
+            <default>G4</default>
+            <items>G4\nDLD\nsystem\nPython</items>
+          </widget>
+          <widget class="CommandLine" name="consoleCommandLine">
+            <activate exec="DLD">OnX console_execute</activate>
+            <complete exec="DLD">G4Lab G4Lab_consolePrompt_complete</complete>
+          </widget>
+        </widget>
+      </widget>
+    </widget>
+    <reference file="$ONXROOT/scripts/OnX/Dialogs.onx"/>
+  </widget>
+</OnX>
Index: /snovis/trunk/scripts/gen_data/example_Mo100.txt
===================================================================
--- /snovis/trunk/scripts/gen_data/example_Mo100.txt	(revision 100)
+++ /snovis/trunk/scripts/gen_data/example_Mo100.txt	(revision 100)
@@ -0,0 +1,277 @@
+# GENBB generated file: 
+# Date and hour         :   2006.5. 8    12:56: 9
+ # Initial random number :  0
+ #   
+#  Event type: Mo100           
+ #             0nubb(mn) 0+ -> 0+     {2n}      
+#               level, Elevel (MeV) =  0+       0.0000     MeV
+ #   
+ # Format of data:
+ # for each event    - event's number,
+ #                     time of event's start, 
+ #                     number of emitted particles;
+ # for each particle - GEANT number of particle,
+ #                      x,y,z components of momentum,
+ #                      time shift from previous time
+ #   
+ # Time - in sec, momentum - in MeV/c
+ #   
+    
+       0  0.00000       2
+  3  0.569326       2.13374     -0.468197      0.00000    
+  3   1.07597      0.578156       1.13112      0.00000 
+       0  0.00000       2
+  3   1.10284      0.538476       1.47058      0.00000    
+  3  -1.38382       1.45149     -0.129969      0.00000    
+       0  0.00000       2
+  3  -1.26167      0.993511      -1.29744      0.00000    
+  3   1.69977     -0.192891E-01  0.755656      0.00000    
+       0  0.00000       2
+  3  -1.02066      0.553959      0.880500      0.00000    
+  3 -0.124164      -2.42837      0.367240      0.00000    
+       0  0.00000       2
+  3 -0.354471      -1.33476       2.92537      0.00000    
+  3  0.115125     -0.561040      0.143872      0.00000    
+       0  0.00000       2
+  3  0.285573      -2.78138     -0.671145      0.00000    
+  3 -0.603517      0.684343      0.442415      0.00000    
+       0  0.00000       2
+  3  0.121400       1.24679     -0.491287E-01  0.00000    
+  3  -2.58045      0.500210      0.363165      0.00000    
+       0  0.00000       2
+  3  0.759163     -0.531808     -0.695301      0.00000    
+  3  0.875930     -0.247616       2.58695      0.00000    
+       0  0.00000       2
+  3  0.784280      0.438066      0.624274      0.00000    
+  3  0.767928      -1.07722      -2.47047      0.00000    
+       0  0.00000       2
+  3  0.565468E-01   1.91146     -0.780606      0.00000    
+  3   1.15346      -1.30244      0.655877      0.00000    
+       0  0.00000       2
+  3 -0.608349      -1.95468      0.172722      0.00000    
+  3  0.118343      0.178983       1.85807      0.00000    
+       0  0.00000       2
+  3   1.50412       1.86838      -1.30362      0.00000    
+  3 -0.739791E-01 -0.850114     -0.803501      0.00000    
+       0  0.00000       2
+  3 -0.273710     -0.509227       1.04770      0.00000    
+  3   1.64615      0.906776       1.94833      0.00000    
+       0  0.00000       2
+  3   1.61091     -0.121514      -2.77758      0.00000    
+  3  0.298791     -0.445460      0.308256      0.00000    
+       0  0.00000       2
+  3   1.03362     -0.206178      -1.00017      0.00000    
+  3  -1.24368      0.161178       2.12019      0.00000    
+       0  0.00000       2
+  3  -2.00943     -0.346434E-01  0.426240      0.00000    
+  3  0.831020     -0.942149E-01  -1.67303      0.00000    
+       0  0.00000       2
+  3  0.525053      -1.62434      0.275075      0.00000    
+  3  -1.60399      0.891458      -1.20300      0.00000    
+       0  0.00000       2
+  3   1.52843     -0.157988      0.817794      0.00000    
+  3  -1.04350       1.15431      -1.53090      0.00000    
+       0  0.00000       2
+  3 -0.612401E-01 -0.130687     -0.402744E-02  0.00000    
+  3   3.37125      0.351544     -0.821936      0.00000    
+       0  0.00000       2
+  3  -1.00941       1.51553       1.33981      0.00000    
+  3   1.22236      0.254522      -1.09611      0.00000    
+       0  0.00000       2
+  3   1.89533     -0.928181     -0.454229      0.00000    
+  3  -1.22640     -0.786811     -0.996274      0.00000    
+       0  0.00000       2
+  3   1.01402      0.482504      0.964998      0.00000    
+  3  -1.61022      0.945940      -1.56516      0.00000    
+       0  0.00000       2
+  3  -1.59107     -0.650690      -1.26295      0.00000    
+  3  0.312522      0.403375       1.71690      0.00000    
+       0  0.00000       2
+  3  -1.50218      0.267317      -1.54916      0.00000    
+  3  0.993283      -1.15269      0.862950      0.00000    
+       0  0.00000       2
+  3  -2.31595      0.632687     -0.970343      0.00000    
+  3 -0.117519      -1.14617      0.646538      0.00000    
+       0  0.00000       2
+  3   1.90897      0.796079     -0.142721      0.00000    
+  3 -0.960251     -0.187597       1.57187      0.00000    
+       0  0.00000       2
+  3  0.346250     -0.287345      -1.00105      0.00000    
+  3 -0.641441     -0.339533      -2.70336      0.00000    
+       0  0.00000       2
+  3 -0.367280      -1.24447     -0.119323      0.00000    
+  3   1.72448       1.33418      -1.42875      0.00000    
+       0  0.00000       2
+  3 -0.107182       1.10394      -1.56727      0.00000    
+  3   1.31719      -1.42233     -0.512017      0.00000    
+       0  0.00000       2
+  3 -0.440066      -2.07442       1.00300      0.00000    
+  3 -0.498434      -1.37119     -0.591485      0.00000    
+       0  0.00000       2
+  3  0.579967     -0.631191       2.01587      0.00000    
+  3 -0.262385E-01 -0.898555      -1.48147      0.00000    
+       0  0.00000       2
+  3  0.103980      -1.21238      -1.68186      0.00000    
+  3   1.65461      0.366665     -0.738883      0.00000    
+       0  0.00000       2
+  3  -1.14846      -1.23724      -1.87462      0.00000    
+  3 -0.178672       1.37202     -0.145205      0.00000    
+       0  0.00000       2
+  3 -0.175609      -1.15508     -0.864306      0.00000    
+  3  -1.32227      -1.72191       1.16325      0.00000    
+       0  0.00000       2
+  3  0.261977     -0.901821     -0.553699      0.00000    
+  3 -0.453325     -0.699274       2.67923      0.00000    
+       0  0.00000       2
+  3  0.512909      0.313501       1.27571      0.00000    
+  3  0.102076       2.49586      0.180045      0.00000    
+       0  0.00000       2
+  3  -2.17720      0.745643E-01   1.27086      0.00000    
+  3 -0.583664E-01  -1.12415     -0.818590      0.00000    
+       0  0.00000       2
+  3  0.711477      0.339943      0.501783E-01  0.00000    
+  3  -3.01542     -0.527852      0.266474      0.00000    
+       0  0.00000       2
+  3 -0.831609     -0.197970       1.20099      0.00000    
+  3   1.69133       1.00700      -1.44679      0.00000    
+       0  0.00000       2
+  3  -2.29485       1.10532      0.956476      0.00000    
+  3  0.280459      -1.14675     -0.556510E-01  0.00000    
+       0  0.00000       2
+  3  -1.20243      -1.25799      -2.08655      0.00000    
+  3  0.524387      0.956300      0.465860      0.00000    
+       0  0.00000       2
+  3   1.01536      0.160897       1.67644      0.00000    
+  3  -1.00243      0.232518      -1.66648      0.00000    
+       0  0.00000       2
+  3   1.78903      0.463851      0.434720      0.00000    
+  3 -0.775649      0.454468       1.81604      0.00000    
+       0  0.00000       2
+  3   1.46845      0.840870     -0.323372      0.00000    
+  3   1.18966      0.986892       1.56616      0.00000    
+       0  0.00000       2
+  3  0.424402     -0.294993E-02  0.430462      0.00000    
+  3  -1.37282       2.41254      -1.64029      0.00000    
+       0  0.00000       2
+  3 -0.330304      0.287929E-01  0.499045      0.00000    
+  3   1.66689      -1.47459      -2.33865      0.00000    
+       0  0.00000       2
+  3   1.15317     -0.545370       1.08491      0.00000    
+  3  0.207635      -1.62283      -1.54144      0.00000    
+       0  0.00000       2
+  3  0.531988     -0.376016       1.48085      0.00000    
+  3  -1.70846      -1.44220     -0.553946      0.00000    
+       0  0.00000       2
+  3   1.30595     -0.283736       1.52521      0.00000    
+  3 -0.599687     -0.143934       1.79407      0.00000    
+       0  0.00000       2
+  3  0.219103      0.746913      -1.75681      0.00000    
+  3 -0.450071      -1.91200     -0.394825      0.00000    
+       0  0.00000       2
+  3 -0.581974E-01  -1.57260      -2.12386      0.00000    
+  3  -1.06574      0.677241     -0.643185E-01  0.00000    
+       0  0.00000       2
+  3 -0.229907       1.01853       2.02784      0.00000    
+  3 -0.100383      -1.63775      0.100729E-01  0.00000    
+       0  0.00000       2
+  3   2.18666      -1.22920     -0.838947E-01  0.00000    
+  3   1.21049     -0.334029      0.629257      0.00000    
+       0  0.00000       2
+  3 -0.384173     -0.317046E-01  -2.46374      0.00000    
+  3 -0.494938      -1.28738      0.343622      0.00000    
+       0  0.00000       2
+  3   1.82725       1.24423       1.12559      0.00000    
+  3 -0.766442     -0.969538E-01  -1.20922      0.00000    
+       0  0.00000       2
+  3  -1.09873       1.71525     -0.892111      0.00000    
+  3 -0.536513     -0.488303       1.53644      0.00000    
+       0  0.00000       2
+  3   1.30114      0.794498     -0.256580      0.00000    
+  3  -2.21020     -0.383721      0.775037      0.00000    
+       0  0.00000       2
+  3  0.670557     -0.567253     -0.739664      0.00000    
+  3  -2.33169       1.46112     -0.503791E-01  0.00000    
+       0  0.00000       2
+  3   1.33923      0.789019      -1.62078      0.00000    
+  3  -1.58663     -0.784668E-01  0.536723      0.00000    
+       0  0.00000       2
+  3  -1.32772     -0.804520      0.616826      0.00000    
+  3  0.857367      -1.39297      -1.54769      0.00000    
+       0  0.00000       2
+  3   1.93956      0.427720      -1.13934      0.00000    
+  3 -0.921599     -0.323469      -1.30719      0.00000    
+       0  0.00000       2
+  3 -0.116845      -2.11205      -2.33566      0.00000    
+  3 -0.277456      0.251870      0.586878      0.00000    
+       0  0.00000       2
+  3  -2.03695      -1.23018      0.441931      0.00000    
+  3  0.893008      0.859715     -0.840319      0.00000    
+       0  0.00000       2
+  3  0.588024      -1.17322      0.301427      0.00000    
+  3  -2.49254      0.583105     -0.168656      0.00000    
+       0  0.00000       2
+  3  0.484553      0.576484     -0.525722      0.00000    
+  3  -2.80065      0.884922      0.376971      0.00000    
+       0  0.00000       2
+  3  0.109620       1.59474       1.47388      0.00000    
+  3  -1.45483     -0.847022     -0.475711      0.00000    
+       0  0.00000       2
+  3  0.703461      0.610659      -1.02672      0.00000    
+  3  -2.07633     -0.933567       1.09763      0.00000    
+       0  0.00000       2
+  3  0.980930     -0.190707       1.87757      0.00000    
+  3 -0.147162       1.19543      -1.33402      0.00000    
+       0  0.00000       2
+  3 -0.248993E-01  0.229398E-02  0.218215      0.00000    
+  3   2.57963       1.51786      -1.74041      0.00000    
+       0  0.00000       2
+  3 -0.498007E-01  0.156079E-01  0.407238      0.00000    
+  3   2.39654      -2.16104      0.942727      0.00000    
+       0  0.00000       2
+  3  -1.52398     -0.646971      0.365596      0.00000    
+  3   1.32671     -0.749101      -1.62466      0.00000    
+       0  0.00000       2
+  3   1.58627      0.256405       1.15329      0.00000    
+  3 -0.912050       1.48990     -0.860271      0.00000    
+       0  0.00000       2
+  3  0.126006     -0.604911      0.252672E-01  0.00000    
+  3  0.250040      0.809886       3.09960      0.00000    
+       0  0.00000       2
+  3 -0.689021      0.608384       1.08041      0.00000    
+  3  0.826640     -0.580918      -2.28291      0.00000    
+       0  0.00000       2
+  3  0.181510      0.100358       2.73313      0.00000    
+  3  0.267026E-01 -0.488668      -1.05197      0.00000    
+       0  0.00000       2
+  3 -0.506294       1.77377      0.508686      0.00000    
+  3  -1.19187      -1.61819     -0.859074E-01  0.00000    
+       0  0.00000       2
+  3 -0.918386E-01   1.36886     -0.533997E-01  0.00000    
+  3  -1.87563      0.619760       1.59691      0.00000    
+       0  0.00000       2
+  3  0.498094       1.10122      -1.16998      0.00000    
+  3 -0.478193      0.853861       2.01537      0.00000    
+       0  0.00000       2
+  3   2.30220      -1.17915       1.30334      0.00000    
+  3 -0.444826     -0.858767     -0.215479      0.00000    
+       0  0.00000       2
+  3  0.123099     -0.207301      -2.50916      0.00000    
+  3  -1.26185      0.490780     -0.328704      0.00000    
+       0  0.00000       2
+  3  0.886935     -0.527714     -0.900729      0.00000    
+  3  -1.81859      0.674142      -1.64492      0.00000    
+       0  0.00000       2
+  3  0.556411      0.202865     -0.932394      0.00000    
+  3   2.57831     -0.643225     -0.858514      0.00000    
+       0  0.00000       2
+  3  -1.36989      -2.07238     -0.761639      0.00000    
+  3  0.873494      0.371257E-01  0.978067      0.00000    
+       0  0.00000       2
+  3  0.710897     -0.136395      0.727793      0.00000    
+  3   1.31033       1.01024       2.33788      0.00000    
+       0  0.00000       2
+  3  0.828038      -1.67383      -1.22758      0.00000    
+  3  -1.59325     -0.549272      0.935111E-01  0.00000    
+       0  0.00000       2
+  3  0.194164      -1.51089      0.804185      0.00000    
+  3   1.89021      0.828123     -0.764443      0.00000
Index: /snovis/trunk/scripts/snemo.geom
===================================================================
--- /snovis/trunk/scripts/snemo.geom	(revision 100)
+++ /snovis/trunk/scripts/snemo.geom	(revision 100)
@@ -0,0 +1,137 @@
+#///////////////////////////////////////////////////////////////////////
+#/////  File containing SuperNemo geometry implementation options  /////
+#///////////////////////////////////////////////////////////////////////
+
+
+
+#////////////////////////   SOURCE FOIL   /////////////////////////////
+
+# SOURCE layout (Options: simple)
+GEOMETRY SOURCE_layout S simple
+
+# SOURCE thickness (mm)
+GEOMETRY SOURCE_thick D 0.060
+
+# SOURCE height (cm)
+GEOMETRY SOURCE_height D 350.
+
+# SOURCE width (cm)
+GEOMETRY SOURCE_width D 450.
+
+# SOURCE materials (Options: Molibdenium, Selenium, Neodymium, ...)
+GEOMETRY SOURCE_mat S Molibdenium
+
+
+#//////////////////////   TRACKING CHAMBER   //////////////////////////
+
+# Tracking Chamber total length (cm)
+GEOMETRY TC_length D 120.
+
+# Tracking Chamber height (cm)
+GEOMETRY TC_height D 400.
+
+# Tracking Chamber width (cm)
+GEOMETRY TC_width D 500.
+
+# Tracking gas materials (Options: Helium, Tracking_gas, ...)
+GEOMETRY TC_mat S Tracking_gas
+
+# Tracking Chamber gas pressure (atm)
+GEOMETRY TC_pressure D 0.89
+
+# Tracking Chamber gas temperature (kelvin)
+GEOMETRY TC_temperature D 300.
+
+
+#/////////////////   TRACKING PLANES DISTRIBUTION   ////////////////////
+
+# Measurement planes distribution (Options: nblocks)
+GEOMETRY TC_planes_dist S nblocks
+
+# /// In the case of "nblocks" planes distribution:
+
+# Number of planes GG blocks
+GEOMETRY TC_num_blocks I 3
+
+# Number of planes in every GG block
+GEOMETRY TC_planes_per_block V 3
+4
+2
+3
+
+# Gap size (cm) for every GG block
+GEOMETRY TC_gaps_Z V 3
+5.0
+15.0
+15.0
+
+
+#//////////////////////   DRIFT CELLS   ////////////////////////
+
+# Drift cell geometry (Options: gwires_8)
+GEOMETRY DCELL_layout S gwires_8
+
+# Drift cell diametry (mm)
+GEOMETRY DCELL_diam D 30.
+
+# Drift cell anode wires diametry (um)
+GEOMETRY DCELL_AWIRE_diam D 50.
+
+# Drift cell anode wires material
+GEOMETRY DCELL_AWIRE_mat S Inox
+
+# Drift cell ground wires diametry (um)
+GEOMETRY DCELL_GWIRE_diam D 50.
+
+# Drift cell ground wires material
+GEOMETRY DCELL_GWIRE_mat S Inox
+
+# Drift cell cathode ring outer diameter (mm)
+GEOMETRY DCELL_CRING_outer_diam D 23.
+
+# Drift cell cathode ring inner diameter (mm)
+GEOMETRY DCELL_CRING_inner_diam D 22.5
+
+# Drift cell cathode ring height (mm)
+GEOMETRY DCELL_CRING_height D 35.
+
+# Drift cell ground wires material
+GEOMETRY DCELL_CRING_mat S Copper
+
+# Place extra ground wire between adjacent cells of same plane
+GEOMETRY DCELL_GWIRE_extra_cell I 1
+
+# Place extra ground wire between adjacent cells of adjacent planes
+GEOMETRY DCELL_GWIRE_extra_plane I 1
+
+
+#///////////////////   CALORIMETER BLOCKS   /////////////////////
+
+# Calorimeter layout
+GEOMETRY CALO_layout S basic
+
+# Calorimeter blocks total thickness (wrapper included) (cm)
+GEOMETRY CALO_BLOCK_thick D 10.
+
+# Calorimeter blocks total height (wrapper included) (cm)
+GEOMETRY CALO_BLOCK_height D 25.
+
+# Calorimeter blocks total width (wrapper included) (cm)
+GEOMETRY CALO_BLOCK_width D 25.
+
+# Calorimeter blocks wrapper thickness (mm)
+GEOMETRY CALO_WRAP_thick D 0.05
+
+# Calorimeter blocks wrapper material (Mylar, ...)
+GEOMETRY CALO_WRAP_mat S Mylar
+
+
+#//////////////////////   MAGNETIC FIELD   ////////////////////////
+
+# Magnetic field (B) intensity (in Gauss) (10 KGauss = 1 Tesla)
+GEOMETRY B_int D 25.0
+
+# Magnetic field (B) direction (Options: Y, Z)
+GEOMETRY B_dir S Y
+
+# end of SuperNEMO module geometry file
Index: /snovis/trunk/scripts/snova.par
===================================================================
--- /snovis/trunk/scripts/snova.par	(revision 100)
+++ /snovis/trunk/scripts/snova.par	(revision 100)
@@ -0,0 +1,174 @@
+#//////////////////////////////////////////////////////////
+#/////  File containing snova implementation options  /////
+#//////////////////////////////////////////////////////////
+
+
+#/////////////////////////////////
+# This is group GLOBAL variables
+#/////////////////////////////////
+
+# Simulation data verbosity (MUTE, CONCISE, NORMAL, DETAILED, VERBOSE, VVERBOSE)
+GLOBAL simulation_verbosity S NORMAL
+
+# G4 Tracking verbosity ("0", "1", "2", "3", ...)
+GLOBAL G4Tracking_verbosity S 0
+
+# Output dst file name 
+# Allowed extensions: '.txt' for text files
+#                     '.gz'  for gziped text files
+#                     '.h5' for HDF5 files
+GLOBAL dst_fname S data/dst_test_random_Nd150_Bon.txt
+
+######### VERTEX GENERATOR SECTION ########
+
+#/////////////////////////////////
+# This is group VERTEX variables
+#/////////////////////////////////
+
+# Type of vertex generator: identified by unique 'name' registred 
+# in the Vertex Generator Factory:
+# Options: "source_simple"
+#          "CALO_basic"
+#          "from_file"
+#          "spot"
+VERTEX VG.type S source_simple
+
+# the label of the vertex generator:
+VERTEX VG.label S source_simple_bluk
+
+# definition of a list of properties to configure the vertex generator:
+# here this is vertex randomized from the bulk volume of the source foil:
+VERTEX VG.configuration.source_simple_bluk SV 3
+locate=bulk
+save-file=Yes
+save-filename=source_simple_bluk.vtx
+
+# here this is vertex randomized from the front surface of the source foil:
+VERTEX VG.configuration.source_simple_sf SV 4
+locate=surf
+side=front
+save-file=Yes
+save-filename=source_simple_sf.vtx
+
+# here this is vertex randomized from the back surface of the source foil:
+VERTEX VG.configuration.source_simple_sb SV 4
+locate=surf
+side=back
+save-file=Yes
+save-filename=source_simple_sb.vtx
+
+# here this is vertex randomized from the both front/back surfaces of the source foil:
+VERTEX VG.configuration.source_simple_sa SV 4
+locate=surf
+side=all
+save-file=Yes
+save-filename=source_simple_sa.vtx
+
+# here this is vertex randomized from CALO blocks on wrapper front surfaces
+# from all walls
+VERTEX VG.configuration.CALO_basic_wsaf SV 5
+locate=wrapper_surf
+wall=all
+side=front
+save-file=Yes
+save-filename=CALO_basic_wsaf.vtx
+
+# here this is vertex randomized from CALO blocks on wrapper back surfaces
+# from all walls
+VERTEX VG.configuration.CALO_basic_wsab SV 5
+locate=wrapper_surf
+wall=all
+side=back
+save-file=Yes
+save-filename=CALO_basic_wsab.vtx
+
+# here this is vertex randomized from CALO blocks in wrapper volume (bulk)
+# from all walls
+VERTEX VG.configuration.CALO_basic_wbaa SV 5
+locate=wrapper_bulk
+wall=all
+side=all
+save-file=Yes
+save-filename=CALO_basic_wbaa.vtx
+
+######### PRIMARY PARTICLES GENERATOR SECTION ########
+
+# this is for randomize direction of the primary event: 
+EVGEN EG.randomize_dir I 1
+
+# (E)vent (G)enerator type:
+# Options (hardcoded generators):
+# "from_genbb_file" : uses an input file from GENBB-like program
+# "single_particle" : shoot single particle in energy range
+EVGEN EG.type S from_genbb_file
+#EVGEN EG.type S single_particle
+
+# this is the input file used by the 'from_genbb_file' EG:
+EVGEN EG.from_genbb_file.source S gen_data/example_Mo100.txt
+
+# this is the input parameters for used by the 'single_particle' EG:
+EVGEN EG.single_particle.name S electron
+
+# minimal kinetic energy in keV:
+EVGEN EG.single_particle.min_energy D 500.
+
+# maximal kinetic energy in keV:
+EVGEN EG.single_particle.max_energy D 3000.
+
+######### SIM. NUMBER OF EVENTS ########
+
+# Number of events
+GLOBAL num_events I 10
+
+
+######### GEOMETRY SECTION ########
+
+# GEOMETRY parameters file
+GLOBAL geom_file S snemo.geom
+
+
+######### MISC SECTION ########
+
+# In case of visual run, display a complete view (1) or just the shape (0)
+GLOBAL DISPLAY_ALL I 0
+
+
+######### PHYSICS SECTION ########
+
+#///////////////////////////////////
+# This is group PHYSICS variables
+#///////////////////////////////////
+
+# Energy Loss Enabled for electrons (0=OFF 1=ON)
+PHYSICS energy_loss I 1
+
+# Multiple Scattering Enabled for electrons (0=OFF 1=ON)
+PHYSICS mult_scattering I 1
+
+# Maximum Step Length inside the SOURCE (mm)
+PHYSICS SOURCE_max_step D 0.01
+
+# Maximum Step Length inside the GEIGER CELLS (mm)
+PHYSICS GG_CELL_max_step D 5.
+
+# Cut (mm) for Calorimeter region
+PHYSICS calo_cut D 5.
+
+# Cut (mm) for Tracking region
+PHYSICS tracking_cut D .5
+
+# Cut (mm) for Source region
+PHYSICS source_cut D .05
+
+
+#///////////////////////////////////
+# This is group CHECK variables
+#///////////////////////////////////
+
+# Store meaning-less particles generated at the Calorimeter: YES (1) or NO (0)
+CHECK store_all I 0
+
+# Print BHEP Stored particles at the end: YES (1) or NO (0)
+CHECK print_parts I 0
+
+# end of parameters file
Index: /snovis/trunk/source/Callbacks.cxx
===================================================================
--- /snovis/trunk/source/Callbacks.cxx	(revision 100)
+++ /snovis/trunk/source/Callbacks.cxx	(revision 100)
@@ -0,0 +1,94 @@
+//
+//  All functions here should be OnX callbacks, that is to say
+// functions with signature :
+//   extern "C" {
+//     void callback_without_arguments(IUI&);
+//     void callback_with_arguments(IUI&,const std::vector<std::string>&);
+//   }
+//
+
+#include <OnX/Helpers/OnX.h>
+#include <OnX/Helpers/Inventor.h>
+
+// Slash :
+#include <Slash/Core/ISession.h>
+#include <Slash/UI/IUI.h>
+#include <Slash/UI/ISoViewer.h>
+
+// Lib :
+#include <Lib/System.h>
+#include <Lib/Manager.h>
+#include <Lib/Printer.h>
+#include <Lib/Out.h>
+
+// G4Lab :
+#include <G4Lab/Interfaces/IGeant4Manager.h>
+
+extern "C" {
+
+//////////////////////////////////////////////////////////////////////////////
+/// snovis/scripts/OnX/snovis.onx //////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+void snovis_Initialize(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+// Should be executed (in a widget create callback) 
+// when the GUI is constructed 
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  Slash::UI::ISoViewer* soViewer = ui_SoViewer(aUI);
+  if(soViewer) {
+    soViewer->setDecoration(true);
+    soViewer->setViewing(true);
+  }
+
+  aUI.setCallback("OnX_File_exit","activate","DLD","G4Lab G4Lab_exit");
+
+  Slash::Core::ISession& session = aUI.session();
+
+  session.setParameter("modeling.highlightColor","white");
+  session.setParameter("modeling.trajectories","pickable");
+  session.setParameter("event.scan","yes");
+    
+  IGeant4Manager* g4Manager = 
+    Lib_findManager(session,"Geant4Manager",IGeant4Manager);
+  if(!g4Manager) {
+    aUI.echo("snovis_Initialize : Geant4Manager not found.");
+  } else {
+    // Declare a callback executed at each end of event :
+    g4Manager->setEventEndScript("DLD","snovis snovis_eventEnd");
+    //Declare G4Lab types (PV, Trajectory, HitsCollections, etc...).
+    g4Manager->initialize(); 
+  }
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_Finalize(
+ Slash::UI::IUI&
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_execute_eventEnd(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  Slash::Core::ISession& session = aUI.session();
+
+  std::string value;
+  if(!session.parameterValue("event.scan",value)) return;
+  // To avoid falling in the ui.steer();
+  session.setParameter("event.scan","no");
+
+  aUI.executeScript("DLD","snovis snovis_eventEnd");
+
+  // Restore previous event.scan :
+  session.setParameter("event.scan",value);
+}
+
+} // extern "C"
Index: /snovis/trunk/source/InventorCallbacks.cxx
===================================================================
--- /snovis/trunk/source/InventorCallbacks.cxx	(revision 100)
+++ /snovis/trunk/source/InventorCallbacks.cxx	(revision 100)
@@ -0,0 +1,91 @@
+//
+//  All functions here should be OnX callbacks, that is to say
+// functions with signature :
+//   extern "C" {
+//     void callback_without_arguments(IUI&);
+//     void callback_with_arguments(IUI&,const std::vector<std::string>&);
+//   }
+//
+
+//
+// HEPVis and Inventor related callbacks.
+//
+
+#include <OnX/Helpers/OnX.h>
+#include <OnX/Helpers/Inventor.h>
+
+#include <Lib/mmanip.h>
+
+#include <Inventor/nodes/SoOrthographicCamera.h>
+
+// HEPVis :
+#include <HEPVis/nodekits/SoPage.h>
+#include <HEPVis/nodekits/SoDisplayRegion.h>
+
+extern "C" {
+
+//////////////////////////////////////////////////////////////////////////////
+void snovis_eventEnd(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  Slash::Core::ISession& session = aUI.session();
+
+  SoPage* soPage = ui_SoPage(aUI);
+  if(!soPage) return;
+
+  SoRegion* soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+
+  soRegion->clear("dynamicScene");
+
+  //data_collect(session,"Trajectory","particle==\"gamma\"");
+  //data_collect(session,"Trajectory","particle==\"e-\"");
+  //data_collect(session,"Trajectory","particle==\"e+\"");
+
+  data_collect(session,"Trajectory");
+  data_visualize(session);
+
+  std::string svalue;
+  if(!session.parameterValue("modeling.trajectories",svalue)) return;
+
+  if( (svalue=="immediate_all") || 
+      (svalue=="immediate_time") ||
+      (svalue=="pickable") ) {
+    std::string event_scan;
+    session.parameterValue("event.scan",event_scan);
+    if(event_scan=="yes") {
+      //Enter secondary interactive loop to
+      // play with the event :
+      aUI.echo("Play with the event...");
+      aUI.steer();
+    } else {
+      aUI.synchronize();
+    }
+  }
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_Page_create(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  SoPage* soPage = ui_SoPage(aUI);
+  if(!soPage) return;
+
+  soPage->deleteRegions();
+  soPage->titleVisible.setValue(FALSE);
+  soPage->title.setValue("snovis");
+  soPage->createRegions("SoDisplayRegion",1,1,0);
+
+  SoRegion* soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+
+  soRegion->color.setValue(SbColor(0,0,0));
+}
+
+
+} // extern "C"
Index: /snovis/trunk/source/Layouts.cxx
===================================================================
--- /snovis/trunk/source/Layouts.cxx	(revision 100)
+++ /snovis/trunk/source/Layouts.cxx	(revision 100)
@@ -0,0 +1,267 @@
+//
+//  All functions here should be OnX callbacks, that is to say
+// functions with signature :
+//   extern "C" {
+//     void callback_without_arguments(Slash::UI::IUI&);
+//     void callback_with_arguments(Slash::UI::IUI&,
+//                                  const std::vector<std::string>&);
+//   }
+//
+
+#include <OnX/Helpers/OnX.h>
+#include <OnX/Helpers/Inventor.h>
+
+#include <Inventor/nodes/SoOrthographicCamera.h>
+
+// HEPVis :
+#include <HEPVis/SbMath.h>
+#include <HEPVis/nodekits/SoPage.h>
+#include <HEPVis/nodekits/SoDisplayRegion.h>
+
+extern "C" {
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+void snovis_scene_default(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+// Visualize same scene as snova_vis_example.mac.
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  Slash::Core::ISession& session = aUI.session();
+  
+  session.setParameter("modeling.modeling","wire_frame");
+
+  data_collect(session,"PV","name==\"WORLD\"");
+  data_visualize(session);
+
+  data_collect(session,"PV","name==\"DETECTOR\"");
+  data_visualize(session);
+
+  data_collect(session,"PV","name==\"[CALO:0.0.0]\"");
+  data_visualize(session);
+
+  data_collect(session,"PV","name==\"CHAMBER\"");
+  data_visualize(session);
+
+  data_collect(session,"PV","name==\"[SOURCE.STRIP:0.0]\"");
+  data_visualize(session);
+
+  data_collect(session,"PV","name==\"[TC.CELL:0.0.0]\"");
+  data_visualize(session);
+
+  data_collect(session,"PV","name==\"[TC.LAYER:1.0]\"");
+  data_visualize(session);
+
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_layout_default(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  //////////////////////////////////////////////////////////////////////////
+  // Prepare the page :
+  //////////////////////////////////////////////////////////////////////////
+  SoPage* soPage = ui_SoPage(aUI);
+  if(!soPage) return;
+
+  soPage->deleteRegions();
+  soPage->titleVisible.setValue(FALSE);
+  soPage->createRegions("SoDisplayRegion",1,1,1);
+
+  // Lonely region ; front view :
+  soPage->setCurrentRegion(0);
+  SoRegion* soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  SoRegion* fromRegion = soRegion;
+  soRegion->color.setValue(SbColor(0,0,0));
+
+  SoCamera* soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(5000);
+  soCamera->position.setValue(0,0,5000);
+  soCamera->orientation.setValue(SbRotation(SbVec3f(0,1,0),0));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(5000);
+
+  //////////////////////////////////////////////////////////////////////////
+  // Scene :
+  //////////////////////////////////////////////////////////////////////////
+  soPage->setCurrentRegion(0);
+
+  snovis_scene_default(aUI);
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_layout_front_top(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  //////////////////////////////////////////////////////////////////////////
+  // Prepare the page :
+  //////////////////////////////////////////////////////////////////////////
+  SoPage* soPage = ui_SoPage(aUI);
+  if(!soPage) return;
+
+  soPage->deleteRegions();
+  soPage->titleVisible.setValue(FALSE);
+  soPage->createRegions("SoDisplayRegion",1,2,1);
+
+  // First region ; front view :
+  soPage->setCurrentRegion(0);
+  SoRegion* soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  SoRegion* fromRegion = soRegion;
+  soRegion->color.setValue(SbColor(0,0,0));
+
+  SoCamera* soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(5000);
+  soCamera->position.setValue(0,0,5000);
+  soCamera->orientation.setValue(SbRotation(SbVec3f(0,1,0),0));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(5000);
+
+  // Second region ; top view :
+  soPage->setCurrentRegion(1);
+  soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  soRegion->color.setValue(SbColor(0,0,0));
+  soRegion->connectFrom(fromRegion);
+
+  soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(5000);
+  soCamera->position.setValue(0,5000,0);
+  soCamera->orientation.setValue(SbRotation(SbVec3f(1,0,0),-1.57F));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(5000);
+
+  //////////////////////////////////////////////////////////////////////////
+  // Scene :
+  //////////////////////////////////////////////////////////////////////////
+
+  soPage->setCurrentRegion(0);
+
+  snovis_scene_default(aUI);
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_layout_CAD(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  //////////////////////////////////////////////////////////////////////////
+  // Prepare the page :
+  //////////////////////////////////////////////////////////////////////////
+  SoPage* soPage = ui_SoPage(aUI);
+  if(!soPage) return;
+
+  soPage->deleteRegions();
+  soPage->titleVisible.setValue(FALSE);
+  soPage->createRegions("SoDisplayRegion",2,2,1);
+
+  // Connect the second, third, fourth region to the first one.
+
+  // First region ; side view, +z at right :
+  soPage->setCurrentRegion(0);
+  SoRegion* soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  SoRegion* fromRegion = soRegion;
+  soRegion->color.setValue(SbColor(0,0,0));
+
+  float size = 5500;
+
+  SoCamera* soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(size);
+  soCamera->position.setValue(-size,0,0);
+  soCamera->orientation.setValue(SbRotation(SbVec3f(0,1,0),-FM_PI_2));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(size);
+
+  // Second region ; front view :
+  soPage->setCurrentRegion(1);
+  soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  soRegion->color.setValue(SbColor(0,0,0));
+  soRegion->connectFrom(fromRegion);
+
+  soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(size);
+  soCamera->position.setValue(0,0,size);
+  soCamera->orientation.setValue(SbRotation(SbVec3f(0,1,0),0));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(size);
+
+  // Third region ; top view :
+  soPage->setCurrentRegion(2);
+  soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  soRegion->color.setValue(SbColor(0,0,0));
+  soRegion->connectFrom(fromRegion);
+
+  soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(size);
+  soCamera->position.setValue(0,size,9);
+  soCamera->orientation.setValue(SbRotation(SbVec3f(-1,-1,-1),2*FM_PI/3));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(size);
+
+  // Fourth region ; 3D view :
+  soPage->setCurrentRegion(3);
+  soRegion = soPage->currentRegion();
+  if(!soRegion) return;
+  soRegion->color.setValue(SbColor(0,0,0));
+  soRegion->connectFrom(fromRegion);
+
+  size = 2*size;
+
+  soCamera = soRegion->getCamera();
+  if(soCamera->isOfType(SoOrthographicCamera::getClassTypeId()))
+    ((SoOrthographicCamera*)soCamera)->height.setValue(size);
+  soCamera->position.setValue(-10866.0F,12873.0F,-8335.0F);
+  soCamera->orientation.setValue
+    (SbRotation(SbVec3f(-0.178F,-0.92F,-0.361F),2.27F));
+  soCamera->nearDistance.setValue(1);
+  soCamera->farDistance.setValue(100000);
+  soCamera->focalDistance.setValue(size);
+
+  ////////////////////////////////////////////////////////////////////////////
+  // Scene :
+  ////////////////////////////////////////////////////////////////////////////
+
+  soPage->setCurrentRegion(0);
+
+  snovis_scene_default(aUI);
+}
+//////////////////////////////////////////////////////////////////////////////
+void snovis_InputLayout_ok(
+ Slash::UI::IUI& aUI
+) 
+//////////////////////////////////////////////////////////////////////////////
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  std::string layout;
+  if(!aUI.parameterValue
+    ("snovis_InputLayout_input_layout.value",layout)) return;
+
+  aUI.executeScript("DLD","snovis snovis_layout_"+layout);
+
+}
+
+}
