Index: /trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- /trunk/SophyaLib/Manual/sophya.tex	(revision 1298)
+++ /trunk/SophyaLib/Manual/sophya.tex	(revision 1299)
@@ -130,5 +130,5 @@
 
 The file {\tt \$DPCBASEREP/Include/MakefileUser.h} defines the compilation 
-flag and the list of Sophya libraries. It should be included in the 
+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 diretories: \\
@@ -145,5 +145,5 @@
 {\tt trivial.cc }.
 \begin{verbatim}
-csh> cp $DPCBASEREP/Include/makefile_auto makefile
+csh> cp \$DPCBASEREP/Include/makefile_auto makefile
 csh> make trivial
 \end{verbatim}
@@ -157,6 +157,96 @@
 example makefile.
 
+Basic usage of Sophya classes are described in in the following sections.
+Complete Sophya documentation can be found at our web site: \\
+{\bf http://hfi-l2.in2p3.fr}. 
+
+
+\section{Module SysTools}
+
+{\bf SysTools} contains utility classes such as {\tt DataCards} or 
+{\tt DVlist}, an hierarchy of exception classes for Sophya, a template
+class {\tcls{NDataBlock}} for handling reference counting on numerical
+arrays, as well as classes providing the services for implementing simple
+serialization. 
+\vspace*{5mm}
+
+\begin{figure}[hbt]
+\dclsa{PPersist}
+\dclsbb{PIOPersist}{PInPersist}
+\dclsb{POutPersist}
+\caption{partial class diagram for classes handling persistence in Sophya}
+\end{figure}
+
+\subsection{Using 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"
+// ...
+// Initializing 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}
+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}
+
+\section{Module TArray}
+{\bf TArray} module contains template classes for handling standard 
+operations on numerical arrays. Using the class {\tt \tcls{TArray} },
+it is possible to create and manipulate up to 5-dimension numerical
+arrays {\tt (int, float, double, complex, \ldots)}.   
+
+\begin{figure}[hbt]
+\dclsccc{AnyDataObj}{BaseArray}{\tcls{TArray}}
+\ldots \\
+\dclsccc{\tcls{TArray}}{\tcls{TMatrix}}{\tcls{TVector}}
+\caption{partial class diagram for arrays, matrices and vectors}
+\end{figure}
+
+\subsection{Using arrays}
 
 \newpage 
+
+\section{Module HiStats}
+\begin{figure}[hbt]
+\dclsccc{AnyDataObj}{Histo}{HProf}
+\dclsbb{AnyDataObj}{Histo2D}
+\dclsbb{AnyDataObj}{Ntuple}
+\dclsb{XNtuple}
+\caption{partial class diagram for histograms and ntuples}
+\end{figure}
+
+\section{Module SkyMap}
+
+\section{Module NTools}
+
+\section{Module Samba}
+
+\section{Module SkyT}
+
+
 
 \section{Building and installing Sophya}
@@ -199,5 +289,5 @@
 	{\bf \large the use of GNU make is mandatory} 
 	\rule{20mm}{0.5mm} }
-
+ 
 \vspace*{3mm}
 \begin{verbatim}
@@ -209,5 +299,5 @@
 csh> setenv EXTLIBDIR /usr/local/ExtLibs/
 # Use the top level makefile in Mgr/ 
-csh> cd $SRC
+csh> cd \$SRC
 csh> cp Mgr/Makefile Makefile
 # Step 1: Create the directory tree and copy the include files (.h)
@@ -285,36 +375,13 @@
  
 \newpage
-
-\section{Learning Sophya through examples}
-The examples here illustrates the basic 
-usage of Sophya classes. Sophya documentation can be found at our web site: \\
-{\bf http://hfi-l2.in2p3.fr}. 
-
-\subsection{Using classes in SysTools}
-
-{\bf SysTools} contains utility classes such as {\tt DataCards} or 
-{\tt DVlist}, an hierarchy of exception classes for Sophya, a template
-class {\tcls{NDataBlock}} for handling reference counting on numerical
-arrays, as well as classes providing the services for implementing simple
-serialization. For simple programs, it is a good practice to handle 
+\appendix
+\section{Exception handling: An example}
+For simple programs, it is a good practice to handle 
 the exceptions at least at high level, in the {\tt main()} function. 
 The example below shows the exception handling and the usage 
 of Sophya persistence.
-\vspace*{5mm}
-
-\begin{figure}[hbt]
-\dclsa{PPersist}
-\dclsbb{PIOPersist}{PInPersist}
-\dclsb{POutPersist}
-\caption{partial class diagram for classes handling persistencein Sophya}
-\end{figure}
-
+ 
 \input{ex1.inc}
 
-\subsection{Using arrays and matrices}
-{\bf TArray} module contains template classes for handling standard 
-operations on numerical arrays. Using the class {\tt \tcls{TArray} },
-it is possible to create and manipulate up to 5-dimension numerical
-arrays {\tt (int, float, double, complex, \ldots)}.   
 
 \end{document}
