Index: trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- trunk/SophyaLib/Manual/sophya.tex	(revision 1648)
+++ trunk/SophyaLib/Manual/sophya.tex	(revision 2278)
@@ -1,3 +1,3 @@
-\documentclass[twoside,11pt]{article}
+\documentclass[twoside,11pt,pdf]{article}
 %  Package standard : Utilisation de caracteres accentues, mode francais et graphique
 \usepackage{url}
@@ -36,5 +36,5 @@
 \vspace{1cm}
 \begin{center}
-{\bf \Large Sophya Version: 1.2 (V\_Jul2001) }
+{\bf \Large Sophya Version: 1.4 (V\_Nov2002) }
 % Document revision 1.0 }
 \end{center}
@@ -64,6 +64,7 @@
 presents only a brief overview of the class library, 
 mainly from the user's point of view. A more complete description
-can be found in the reference manual, available from our
-web site: {\bf http://www.sophya.org}. 
+can be found in the reference manual, available from the SOPHYA
+web site: {\bf http://www.sophya.org}.
+% \href{http://www.sophya.org}{http://www.sophya.org}. 
 \par
 \vspace*{2mm}
@@ -75,12 +76,8 @@
 \item[] {\bf Mgr/}  Scripts for code management, 
 makefile generation and software installation
-\item[] {\bf SysTools/} General architecture support classes such 
+\item[] {\bf BaseTools/} General architecture support classes such 
 as {\tt PPersist, NDataBlock<T>}, and few utility classes 
-({\tt DataCard, DVList} \ldots). Presently, this module contains
-also classes implementing interfaces to OS specific services, such 
-as shared object and dynamic link handling. This module will be 
-separated in three modules, one for the general architecture
-support, one for the utility classes, and one for the OS specific
-services.
+such as the dynamic variable list manager ({\tt DVList}) as well
+as the basic set of exception classes used in SOPHYA.
 \item[] {\bf TArray/} template numerical arrays, vectors and matrices \\
 ({\tt TArray<T> TMatrix<T> TVector<T> } \ldots) 
@@ -92,4 +89,11 @@
 handling utility classes. \\
 ({\tt PixelMap<T>, LocalMap<T>, SphericalMap<T>, \ldots})
+\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.
+
 \end{itemize}
 
@@ -116,18 +120,34 @@
 \end{itemize}
 
-Other modules:
+The following modules contain each a set of related programs using the 
+SOPHYA library.
 \begin{itemize}
 \item[] {\bf Tests/} Simple test programs
 \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
-\item[] {\bf ProgPI/} interactive analysis tool - It should be noted that 
-this module uses the SOPHYA class library and is based on {\bf PI}
-which is a C++ library defining a complete GUI program 
-architecture. An additional module (PIext) define the interactive
-analysis program framework and the interfaces with the objects
-in SOPHYA.  The {\bf PI/} \footnote{the PI package documentation 
-is available from {\bf http://www.lal.in2p3.fr/recherche/eros/PeidaDoc/} } 
-and {\bf PIext/} modules are not currently part 
-of the SOPHYA CVS structure.
+\end{itemize}
+
+As a companion to SOPHYA, the {\bf (s)piapp} interactive data analysis
+program is built on top of SOPHYA and the {\bf PI} GUI class library 
+and application framework. The {\bf PI} ({\bf P}eida {\bf Interactive})
+development started in 1995, in the EROS \footnote{EROS: {\bf E}xp\'erience 
+de {\bf R}echerche d'{\bf O}bjets {\bf S}ombres - http://eros.in2p3.fr}
+microlensing search collaboration, with PEIDA++ \footnote {PEIDA++: 
+The EROS data analysis class library - 
+http://www.lal.in2p3.fr/recherche/eros/PeidaDoc/}.
+The {\bf PI} documentation and the {\bf piapp} user's guide are available
+from {\bf http://www.sophya.org}.
+%\href{http://www.sophya.org}{http://www.sophya.org}. 
+The {\bf PI} is organized as the following modules:
+\begin{itemize}
+\item[] {\bf PI} Portable GUI class library and application development 
+framework kernel.
+\item[] {\bf PIGcont} Contour-plot drawing classes.
+\item[] {\bf PIext} Specific drawers and adapters for SOPHYA objects,
+and the {\bf piapp} interactive data analysis framework.
+\item[] {\bf ProgPI/} interactive analysis tool main program and pre-loaded 
+modules.
 \end{itemize}   
 
@@ -143,5 +163,5 @@
 \section{Using Sophya}
 Basic usage of Sophya classes are described in in the following sections.
-Complete Sophya documentation can be found at our web site: \\
+Complete Sophya documentation can be found at our web site
 {\bf http://www.sophya.org}. 
 
@@ -234,5 +254,19 @@
 csh> runcxx -f example.icc
 \end{verbatim}
- 
+
+\subsection{the scanppf program}
+{\bf scanppf} is a simple SOPHYA application which can be used to check 
+PPF files and list their contents.
+\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)
+\end{verbatim}
+
+
 \newpage
 
@@ -288,7 +322,7 @@
 
 \newpage
-\section{Module SysTools}
-
-{\bf SysTools} contains utility classes such as {\tt DataCards} or 
+\section{Module BaseTools}
+
+{\bf BaseTools} contains utility classes such as 
 {\tt DVlist}, an hierarchy of exception classes for Sophya, a template
 class {\tcls{NDataBlock}} for handling reference counting on numerical
@@ -435,63 +469,4 @@
 \end{verbatim}
 
-\subsection{Using DataCards}
-\index{DataCards}
-The {\bf DataCards} class can be used to read parameters from a file.
-Each line in the file starting with \@ defines a set of values
-associated with a keyword. In the example below, we read the 
-parameters corresponding with the keyword {\tt SIZE} from the 
-file {\tt ex.d}. We suppose that {\tt ex.d} contains the line: \\
-{\tt @SIZE 400 250} \\
-\begin{verbatim}
-#include "datacards.h"
-// ...
-// Initialising DataCards object dc from file ex.d
-DataCards dc( "ex.d" );
-// Getting the first and second parameters for keyword size
-// We define a default value 100
-int size_x = dc.IParam("SIZE", 0, 100);
-int size_y = dc.IParam("SIZE", 1, 100);
-cout << " size_x= " << size_x << " size_y= " << size_y << endl;
-\end{verbatim} 
-
-\subsection{Dynamic linker}
-\index{PDynLinkMgr}
-The class {\bf PDynLinkMgr} can be used for managing shared libraries
-at run time. The example below shows the run time linking of a function:\\
-{\tt extern "C" { void myfunc(); } } \\
-\begin{verbatim}
-#include "pdlmgr.h"
-// ...
-string soname = "mylib.so";
-string funcname = "myfunc";
-PDynLinkMgr dyl(soname);
-DlFunction f = dyl.GetFunction(funcname); 
-if (f != NULL) { 
-// Calling the function 
-  f();    
-}
-\end{verbatim}
-
-\subsection{CxxCompilerLinker class}
-\index{CxxCompilerLinker}
-This 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. 
-The sample program below illustrates using this class to build
-the shared library (myfunc.so) from the source file myfunc.cc :
-\begin{verbatim}
-#include "cxxcmplnk.h"
-// ...
-string flnm = "myfunc.cc";
-string oname, soname;
-int rc;
-CxxCompilerLinker cxx;
-// The Compile method provides a default object file name
-rc = cxx.Compile(flnm, oname);
-if (rc != 0 ) { // Error when compiling ... }
-// The BuildSO method provides a default shared object file name
-rc = cxx.BuildSO(oname, soname);
-if (rc != 0 ) { // Error when creating shared object ... }
-\end{verbatim}
 
 \newpage
@@ -1196,4 +1171,71 @@
 ffts.FFTForward(in, out);
 cout << "out= " << out << endl;
+\end{verbatim}
+
+% \newpage
+\section{Module SUtils}
+Some utility classes and C/C++ string manipulation functions are gathered
+in {\bf SUtils} module.
+\subsection{Using DataCards}
+\index{DataCards}
+The {\bf DataCards} class can be used to read parameters from a file.
+Each line in the file starting with \@ defines a set of values
+associated with a keyword. In the example below, we read the 
+parameters corresponding with the keyword {\tt SIZE} from the 
+file {\tt ex.d}. We suppose that {\tt ex.d} contains the line: \\
+{\tt @SIZE 400 250} \\
+\begin{verbatim}
+#include "datacards.h"
+// ...
+// Initialising DataCards object dc from file ex.d
+DataCards dc( "ex.d" );
+// Getting the first and second parameters for keyword size
+// We define a default value 100
+int size_x = dc.IParam("SIZE", 0, 100);
+int size_y = dc.IParam("SIZE", 1, 100);
+cout << " size_x= " << size_x << " size_y= " << size_y << endl;
+\end{verbatim}
+ 
+\section{Module SysTools}
+The {\bf SysTools} module contains classes implementing interface to some 
+OS specific services.
+\subsection{Dynamic linker}
+\index{PDynLinkMgr}
+The class {\bf PDynLinkMgr} can be used for managing shared libraries
+at run time. The example below shows the run time linking of a function:\\
+{\tt extern "C" { void myfunc(); } } \\
+\begin{verbatim}
+#include "pdlmgr.h"
+// ...
+string soname = "mylib.so";
+string funcname = "myfunc";
+PDynLinkMgr dyl(soname);
+DlFunction f = dyl.GetFunction(funcname); 
+if (f != NULL) { 
+// Calling the function 
+  f();    
+}
+\end{verbatim}
+
+\subsection{CxxCompilerLinker class}
+\index{CxxCompilerLinker}
+This 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. 
+The sample program below illustrates using this class to build
+the shared library (myfunc.so) from the source file myfunc.cc :
+\begin{verbatim}
+#include "cxxcmplnk.h"
+// ...
+string flnm = "myfunc.cc";
+string oname, soname;
+int rc;
+CxxCompilerLinker cxx;
+// The Compile method provides a default object file name
+rc = cxx.Compile(flnm, oname);
+if (rc != 0 ) { // Error when compiling ... }
+// The BuildSO method provides a default shared object file name
+rc = cxx.BuildSO(oname, soname);
+if (rc != 0 ) { // Error when creating shared object ... }
 \end{verbatim}
 
@@ -1451,4 +1493,5 @@
 Solaris          &     g++  (2.95)  \\
 SGI IRIX64       &     CC   (7.3)   \\
+MacOSX/Darwin 10.1  &         c++/gcc 2.95  \\
 \end{tabular}
 \end{center}
