Index: trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- trunk/SophyaLib/Manual/sophya.tex	(revision 3402)
+++ trunk/SophyaLib/Manual/sophya.tex	(revision 3415)
@@ -49,5 +49,5 @@
 \vspace{1cm}
 \begin{center}
-{\bf \Large Sophya Version: 2.0 (V\_Sep2006) }
+{\bf \Large Sophya Version: 2.1 (V\_Sep2007) }
 \end{center}
 \titrebp{1}
@@ -168,9 +168,9 @@
 SOPHYA library.
 \begin{itemize}
-\item[] {\bf Tests/} Simple test programs
+\item[] {\bf Tests/} Simple test programs. Many of these test programs can be also used 
+as examples for using SOPHYA. 
 \item[] {\bf PrgUtil/} Various utility programs (runcxx, scanppf, scanfits, \ldots)
 \item[] {\bf PrgMap/} Programs performing operations on skymaps: projections, 
 power spectrum in harmonic space, \ldots
-\item[] {\bf PMixer/} skymixer and related programs
 \end{itemize}
 
@@ -204,4 +204,15 @@
 interactive analysis tools.
 \end{itemize}   
+
+The following modules contains additional programs or libraries, based on SOPHYA :
+\begin{itemize}
+\item[] {\bf AnaLC} contains program files extracted from the EROS/PEIDA software
+and adapted to be compiled with SOPHYA. It can be used in particular to read and analyse
+EROS light curve data files. 
+\item[] {\bf LUC} {\bf L}ittle {\bf U}niverse {\bf C}alculator is a module containing classes to 
+perform basic computation related to the universe geometry (FRW metric).
+\item[] {\bf PMixer/} skymixer and related programs
+\end{itemize}
+
 \newpage 
 
@@ -344,4 +355,34 @@
 \end{verbatim}
 
+\subsection{the spiapp program}
+\index{spiapp} \label{spiapp}
+{\bf spiapp} is an interactive data analysis program, built on top of the SOPHYA 
+library, , the PI GUI library. The interactive data analysis framework is defined 
+by the classes in the {\bf PIext} module. spiapp has a c-shell like 
+command interpreter and can be used to manipulate SOPHYA and display 
+objects. Refer to the piapp user manual for more information.
+\begin{verbatim}
+csh> spiapp -h 
+ SophyaInitiator::SophyaInitiator() BaseTools Init
+ PIOPersist::Initialize() Starting Sophya Persistence management service 
+SOPHYA Version  2.1 Revision 0 (V_Nov2007) -- Nov 24 2007 13:08:58 gcc 3.3 20030304 (Apple Computer, Inc. build 1495)
+
+ piapp: Interactive data analysis and visualisation program 
+ Usage: piapp [-nored] [-doublered] [-termread] [-term] 
+              [-hidezswin] [-small] [-nosig] [-nosigfpe] [-nosigsegv] 
+              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] 
+  -nored : Don't redirect stdout/stderr to piapp console
+  -doublered : Redirect stdout/stderr to piapp console AND the terminal 
+  -termread : Read commands on terminal (stdin)
+  -term : equivalent to -nored -termread -small 
+  -hidezswin : Hide Zoom/Stat/ColMap window 
+  -small : Create small size main piapp window 
+  -nosig : Don't catch SigFPE, SigSEGV 
+  -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV 
+  -tmpdir TmpDirectory: defines TMDIR for temporary files 
+  -help2tex: Create a LaTeX help file (piahelp.tex)
+  -exec file [args] : Execute command file (last option)
+
+\end{verbatim}
 \newpage
 
@@ -396,4 +437,21 @@
 which shares the data, while the assignment operator copies or
 duplicate the data.
+
+\section{Multi-thread programming with SOPHYA}
+Multi-thread programming is usually safe as long as different threads DO NOT access
+the same memory locations. SOPHYA is mainly organized as classes having only 
+data members, with very few cases having static data members (memory locations
+common to all instances of a class), or seldom, global variables. \\
+Using different instances of a class in different threads is thus safe for most 
+classes / methods in SOPHYA. \\
+A major exception is the reference sharing mechanism, where different instances
+of a class may  shared memory locations. This reference sharing mechanism has been
+made thread-safe in SOPHYA, from version V=2.1. \\
+As a consequence, different execution threads can access non overlapping sub-arrays
+and access (read/write) the corresponding elements without the need of 
+mutex and thread synchonisation. Moreover, thread safe filling of 
+NTuple and DataTable objects can be activated, on an object per object basis. \\
+The {\tt ZThread, ZMutex \ldots} classes in the {\bf SysTools } module offer a relatively 
+easy way of writing multi-threaded programs.   
 
 \newpage
@@ -598,9 +656,9 @@
 \end{figure}
 \begin{itemize} 
