Changeset 2278 in Sophya for trunk/SophyaLib/Manual


Ignore:
Timestamp:
Nov 26, 2002, 5:23:58 PM (23 years ago)
Author:
ansari
Message:

MAJ sophya.tex pour V1.4 (liste des modules, etc ...) Reza 26/11/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Manual/sophya.tex

    r1648 r2278  
    1 \documentclass[twoside,11pt]{article}
     1\documentclass[twoside,11pt,pdf]{article}
    22%  Package standard : Utilisation de caracteres accentues, mode francais et graphique
    33\usepackage{url}
     
    3636\vspace{1cm}
    3737\begin{center}
    38 {\bf \Large Sophya Version: 1.2 (V\_Jul2001) }
     38{\bf \Large Sophya Version: 1.4 (V\_Nov2002) }
    3939% Document revision 1.0 }
    4040\end{center}
     
    6464presents only a brief overview of the class library,
    6565mainly from the user's point of view. A more complete description
    66 can be found in the reference manual, available from our
    67 web site: {\bf http://www.sophya.org}.
     66can be found in the reference manual, available from the SOPHYA
     67web site: {\bf http://www.sophya.org}.
     68% \href{http://www.sophya.org}{http://www.sophya.org}.
    6869\par
    6970\vspace*{2mm}
     
    7576\item[] {\bf Mgr/}  Scripts for code management,
    7677makefile generation and software installation
    77 \item[] {\bf SysTools/} General architecture support classes such
     78\item[] {\bf BaseTools/} General architecture support classes such
    7879as {\tt PPersist, NDataBlock<T>}, and few utility classes
    79 ({\tt DataCard, DVList} \ldots). Presently, this module contains
    80 also classes implementing interfaces to OS specific services, such
    81 as shared object and dynamic link handling. This module will be
    82 separated in three modules, one for the general architecture
    83 support, one for the utility classes, and one for the OS specific
    84 services.
     80such as the dynamic variable list manager ({\tt DVList}) as well
     81as the basic set of exception classes used in SOPHYA.
    8582\item[] {\bf TArray/} template numerical arrays, vectors and matrices \\
    8683({\tt TArray<T> TMatrix<T> TVector<T> } \ldots)
     
    9289handling utility classes. \\
    9390({\tt PixelMap<T>, LocalMap<T>, SphericalMap<T>, \ldots})
     91\item[] {\bf SUtils/} This module contains
     92few utility classes, such as the
     93{\tt DataCard} class, as well as string manipulation functions in C and C++.
     94\item[] {\bf SysTools/} This module contains classes implementing
     95an interface to various OS specific services, such
     96as shared object and dynamic link handling.
     97
    9498\end{itemize}
    9599
     
    116120\end{itemize}
    117121
    118 Other modules:
     122The following modules contain each a set of related programs using the
     123SOPHYA library.
    119124\begin{itemize}
    120125\item[] {\bf Tests/} Simple test programs
    121126\item[] {\bf PrgUtil/} Various utility programs (runcxx, scanppf, scanfits, \ldots)
     127\item[] {\bf PrgMap/} Programs performing operations on skymaps: projections,
     128power spectrum in harmonic space, \ldots
    122129\item[] {\bf PMixer/} skymixer and related programs
    123 \item[] {\bf ProgPI/} interactive analysis tool - It should be noted that
    124 this module uses the SOPHYA class library and is based on {\bf PI}
    125 which is a C++ library defining a complete GUI program
    126 architecture. An additional module (PIext) define the interactive
    127 analysis program framework and the interfaces with the objects
    128 in SOPHYA.  The {\bf PI/} \footnote{the PI package documentation
    129 is available from {\bf http://www.lal.in2p3.fr/recherche/eros/PeidaDoc/} }
    130 and {\bf PIext/} modules are not currently part
    131 of the SOPHYA CVS structure.
     130\end{itemize}
     131
     132As a companion to SOPHYA, the {\bf (s)piapp} interactive data analysis
     133program is built on top of SOPHYA and the {\bf PI} GUI class library
     134and application framework. The {\bf PI} ({\bf P}eida {\bf Interactive})
     135development started in 1995, in the EROS \footnote{EROS: {\bf E}xp\'erience
     136de {\bf R}echerche d'{\bf O}bjets {\bf S}ombres - http://eros.in2p3.fr}
     137microlensing search collaboration, with PEIDA++ \footnote {PEIDA++:
     138The EROS data analysis class library -
     139http://www.lal.in2p3.fr/recherche/eros/PeidaDoc/}.
     140The {\bf PI} documentation and the {\bf piapp} user's guide are available
     141from {\bf http://www.sophya.org}.
     142%\href{http://www.sophya.org}{http://www.sophya.org}.
     143The {\bf PI} is organized as the following modules:
     144\begin{itemize}
     145\item[] {\bf PI} Portable GUI class library and application development
     146framework kernel.
     147\item[] {\bf PIGcont} Contour-plot drawing classes.
     148\item[] {\bf PIext} Specific drawers and adapters for SOPHYA objects,
     149and the {\bf piapp} interactive data analysis framework.
     150\item[] {\bf ProgPI/} interactive analysis tool main program and pre-loaded
     151modules.
    132152\end{itemize}   
    133153
     
    143163\section{Using Sophya}
    144164Basic usage of Sophya classes are described in in the following sections.
    145 Complete Sophya documentation can be found at our web site: \\
     165Complete Sophya documentation can be found at our web site
    146166{\bf http://www.sophya.org}.
    147167
     
    234254csh> runcxx -f example.icc
    235255\end{verbatim}
    236  
     256
     257\subsection{the scanppf program}
     258{\bf scanppf} is a simple SOPHYA application which can be used to check
     259PPF files and list their contents.
     260\begin{verbatim}
     261csh> scanppf -h
     262 PIOPersist::Initialize() Starting Sophya Persistence management service
     263SOPHYA Version  1.4 Revision 0 (V_Nov2002) -- Nov 15 2002 10:32:12 cxx
     264 Usage: scanppf filename [s/n/a0/a1/a2/a3]
     265   s[=default} : Sequential reading of objects
     266   n : Object reading at NameTags
     267   a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
     268\end{verbatim}
     269
     270
    237271\newpage
    238272
     
    288322
    289323\newpage
    290 \section{Module SysTools}
    291 
    292 {\bf SysTools} contains utility classes such as {\tt DataCards} or
     324\section{Module BaseTools}
     325
     326{\bf BaseTools} contains utility classes such as
    293327{\tt DVlist}, an hierarchy of exception classes for Sophya, a template
    294328class {\tcls{NDataBlock}} for handling reference counting on numerical
     
    435469\end{verbatim}
    436470
    437 \subsection{Using DataCards}
    438 \index{DataCards}
    439 The {\bf DataCards} class can be used to read parameters from a file.
    440 Each line in the file starting with \@ defines a set of values
    441 associated with a keyword. In the example below, we read the
    442 parameters corresponding with the keyword {\tt SIZE} from the
    443 file {\tt ex.d}. We suppose that {\tt ex.d} contains the line: \\
    444 {\tt @SIZE 400 250} \\
    445 \begin{verbatim}
    446 #include "datacards.h"
    447 // ...
    448 // Initialising DataCards object dc from file ex.d
    449 DataCards dc( "ex.d" );
    450 // Getting the first and second parameters for keyword size
    451 // We define a default value 100
    452 int size_x = dc.IParam("SIZE", 0, 100);
    453 int size_y = dc.IParam("SIZE", 1, 100);
    454 cout << " size_x= " << size_x << " size_y= " << size_y << endl;
    455 \end{verbatim}
    456 
    457 \subsection{Dynamic linker}
    458 \index{PDynLinkMgr}
    459 The class {\bf PDynLinkMgr} can be used for managing shared libraries
    460 at run time. The example below shows the run time linking of a function:\\
    461 {\tt extern "C" { void myfunc(); } } \\
    462 \begin{verbatim}
    463 #include "pdlmgr.h"
    464 // ...
    465 string soname = "mylib.so";
    466 string funcname = "myfunc";
    467 PDynLinkMgr dyl(soname);
    468 DlFunction f = dyl.GetFunction(funcname);
    469 if (f != NULL) {
    470 // Calling the function
    471   f();   
    472 }
    473 \end{verbatim}
    474 
    475 \subsection{CxxCompilerLinker class}
    476 \index{CxxCompilerLinker}
    477 This class provides the services to compile C++ code and building
    478 shared libraries, using the same compiler and options which have
    479 been used to create the SOPHYA shared library.
    480 The sample program below illustrates using this class to build
    481 the shared library (myfunc.so) from the source file myfunc.cc :
    482 \begin{verbatim}
    483 #include "cxxcmplnk.h"
    484 // ...
    485 string flnm = "myfunc.cc";
    486 string oname, soname;
    487 int rc;
    488 CxxCompilerLinker cxx;
    489 // The Compile method provides a default object file name
    490 rc = cxx.Compile(flnm, oname);
    491 if (rc != 0 ) { // Error when compiling ... }
    492 // The BuildSO method provides a default shared object file name
    493 rc = cxx.BuildSO(oname, soname);
    494 if (rc != 0 ) { // Error when creating shared object ... }
    495 \end{verbatim}
    496471
    497472\newpage
     
    11961171ffts.FFTForward(in, out);
    11971172cout << "out= " << out << endl;
     1173\end{verbatim}
     1174
     1175% \newpage
     1176\section{Module SUtils}
     1177Some utility classes and C/C++ string manipulation functions are gathered
     1178in {\bf SUtils} module.
     1179\subsection{Using DataCards}
     1180\index{DataCards}
     1181The {\bf DataCards} class can be used to read parameters from a file.
     1182Each line in the file starting with \@ defines a set of values
     1183associated with a keyword. In the example below, we read the
     1184parameters corresponding with the keyword {\tt SIZE} from the
     1185file {\tt ex.d}. We suppose that {\tt ex.d} contains the line: \\
     1186{\tt @SIZE 400 250} \\
     1187\begin{verbatim}
     1188#include "datacards.h"
     1189// ...
     1190// Initialising DataCards object dc from file ex.d
     1191DataCards dc( "ex.d" );
     1192// Getting the first and second parameters for keyword size
     1193// We define a default value 100
     1194int size_x = dc.IParam("SIZE", 0, 100);
     1195int size_y = dc.IParam("SIZE", 1, 100);
     1196cout << " size_x= " << size_x << " size_y= " << size_y << endl;
     1197\end{verbatim}
     1198 
     1199\section{Module SysTools}
     1200The {\bf SysTools} module contains classes implementing interface to some
     1201OS specific services.
     1202\subsection{Dynamic linker}
     1203\index{PDynLinkMgr}
     1204The class {\bf PDynLinkMgr} can be used for managing shared libraries
     1205at run time. The example below shows the run time linking of a function:\\
     1206{\tt extern "C" { void myfunc(); } } \\
     1207\begin{verbatim}
     1208#include "pdlmgr.h"
     1209// ...
     1210string soname = "mylib.so";
     1211string funcname = "myfunc";
     1212PDynLinkMgr dyl(soname);
     1213DlFunction f = dyl.GetFunction(funcname);
     1214if (f != NULL) {
     1215// Calling the function
     1216  f();   
     1217}
     1218\end{verbatim}
     1219
     1220\subsection{CxxCompilerLinker class}
     1221\index{CxxCompilerLinker}
     1222This class provides the services to compile C++ code and building
     1223shared libraries, using the same compiler and options which have
     1224been used to create the SOPHYA shared library.
     1225The sample program below illustrates using this class to build
     1226the shared library (myfunc.so) from the source file myfunc.cc :
     1227\begin{verbatim}
     1228#include "cxxcmplnk.h"
     1229// ...
     1230string flnm = "myfunc.cc";
     1231string oname, soname;
     1232int rc;
     1233CxxCompilerLinker cxx;
     1234// The Compile method provides a default object file name
     1235rc = cxx.Compile(flnm, oname);
     1236if (rc != 0 ) { // Error when compiling ... }
     1237// The BuildSO method provides a default shared object file name
     1238rc = cxx.BuildSO(oname, soname);
     1239if (rc != 0 ) { // Error when creating shared object ... }
    11981240\end{verbatim}
    11991241
     
    14511493Solaris          &     g++  (2.95)  \\
    14521494SGI IRIX64       &     CC   (7.3)   \\
     1495MacOSX/Darwin 10.1  &         c++/gcc 2.95  \\
    14531496\end{tabular}
    14541497\end{center}
Note: See TracChangeset for help on using the changeset viewer.