$Id: README,v 1.15 2006/08/16 15:42:16 gcosmo Exp $
-------------------------------------------------------------------

     =========================================================
     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
     =========================================================

                            AnaEx01
                            -------

  This example shows the usage of histogram and tuple manipulations using 
 an AIDA compliant system. In this example, all analysis manipulations 
 (hooking an AIDA implementation, histo booking, filling, etc...) are 
 concentrated in one class : AnaEx01AnalysisManager.

  To use an AIDA compliant analysis system with this example, the environment 
 variables :
    G4ANALYSIS_USE
    G4ANALYSIS_AIDA_CONFIG_CFLAGS
    G4ANALYSIS_AIDA_CONFIG_LIBS
 must be properly set.

  The first one permits to validate/devalidate the AIDA analysis code
 in the example code. The two others permit to give the compilation 
 and link flags of the AIDA compliant system used.

  The variable G4ANALYSIS_USE must be defined in the environment, and the
 the system properly configured to use one of the AIDA compliant analysis
 tools (i.e. path set to retrieve the 'aida-config' command).

 Working with the OpenScientist/Lab package :
 ------------------------------------------
  To reconstruct this example by using the OpenScientist/Lab 
 package (assuming that OpenScientist is installed ! ) you have
 first to "setup" the environment of the Lab package and Geant4.
 The Lab package (and all OpenScientist packages) being handled 
 by the CMT tools, you may have to setup the environment
 variable "CMTSITE" to execute site specific things in the chain
 of setup files of the OpenScientist packages. Then for example at CERN :
   csh> setenv CMTSITE CERN
  (DOS> set CMTSITE=CERN_WIN32   (for Windows))
 When done then do :
   csh> source <some directory>/Lab/<version>/cmt/setup.csh
   csh> source <your Geant4 setup script>.csh
   csh> setenv G4ANALYSIS_USE 1
   csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01
   csh> gmake

 To run :
   csh> cd analyis/Lab
   csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01

  It must produce an AnaEx01.aida file that contains some histograms 
 and a tuple.

  To plot some histograms, spawn the Lab interactive tool with :
   csh> onx
  (DOS> onx     (for Windows))
 click in 'File/Open AIDA file...' to map a file chooser, 
 then choose AnaEx01.aida. The file name should appear in the left
 tree widget beside the plotting area. Use the tree widget to browse
 the file. You can visualize histos by selecting them with the mouse.

  If the OpenScientist/OnX and Lab Python drivers had been
 reconstructed at installation of OpenScientist, then 
 you can also work with the OpenScientist/Lab/AIDA Python API. 
 You can execute AnaEx01.py by doing :
    OS> python AnaEx01.py
 or : 
    OS> python
   (>>> import AIDA)
    >>> import AnaEx01
  The AnaEx01 file contains a Python script that
 does some analysis over the AnaEx01.aida file by using the AIDA interfaces.
 This script gets an histo (EAbs) and  plots it in a first drawing region.
 Then it gets the 'AnaEx01' tuple, books and fills another histo
 from the tuple colum 'EAbs' and plots it a secon drawing region.

  If exporting a AnaEx01.root file (see src/AnaEx01AnalysisManager.cc),
 the AnaEx01.C file could also be used, within the ROOT tool. 
 To see a projection of the first column of the tuple contained
 in the AnaEx01.root file. For example :
     csh> root
     root[0] .X AnaEx01.C

  The OpenScientist URL is : http://OpenScientist.lal.in2p3.fr.
 OpenScientist is installed at CERN under /afs/cern.ch/sw/contrib.

 Working with the Falsetto package :
 ---------------------------------
  Falsetto is a little package containing a dummy 
 AIDA analysis factory. It permits to check compilation
 and link of some user AIDA code without embarquing a 
 full analysis system.

  To reconstruct this example by using the Falsetto
 package (assuming that it is installed !), do :
   csh> source <your Geant4 setup script>.csh
   csh> source <some directory>/Falsetto/<version>/cmt/setup.csh
   csh> setenv G4ANALYSIS_USE 1
   csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01
   csh> gmake

 To run :
   csh> cd analyis/Falsetto
   csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01
 At the beginning of output ;should appear :
   AIDA analysis factory not found.

 The Falsetto URL is : http://www.lal.in2p3.fr/SI/Falsetto
 Falsetto is installed at CERN under /afs/cern.ch/sw/contrib.