-\item[] \tcls{SegDataBlock}  handles arrays of object of
+\item[\rond] \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}
+\item[\rond] \tcls{SwSegDataBlock} Implements the same \tcls{SegDBInterface}
 using a data swapper object. Data swappers implement the interface defined in 
 (\tcls{DataSwapperInterface} class.  \tcls{SwSegDataBlock} can 
@@ -808,5 +866,5 @@
 \item {\bf Range(idx)} represents a single index ({\bf = idx})
 \item {\bf Range(first, last)} represents the range of indices
-{\bf first} $\leq$ index $\leq$ {\bf last}.
+{\bf first} $\leq$ index $\leq$ {\bf last}.\\
 The static method {\tt Range::lastIndex()} can be used 
 to specify the last valid index.
@@ -1040,4 +1098,5 @@
 \end{verbatim}
 
+\subsection{Cast without conversion}
 
 \subsection{Memory organisation}
@@ -2011,11 +2070,12 @@
 OS & compiler \\
 \hline
-Linux           &     g++  (3.x \, 4.0)  \\
-Linux  (SCL)          &     icc - Intel compiler (9.0)   \\
+Linux (32 bits)          &     g++  (3.x \, 4.0)  \\
+Linux  (SCL, 32)          &     icc - Intel compiler (9.0)   \\
+Linux  (SCL, 64)          &     g++  3.3 \, 3.4  \\
 MacOSX/Darwin (PowerPC) 10.3 \, 10.4  &         g++ (3.3  \, 4.0)\\
 MacOSX/Darwin (Intel) 10.4  &         g++ (4.0)\\
 HP/Compaq/DEC Tru64 ( OSF1)  &     cxx  (6.1  6.3)  \\
 SGI IRIX64       &     CC   (7.3)   \\
-IBM AIX       &     xlC   (7.x)   \\
+IBM AIX (5.3)      &     xlC   (8.0)   \\
 \hline
 \end{tabular}
@@ -2069,10 +2129,11 @@
 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]
-  [-usefftw2 -uselapack2] [-singleslb]
+  [-minc mymake.inc]  [-compopt 'cc/cxxOptions'] 
+  [-arch64] [-sasz64] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]
+  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]
+  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]
+  [-noPI] [-slballinone]
+  [-alsofftwfloat] [-usefftw2] [-uselapack2] 
+  (See SOPHYA manual/web pages for a detailed description of configure options)
 \end{verbatim}
 \begin{itemize}
@@ -2083,5 +2144,7 @@
 \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.
+\$SOPHYABASE/include/sophyamake.inc. If {\tt -minc} is not specified, one of
+the files in BuildMgr/ directory is selected, based on the system name and the 
+compiler {\tt  Linux\_g++\_make.inc , OSF1\_cxx\_make.inc , AIX\_xlC\_make.inc \ldots}
 \item[] -extp : Adds the specied path to the search path of the external libraries 
 include files and archive library.
@@ -2092,13 +2155,36 @@
 \item[] -noextlib : Disable compiling of modules referencing external libraries.
 \item[] -noext : Disable compiling of the specified module (with reference to external
-library. 
-\item[] -usefftw2: FFTW V2 is being used (default FFTW V3) - A compilation flag 
-will be defined in sspvflags.h 
-\item[] -uselapack2: Lapack V2 is being used (defaulr V3) - A compilation flag 
-will be defined in sspvflags.h 
-\item[] -singleslb: A single shared library for all SOPHYA, PI and external library interface
+library : {\tt -noext fits , -noext fftw \ldots }
+\item[] -usefftw2: Use FFTW V2 instead of the default FFTW V3 - A preprocessor
+flag will be defined in sspvflags.h 
+\item[] -uselapack2: Lapack V2 is being used (defaulr V3) - A preprocessor
+flag will be defined in sspvflags.h 
+\item[] -alsofftwfloat : compile single precision (float) version  of the Fourier 
+transform methods (module IFFTW, class FFTWServer). A preprocessor
+flag will be defined in sspvflags.h and float version of the FFTW library 
+(libfftw3f.a) will be linked with SOPHYA, in addition to the default double
+precision library (libfftw3.a).
+\item[] -noPI : has currently no effect 
+\item[] -slballinone: A single shared library for all SOPHYA, PI and external library interface
 modules will be build. A compilation flag 
-will be defined in sspvflags.h . `See also target {\tt slballinone} below. 
+will be defined in sspvflags.h . \\ See also target {\tt slballinone} below. 
 \end{itemize}
+
+{\large \bf configure steps } \\[1mm]
+The configure script performs the following actions :
+\begin{enumerate}
+\item Creating directory tree under {\tt \$SOPHYABASE }
+\item Cpoying include files (or creating symbolic) in {\tt \$SOPHYABASE/include/ }
+\item Search for external libraries include files and create the necessary links 
+in {\tt \$SOPHYABASE/include}
+\item Search for external libraries (-lfits \ldots) and add the corresponding 
+directories to the library search path, in {\tt sophyamake.inc}
+\item Creates the file { \tt \$SOPHYABASE/include/sophyamake.inc }
+\item Creates the file {\tt  machdefs.h} from { BaseTools/machdefs\_mkmf.h } and 
+{\tt sspvflags.h }
+\item Creates the object list files for shared library creation
+\end{enumerate}
+
+{\large \bf Example } \\[1mm]
 
 In the example below, we assume that we want to install Sophya from a 
