Index: trunk/SophyaLib/Manual/defsophya.sty
===================================================================
--- trunk/SophyaLib/Manual/defsophya.sty	(revision 2788)
+++ trunk/SophyaLib/Manual/defsophya.sty	(revision 2790)
@@ -4,7 +4,7 @@
 \newcommand{\tclsc}[2] {#1$<$#2$>$}   
 %  Putting a class name in a box
-\newcommand{\clsbox}[1] { \framebox[40mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf #1} } }
+\newcommand{\clsbox}[1] { \framebox[45mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf #1} } }
 %  Emplty class box
-\newcommand{\eclbox} { \makebox[40mm][c]{\mbox{\rule[-1mm]{0mm}{5mm}} } \ }
+\newcommand{\eclbox} { \makebox[45mm][c]{\mbox{\rule[-1mm]{0mm}{5mm}} } \ }
 %  Length of \longleftarrow
 \newlength{\arrclsw}   \settowidth{\arrclsw}{$\longleftarrow$}
Index: trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- trunk/SophyaLib/Manual/sophya.tex	(revision 2788)
+++ trunk/SophyaLib/Manual/sophya.tex	(revision 2790)
@@ -43,5 +43,5 @@
 \vspace{1cm}
 \begin{center}
-{\bf \Large Sophya Version: 1.5 (V\_Dec2002) }
+{\bf \Large Sophya Version: 2.0 (V\_Jun2005) }
 % Document revision 1.0 }
 \end{center}
@@ -59,11 +59,11 @@
 physics analysis software development. Our goal is to provide
 easy to use, yet powerful classes which can be used by scientists.
-We have decided to use as much as possible available 
-numerical analysis libraries, encapsulating them whenever
-possible. Although some the modules in SOPHYA have been 
-designed with the specific goal of providing some of the tools for
-the Planck-HFI data processing software, most of the
-packages presented here have a more general scope than the 
-CMB analysis and Planck mission problem. 
+Although some of the SOPHYA modules (SkyMap, Samba, SkyT) 
+have been designed with the specific goal CMB data analysis, most
+modules presented here have a much broader scope and can be
+used in scientific data analysis and modeling/simulation. 
+Whenever possible, we use existing numerical package and libraries, 
+encapsulating them whenever
+possible. 
 \par
 \vspace*{2mm}
@@ -77,9 +77,9 @@
 \vspace*{2mm}
 The source directory tree 
-\footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSPlanck} 
+\footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSSophya} 
 is organised into a number of modules. 
 
 \begin{itemize}
-\item[] {\bf Mgr/}  Scripts for code management, 
+\item[] {\bf BuildMgr/}  Scripts for code management, 
 makefile generation and software installation
 \item[] {\bf BaseTools/} General architecture support classes such 
@@ -92,14 +92,13 @@
 (linear, and non linear parameter fitting, FFT, \ldots)
 \item[] {\bf HiStats/}  Histogram-ming and data set handling classes (tuples) \\
-({\tt Histo Histo2D NTuple XNTuple} \ldots)
-\item[] {\bf SkyMap/} Local and full sky maps, and few geometry 
+({\tt Histo Histo2D NTuple DataTable} \ldots)
+\item[] {\bf SkyMap/} Local and full sky maps, and some 3D geometry 
 handling utility classes. \\
 ({\tt PixelMap<T>, LocalMap<T>, SphericalMap<T>, \ldots})
-\item[] {\bf SUtils/} This module contains 
-few utility classes, such as the
+\item[] {\bf SUtils/} This module contains few utility classes, such as the
 {\tt DataCard} class, as well as string manipulation functions in C and C++.
 \item[] {\bf SysTools/} This module contains classes implementing 
 an interface to various OS specific services, such 
-as shared object and dynamic link handling.
+threads and dynamic link/shared library handling.
 
 \end{itemize}
@@ -125,4 +124,6 @@
 extracted from the {\bf Xephem } source code. The corresponding source 
 code is also available from SOPHYA cvs repository, module {\bf XephemAstroLib}. 
+\item[] {\bf MinuitAdapt/} Wrapper classes to CERN minimization routines (Minuit). 
+
 \end{itemize}
 
@@ -162,6 +163,6 @@
 \begin{itemize}
 \item[] {\bf Examples/} Sample SOPHYA codes and example programs and
-makefiles (auto\_makefile and ex\_makefile).
-\item[] {\bf DemoPIApp/} Sample exripts and programs for (s)piapp 
+makefiles.
+\item[] {\bf DemoPIApp/} Sample scripts and programs for (s)piapp 
 interactive analysis tools.
 \end{itemize}   
@@ -173,58 +174,43 @@
 {\bf http://www.sophya.org}. 
 
-\subsection{Environment variables}
-Two environment variables {\bf SOPHYABASEREP} and {\bf SOPHYACXX} are used 
+\subsection{Directories, environment variables, configuration files}
+The environment variable {\bf SOPHYABASE}  is used 
 to define the path where the Sophya libraries and executable are installed.
-{\bf SOPHYABASEREP} defines the base directory path and {\bf SOPHYACXX} the 
-name of the C++ compiler. The complete path is built using {\bf SOPHYABASEREP},
-the operating system name (as obtained by the {\tt uname} command), and
-the compiler name. In the example below, we show the complete path 
-for a {\tt Linux} system, using the GNU g++ compiler:
-
 \begin{itemize}
-\item \$SOPHYABASEREP/Include : Include (.h) files
-\item \$SOPHYABASEREP/Linux-g++/Libs : Path for the archive libraries (.a)
-\item \$SOPHYABASEREP/Linux-g++/ShLibs : Shared library path (.so)
-\item \$SOPHYABASEREP/Linux-g++/Exec : Executable file path
+\item \$SOPHYABASE/include : Include (.h) files
+\item \$SOPHYABASE/lib : Path for the archive libraries (.a)
+\item \$SOPHYABASE/slb: Shared library path (.so)
+\item \$SOPHYABASE/exe : Executable file path
 \end{itemize}
 
 In order to use the shared libraries, the {\bf LD\_LIBRARY\_PATH} variable
 should contain the Sophya shared library path 
-({\tt \$SOPHYABASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux)
-
-For modules using external libraries, the {\bf EXTLIBDIR} 
-environment variable should contain the path to these libraries
-and corresponding include files.
-C-FitsIO anf FFTW include files should be accessible through: \\
-{\tt \$EXTLIBDIR/Include/FitsIO } \\
-{\tt \$EXTLIBDIR/Include/FFTW } \\
-The corresponding libraries are expected to be found in: \\
-{\tt \$EXTLIBDIR/Linux-g++/Libs} \\
-
-\subsection{User makefiles}
-The file {\tt \$SOPHYABASEREP/Include/MakefileUser.h} defines the compilation 
-flags and the list of Sophya libraries. It should be included in the 
-user's makefile. The default compilation rules assumes that the object (.o) 
-and executable files would be put in the following directories: \\
-{\tt \$HOME/`uname`-\$SOPHYACXX/Objs} \\ 
-{\tt \$HOME/`uname`-\$SOPHYACXX/Exec}.
-In the case of a {\tt Linux} system and using {\tt g++} as the C++ compiler, 
-these two directories would be translated to \\
-{\tt \$HOME/Linux-g++/Objs} and {\tt \$HOME/Linux-g++/Exec}. 
-The GNU make program should be used.
-\par
-The file {\tt Examples/auto\_makefile} defines the rules to compile
-a given source program, and link it against the Sophya libraries to produce
-an executable. The example below shows the steps to compile a program named
-{\tt trivial.cc }.
-\begin{verbatim}
-csh> cp Examples/auto_makefile makefile
-csh> cp Examples/ex1.cc trivial.cc
-csh> make trivial
-\end{verbatim}
-This command should compile the {\tt trivial.cc} file, 
-and link it against the sophya libraries. 
-The file {\tt Examples/ex\_makefile} provides another 
-example makefile.
+({\tt \$SOPHYABASE/slb }). \\
+On Silocon Graphics machines (IRIX64) , the default SOPHYA configuration
+correspond to the 64 bit architecture. 
+The environment variable { \bf LD\_LIBRARY64\_PATH } defines
+the shared library path in this case and should contain ({\tt \$SOPHYABASE/slb }.
+
+The configure script creates links for external libraries include files in : 
+\begin{itemize}
+\item \$SOPHYABASE/include/FitsIO : c-fitsio library include files
+\item \$SOPHYABASE/include/FFTW : FFTW library include files
+\item \$SOPHYABASE/include/XAstro : XEphem library include files
+\end{itemize}
+
+The directory { \tt \$SOPHYABASE/include/SophyaConfInfo/ } contains files
+describing the installed configuration of SOPHYA software.
+
+The file { \tt \$SOPHYABASE/include/machdefs.h } contains definitions
+(flags, typedef) used in SOPHYA. 
+
+The file { \tt \$SOPHYABASE/include/sophyamake.inc } contains the 
+compilation commands and flags used for building the software. 
+Users can use most of compilation and link commands defined in this file:
+ {\tt \$CCOMPILE , \$CXXCOMPILE . \$CXXLINK \ldots}. 
+ (See module Example).
+
+The configure script (BuildMgr/configure) creates the directory tree and the
+above files.
 
 \subsection{the runcxx program}
@@ -240,13 +226,15 @@
 \begin{verbatim}
 csh> runcxx -h
-SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Feb 28 2001 11:19:17 cxx
- runcxx : compiling and running of a piece of C++ code
-   Usage: runcxx [-compopt CompileOptions] [-linkopt LinkOptions]
-                 [-tmpdir TmpDirectory] [-f C++CodeFileName]
-                 [-inc includefile] [-inc includefile ...]
-                 [-import modulename] [-import modulename ...]
-                 [-uarg UserArg1 UserArg2 ...]
-   if no file name is specified, read from standard input
-   modulenames: SkyMap, Samba, SkyT, FitsIOServer, LinAlg, IFFTW
+ PIOPersist::Initialize() Starting Sophya Persistence management service 
+SOPHYA Version  1.9 Revision 0 (V_Mai2005) -- May 31 2005 15:11:32 cxx 
+ runcxx : compiling and running of a piece of C++ code 
+   Usage: runcxx [-compopt CompileOptions] [-linkopt LinkOptions] 
+                 [-tmpdir TmpDirectory] [-f C++CodeFileName] 
+                 [-inc includefile] [-inc includefile ...] 
+                 [-import modulename] [-import modulename ...] 
+                 [-uarg UserArg1 UserArg2 ...] 
+   if no file name is specified, read from standard input 
+   modulenames: SkyMap, Samba, SkyT, FitsIOServer, 
+                LinAlg, IFFTW, XAstroPack 
 \end{verbatim}
 Most examples in this manual can be tested using runcxx. The 
@@ -264,13 +252,17 @@
 \subsection{the scanppf program}
 {\bf scanppf} is a simple SOPHYA application which can be used to check 
-PPF files and list their contents.
+PPF files and list their contents. It can also provide the list of all registered
+PPF handlers.
 \begin{verbatim}
 csh> scanppf -h
- PIOPersist::Initialize() Starting Sophya Persistence management service
-SOPHYA Version  1.4 Revision 0 (V_Nov2002) -- Nov 15 2002 10:32:12 cxx
- Usage: scanppf filename [s/n/a0/a1/a2/a3]
-   s[=default} : Sequential reading of objects
-   n : Object reading at NameTags
-   a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
+ PIOPersist::Initialize() Starting Sophya Persistence management service 
+SOPHYA Version  1.9 Revision 0 (V_Mai2005) -- May 31 2005 15:11:32 cxx 
+ Usage: scanppf [flags] filename 
+ flags = -s -n -a0 -a1 -a2 -a3 -lh -lho 
+   -s[=default} : Sequential reading of objects 
+   -n : Object reading at NameTags 
+   -a0...a3 : Tag List with PInPersist.AnalyseTags(0...3) 
+   -lh : List PPersist handler classes 
+   -lho : List PPersist handler and dataobj classes 
 \end{verbatim}
 
@@ -342,6 +334,6 @@
 \begin{figure}[hbt]
 \dclsa{PPersist}
-\dclsbb{PIOPersist}{PInPersist}
-\dclsb{POutPersist}
+\dclsccc{PPFBinarIOStream}{PPFBinaryInputStream}{PInPersist}
+\dclscc{PPFBinaryOutputStream}{POutPersist}
 \caption{partial class diagram for classes handling persistence in Sophya}
 \end{figure}
@@ -385,6 +377,9 @@
 The operators {\tt operator << (POutPersist ...) } and 
 {\tt operator >> (PInPersist ...) } are often overloaded 
-to perform {\tt PutObject()} and {\tt GetObject()} operations,
-as illustrated in the example below:
+to perform {\tt PutObject()} and {\tt GetObject()} operations.
+the {\bf PPFNameTag} (ppfnametag.h) class can be used in conjunction with 
+{\tt << >> } operators to write objects with a name tag or to retrieve
+an object identified with a name tag. The example below shows the
+usage of these operators:
 \begin{verbatim}
 // Creating and filling a histogram
@@ -393,21 +388,12 @@
 // Writing histogram to a PPF stream
 POutPersist os("hw.ppf");
-os << hw;
+os << PPFNameTag("myhisto") << hw;
+
 // Reading a histogram from a PPF stream
 PInPersist is("hr.ppf");
-is >> hr;
+is >> PPFNameTag("myhisto")  >> hr;
 \end{verbatim}
 
 The {\bf scanppf} program can be used to list the content of a PPF file.
-\index{scanppf}
-\begin{verbatim}
-csh> scanppf -h
-SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Feb 28 2001 11:19:17 cxx
- Usage: scanppf filename [s/n/a0/a1/a2/a3]
-   s[=default} : Sequential reading of objects
-   n : Object reading at NameTags
-   a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
-\end{verbatim}
-
 
 \subsection{\tcls{NDataBlock}}
@@ -476,5 +462,19 @@
 \end{verbatim}
 
-
+\subsection{\tcls{SegDataBlock} , \tcls{SwSegDataBlock}}
+\begin{figure}[hbt]
+\dclsccc{AnyDataObj}{\tcls{SegDBInterface}}{ \tcls{SegDataBlock} }
+\dclscc{\tcls{SegDBInterface}}{ \tcls{SwSegDataBlock} }
+\end{figure}
+\begin{itemize} 
+\item[] \tcls{SegDataBlock}  handles arrays of object of
+type {\bf T} with reference sharing in memory. The array can be extended
+(increase in array size) with fixed segment size. It implements the interface
+defined by tcls{SegDBInterface}.
+\item[] \tcls{SwSegDataBlock} Implements the same tcls{SegDBInterface}
+using a data swapper (\tcls{DataSwapperInterface} . 
+Can thus be used for very large objects.
+\end{itemize}
+ 
 \newpage
 \section{Module TArray}
@@ -870,5 +870,4 @@
 \dclsbb{AnyDataObj}{Histo2D}
 \dclsbb{AnyDataObj}{Ntuple}
-\dclsb{XNtuple}
 \caption{partial class diagram for histograms and ntuples}
 \end{figure}
@@ -931,8 +930,8 @@
 \subsection{Data tables (tuples)}
 \index{NTuple}
-NTuple are memory resident tables of 32 bits floating values (float).
-They are arranged in columns. Each line is often called an event.
+NTuple are memory resident tables of 32 or 64 bits floating values 
+(float/double).They are arranged in columns. Each line is often called an event.
 These objects are frequently used to analyze data.
-Graphicals tools (spiapp) can plot a column against an other one
+The piapp graphicals tools can plot a column against an other one
 with respect to various selection cuts. \\
 Here is an example of creation and filling~:
@@ -954,35 +953,49 @@
 \end{verbatim}
 
-XNTuple are sophisticated NTuple : they accept various types
+XNTuple provide additional functionalities, compared to NTuple. 
+They are deprecated and are only kept  for backward compatibility
+and should not be used anymore. Use DataTable and 
+SwPPFDataTable instead. 
+Object of type XNTuple handle various types
 of column values (double,float,int,string,...) and can handle
 very large data sets, through swap space on disk. 
-\index{XNTuple}
-In the sample code below we show how to create a XNTuple
-object with four columns (double, double, int, string). 
-Several entries (lines) are then appended to the table,
-which is saved to a PPF file.
-\begin{verbatim}
-#include "xntuple.h"
-// ...
-char * names[4] = {"X", "X2", "XInt","XStr"};
-// XNTuple (Table) creation with 4 columns, of integer, 
-// double(2) and string type
-XNTuple  xnt(2,0,1,1, names);
-// Filling the NTuple
-r_8 xd[2];
-int_4 xi[2];
-char xss[2][32];
-char * xs[2] = {xss[0], xss[1]} ;
-for(int i=0; i<50; i++) {
-   xi[0] = i;  xd[0] = i+0.5;  xd[1] = xd[0]*xd[0];
-   sprintf(xs[0],"X=%g", xd[0]);
-   xnt.Fill(xd, NULL, xi, xs);
-}
-// Printing table info
-cout << xnt ;
-// Saving object into a PPF file
-POutPersist po("xnt.ppf");
-po << xnt ;
-\end{verbatim}
+
+\index{DataTable} 
+
+The class {\bf DataTable} extends significantly the functionalities provided by 
+NTuple. DataTable is a memory resident implementation of the interface 
+{\bf BaseDataTable } which organizes the data as a 2-D table. User can define
+the name and data type of each column. Data is added to the table as rows.
+The table is extended as necessary when adding rows. 
+The sample code below shows an example of DataTable usage :
+\begin{verbatim}
+   #include "datatable.h"
+   // ...
+   DataTable dt(64);
+   dt.AddFloatColumn("X0_f");
+   dt.AddFloatColumn("X1_f");
+   dt.AddDoubleColumn("X0X0pX1X1_d");
+   double x[5];
+   for(int i=0; i<63; i++) {
+     x[0] = (i/9)-4.;  x[1] = (i/9)-3.;  x[2] = x[0]*x[0]+x[1]*x[1];
+     dt.AddLine(x);
+   }
+   // Printing table info
+   cout << dt ;
+   // Saving object into a PPF file
+   POutPersist po("dtable.ppf");
+   po << dt ;
+
+\end{verbatim}
+
+\begin{figure}[hbt]
+\dclsccc{AnyDataObj}{BaseDataTable}{DataTable}
+\dclscc{BaseDataTable}{SwPPFDataTable}
+\end{figure}
+
+\index{SwPPFDataTable}
+The class {\bf SwPPFDataTable} implements the BaseDataTable interface
+using segmented data blocks with swap on PPF streams. Very large data sets
+can be created and manipulated through tis class
 
 \subsection{Writing, viewing \dots }
@@ -1211,9 +1224,11 @@
 The class {\bf Periodic} provides the necessary services needed to 
 implement the execution of a periodic action.
+
+\subsection{Thread management classes}
 A basic interface to POSIX threads \index{thread} is also provided
 through the \index{ZThread} {\bf ZThread}, {\bf ZMutex} and {\bf ZSync}
 classes.
-
-\subsection{Dynamic linker}
+ 
+\subsection{Dynamic linker and C++ compiler classes}
 \index{PDynLinkMgr}
 The class {\bf PDynLinkMgr} can be used for managing shared libraries
@@ -1233,7 +1248,6 @@
 \end{verbatim}
 
-\subsection{CxxCompilerLinker class}
 \index{CxxCompilerLinker}
-This class provides the services to compile C++ code and building 
+The {\bf CxxCompilerLinker} class provides the services to compile C++ code and building 
 shared libraries, using the same compiler and options which have 
 been used to create the SOPHYA shared library. 
@@ -1255,4 +1269,10 @@
 \end{verbatim}
 
+\subsection{Command interpreter}
+The class {\bf Commander} can be used in interactive programs to provide
+c-shell like command interpreter and scripting capabilties. 
+Arithmetic expression evaluation is implemented through the {\bf CExpressionEvaluator}
+and {\bf RPNExpressionEvaluator} classes. 
+ 
 \newpage
 \section{Module SkyMap}
@@ -1497,16 +1517,19 @@
 \newpage
 \section{Building and installing Sophya}
+\subsection{supported platforms}
 Presently, the Sophya library has been tested with the following
 compiler/platform pairs:
 
 \begin{center}
-\begin{tabular}{ll}
-Compaq/DEC OSF1  &     cxx  (6.0 , 6.2)  \\
-Compaq/DEC OSF1  &     g++  (2.95)  \\
-Linux            &     g++  (2.91 , 2.95)  \\
-Linux            &     KCC  (3.4)   \\
-Solaris          &     g++  (2.95)  \\
+\begin{tabular}{|l|l|}
+\hline
+OS & compiler \\
+\hline
+HP/Compaq/DEC Tru64 ( OSF1)  &     cxx  (6.1 , 6.3)  \\
+Linux (RH)          &     g++  (3.2)  \\
+Linux  (SCL)          &     icc  (8.1)   (Intel compiler) \\
 SGI IRIX64       &     CC   (7.3)   \\
-MacOSX/Darwin 10.1  &         c++/gcc 2.95  \\
+MacOSX/Darwin 10.3  &         g++ 3.3  \\
+\hline
 \end{tabular}
 \end{center}
@@ -1515,26 +1538,5 @@
 {\bf FitsIOServer} is the example of such a module, where the {\tt libcfitsio.a}
 is used.
-The build procedure expects to find the include files and the libraries in: \\
-{\tt \$EXTLIBDIR/Include/FitsIO } \\
-{\tt \$EXTLIBDIR/`uname`-\$SOPHYACXX/Libs} \\
-The complete directory tree content for the various external libraries used 
-by this version of SOPHYA is listed below:
-\begin{verbatim}
-csh> ls $EXTLIBDIR/Include/
-FFTW         FitsIO        XAstro
-csh> ls $EXTLIBDIR/Include/FFTW/
-fftw.h    rfftw.h
-csh> ls $EXTLIBDIR/Include/XAstro/
-P_.h           circum.h       satlib.h       vector.h
-astro.h        deepconst.h    satspec.h      vsop87.h
-chap95.h       preferences.h  sattypes.h
-csh> ls $EXTLIBDIR/Include/FitsIO/
-cfortran.h   eval_defs.h  fitsio.h     grparser.h   ricecomp.h
-compress.h   eval_tab.h   fitsio2.h    longnam.h
-drvrsmem.h   f77_wrap.h   group.h      region.h
-csh> ls $EXTLIBDIR/Linux-g++/Libs/
-libcfitsio.a  libfftw.la    librfftw.a    libxastro.a
-libblas.a     libfftw.a     liblapack.a   librfftw.la
-\end{verbatim}
+par
 The object files from a given Sophya module are grouped in an archive library 
 with the module's name ({\tt libmodulename.a}). All Sophya modules 
@@ -1544,40 +1546,68 @@
 grouped in ({\tt libPI.so}).
 
-The environment variables {\bf SOPHYADEVREP}, {\bf EXTLIBDIR} and {\bf SOPHYACXX}
-must be defined in order to install the Sophya package.
+\subsection{Installation} 
+
+The build procedure has two main steps: \\
+- The configure step (BuildMgr/configure) setup the directory structure and
+the necessary configuration file. \\
+- The make step compiles the different sources files, create the library and optionaly
+builds all or some of the associated executables. 
+
+\par
+{\tt BuildMgr/configure } is a c-shell script with a number of arguments:
+\begin{verbatim}
+csh> ./configure -h
+configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] 
+  [-minc mymake.inc] 
+  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] 
+  [-extlp dir1 -extlp dir2 ... ]
+  [-noextlib -noext fits -noext fftw -noext lapack ]
+  [-noext astro -noext minuit]
+\end{verbatim}
+\begin{itemize}
+\item[] -sbase : define SOPHYA installation base directory. \$SOPHYABASE is used 
+if not specified.
+\item[] -scxx : selects the C++ compiler. \$SOPHYACXX  s used 
+if not specified.
+\item[] -incln : creates symbolic link for include files, instead of copying them. 
+\item[] -minc : give an explicit name for the file used to generate 
+\$SOPHYABASE/include/sophyamake.inc.
+\item[] -extp : Adds the specied path to the search path of the external libraries 
+include files and archive library.
+\item[] -extip : Adds the specied path to the search path of the external libraries 
+include files.
+\item[] -extp : Adds the specied path to the search path of the external libraries 
+archive (libxxx.a).
+\item[] -noextlib : Disable compiling of modules referencing external libraries.
+\item[] -noext : Disable compiling of the specified module (with reference to external
+library. 
+\end{itemize}
+
 In the example below, we assume that we want to install Sophya from a 
 released (tagged) version in the source directory {\tt \$SRC} in the
-{\tt /usr/local/Sophya} diretory, using {\tt g++}. We assume that 
-the external libraries directory tree has been set up in 
-{\tt /usr/local/ExtLibs/}. \\[3mm]
-\centerline{ 
-	  \rule{20mm}{0.5mm} 
-	{\bf \large the use of GNU make is mandatory} 
-	\rule{20mm}{0.5mm} }
- 
+{\tt /usr/local/Sophya} directory, using {\tt g++}. We assume that 
+the external libraries can be found in {\tt /usr/local/ExtLibs/}. 
+We disable the compilation of the MinuitAdapt and XAstrPack packages.
+
 \vspace*{3mm}
 \begin{verbatim}
-# We select our C++ compiler
-csh> setenv SOPHYACXX g++
-# Setup the build directory
+# Create the top level  directory
 csh> mkdir /usr/local/Sophya/
-csh> setenv SOPHYADEVREP /usr/local/Sophya/
-csh> setenv EXTLIBDIR /usr/local/ExtLibs/
-# Use the top level makefile in Mgr/ 
-csh> cd \$SRC
-csh> cp Mgr/Makefile Makefile
-# Step 1: Create the directory tree and copy the include files (.h)
-csh> make depend
-# Step 2: Compile the modules without external library reference
+csh> cd $SRC/BuildMgr
+# Step 1.a : Run the configuration script 
+csh> ./configure -sbase /usr/local/Sophya -scxx g++  -extp /usr/local/ExtLibs/ \
+-noext astro -noext minuit 
+# Step 1.b : Check the generated file  $SOPHYABASE/include/
+# Step 2.a: Compile the modules without external library reference
 csh> make libs
-# Step 3: Compile the modules WITH  external library reference (optional) 
+# Step 2.b: Compile the modules WITH  external library reference (optional) 
 csh> make extlibs
-# Step 4: Build libsophya.so
+# Step 2.c: Build libsophya.so
 csh> make slb
-# Step 5: Build libextsophya.so (optional)
+# Step 2.d: Build libextsophya.so (optional)
 csh> make slbext
-# Step 6: Compile the PI and PIext modules (optional)
+# Step 2.e: Compile the PI and PIext modules (optional)
 csh> make PI
-# Step 7: Build the corresponding shared library libPI.so (optional)
+# Step 2.f: Build the corresponding shared library libPI.so (optional)
 csh> make slbpi
 \end{verbatim}
@@ -1586,8 +1616,6 @@
 to use:
 \begin{verbatim}
-# Step 2,3,6
-csh> make all
-# Step 4,5,7
-csh> make slball
+# Step 2.a ... 2.f
+csh> make all slball 
 \end{verbatim}
 
@@ -1596,13 +1624,8 @@
 \begin{verbatim}
 # To compile test programs
-csh> cd Tests
-csh> make arrt ...
-csh> cd ..
-# To compile other programs, for example from the PMixer module
-csh> cd PMixer
-csh> make
-csh> cd ..
+csh> cd ../PrgUtil
+csh> make 
 # To build (s)piapp (libPI.so is needed)
-csh> cd ProgPI
+csh> cd ../ProgPI
 csh> make 
 csh> cd ..
