Changeset 2790 in Sophya for trunk/SophyaLib


Ignore:
Timestamp:
May 31, 2005, 7:00:43 PM (20 years ago)
Author:
ansari
Message:

Premiere serie de modifications de la doc pour la version V 2 - Reza 31 mai 2005

Location:
trunk/SophyaLib/Manual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Manual/defsophya.sty

    r1435 r2790  
    44\newcommand{\tclsc}[2] {#1$<$#2$>$}   
    55%  Putting a class name in a box
    6 \newcommand{\clsbox}[1] { \framebox[40mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf #1} } }
     6\newcommand{\clsbox}[1] { \framebox[45mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf #1} } }
    77%  Emplty class box
    8 \newcommand{\eclbox} { \makebox[40mm][c]{\mbox{\rule[-1mm]{0mm}{5mm}} } \ }
     8\newcommand{\eclbox} { \makebox[45mm][c]{\mbox{\rule[-1mm]{0mm}{5mm}} } \ }
    99%  Length of \longleftarrow
    1010\newlength{\arrclsw}   \settowidth{\arrclsw}{$\longleftarrow$}
  • trunk/SophyaLib/Manual/sophya.tex

    r2437 r2790  
    4343\vspace{1cm}
    4444\begin{center}
    45 {\bf \Large Sophya Version: 1.5 (V\_Dec2002) }
     45{\bf \Large Sophya Version: 2.0 (V\_Jun2005) }
    4646% Document revision 1.0 }
    4747\end{center}
     
    5959physics analysis software development. Our goal is to provide
    6060easy to use, yet powerful classes which can be used by scientists.
    61 We have decided to use as much as possible available
    62 numerical analysis libraries, encapsulating them whenever
    63 possible. Although some the modules in SOPHYA have been
    64 designed with the specific goal of providing some of the tools for
    65 the Planck-HFI data processing software, most of the
    66 packages presented here have a more general scope than the
    67 CMB analysis and Planck mission problem.
     61Although some of the SOPHYA modules (SkyMap, Samba, SkyT)
     62have been designed with the specific goal CMB data analysis, most
     63modules presented here have a much broader scope and can be
     64used in scientific data analysis and modeling/simulation.
     65Whenever possible, we use existing numerical package and libraries,
     66encapsulating them whenever
     67possible.
    6868\par
    6969\vspace*{2mm}
     
    7777\vspace*{2mm}
    7878The source directory tree
    79 \footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSPlanck}
     79\footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSSophya}
    8080is organised into a number of modules.
    8181
    8282\begin{itemize}
    83 \item[] {\bf Mgr/}  Scripts for code management,
     83\item[] {\bf BuildMgr/}  Scripts for code management,
    8484makefile generation and software installation
    8585\item[] {\bf BaseTools/} General architecture support classes such
     
    9292(linear, and non linear parameter fitting, FFT, \ldots)
    9393\item[] {\bf HiStats/}  Histogram-ming and data set handling classes (tuples) \\
    94 ({\tt Histo Histo2D NTuple XNTuple} \ldots)
    95 \item[] {\bf SkyMap/} Local and full sky maps, and few geometry
     94({\tt Histo Histo2D NTuple DataTable} \ldots)
     95\item[] {\bf SkyMap/} Local and full sky maps, and some 3D geometry
    9696handling utility classes. \\
    9797({\tt PixelMap<T>, LocalMap<T>, SphericalMap<T>, \ldots})
    98 \item[] {\bf SUtils/} This module contains
    99 few utility classes, such as the
     98\item[] {\bf SUtils/} This module contains few utility classes, such as the
    10099{\tt DataCard} class, as well as string manipulation functions in C and C++.
    101100\item[] {\bf SysTools/} This module contains classes implementing
    102101an interface to various OS specific services, such
    103 as shared object and dynamic link handling.
     102threads and dynamic link/shared library handling.
    104103
    105104\end{itemize}
     
    125124extracted from the {\bf Xephem } source code. The corresponding source
    126125code is also available from SOPHYA cvs repository, module {\bf XephemAstroLib}.
     126\item[] {\bf MinuitAdapt/} Wrapper classes to CERN minimization routines (Minuit).
     127
    127128\end{itemize}
    128129
     
    162163\begin{itemize}
    163164\item[] {\bf Examples/} Sample SOPHYA codes and example programs and
    164 makefiles (auto\_makefile and ex\_makefile).
    165 \item[] {\bf DemoPIApp/} Sample exripts and programs for (s)piapp
     165makefiles.
     166\item[] {\bf DemoPIApp/} Sample scripts and programs for (s)piapp
    166167interactive analysis tools.
    167168\end{itemize}   
     
    173174{\bf http://www.sophya.org}.
    174175
    175 \subsection{Environment variables}
    176 Two environment variables {\bf SOPHYABASEREP} and {\bf SOPHYACXX} are used
     176\subsection{Directories, environment variables, configuration files}
     177The environment variable {\bf SOPHYABASE}  is used
    177178to define the path where the Sophya libraries and executable are installed.
    178 {\bf SOPHYABASEREP} defines the base directory path and {\bf SOPHYACXX} the
    179 name of the C++ compiler. The complete path is built using {\bf SOPHYABASEREP},
    180 the operating system name (as obtained by the {\tt uname} command), and
    181 the compiler name. In the example below, we show the complete path
    182 for a {\tt Linux} system, using the GNU g++ compiler:
    183 
    184179\begin{itemize}
    185 \item \$SOPHYABASEREP/Include : Include (.h) files
    186 \item \$SOPHYABASEREP/Linux-g++/Libs : Path for the archive libraries (.a)
    187 \item \$SOPHYABASEREP/Linux-g++/ShLibs : Shared library path (.so)
    188 \item \$SOPHYABASEREP/Linux-g++/Exec : Executable file path
     180\item \$SOPHYABASE/include : Include (.h) files
     181\item \$SOPHYABASE/lib : Path for the archive libraries (.a)
     182\item \$SOPHYABASE/slb: Shared library path (.so)
     183\item \$SOPHYABASE/exe : Executable file path
    189184\end{itemize}
    190185
    191186In order to use the shared libraries, the {\bf LD\_LIBRARY\_PATH} variable
    192187should contain the Sophya shared library path
    193 ({\tt \$SOPHYABASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux)
    194 
    195 For modules using external libraries, the {\bf EXTLIBDIR}
    196 environment variable should contain the path to these libraries
    197 and corresponding include files.
    198 C-FitsIO anf FFTW include files should be accessible through: \\
    199 {\tt \$EXTLIBDIR/Include/FitsIO } \\
    200 {\tt \$EXTLIBDIR/Include/FFTW } \\
    201 The corresponding libraries are expected to be found in: \\
    202 {\tt \$EXTLIBDIR/Linux-g++/Libs} \\
    203 
    204 \subsection{User makefiles}
    205 The file {\tt \$SOPHYABASEREP/Include/MakefileUser.h} defines the compilation
    206 flags and the list of Sophya libraries. It should be included in the
    207 user's makefile. The default compilation rules assumes that the object (.o)
    208 and executable files would be put in the following directories: \\
    209 {\tt \$HOME/`uname`-\$SOPHYACXX/Objs} \\
    210 {\tt \$HOME/`uname`-\$SOPHYACXX/Exec}.
    211 In the case of a {\tt Linux} system and using {\tt g++} as the C++ compiler,
    212 these two directories would be translated to \\
    213 {\tt \$HOME/Linux-g++/Objs} and {\tt \$HOME/Linux-g++/Exec}.
    214 The GNU make program should be used.
    215 \par
    216 The file {\tt Examples/auto\_makefile} defines the rules to compile
    217 a given source program, and link it against the Sophya libraries to produce
    218 an executable. The example below shows the steps to compile a program named
    219 {\tt trivial.cc }.
    220 \begin{verbatim}
    221 csh> cp Examples/auto_makefile makefile
    222 csh> cp Examples/ex1.cc trivial.cc
    223 csh> make trivial
    224 \end{verbatim}
    225 This command should compile the {\tt trivial.cc} file,
    226 and link it against the sophya libraries.
    227 The file {\tt Examples/ex\_makefile} provides another
    228 example makefile.
     188({\tt \$SOPHYABASE/slb }). \\
     189On Silocon Graphics machines (IRIX64) , the default SOPHYA configuration
     190correspond to the 64 bit architecture.
     191The environment variable { \bf LD\_LIBRARY64\_PATH } defines
     192the shared library path in this case and should contain ({\tt \$SOPHYABASE/slb }.
     193
     194The configure script creates links for external libraries include files in :
     195\begin{itemize}
     196\item \$SOPHYABASE/include/FitsIO : c-fitsio library include files
     197\item \$SOPHYABASE/include/FFTW : FFTW library include files
     198\item \$SOPHYABASE/include/XAstro : XEphem library include files
     199\end{itemize}
     200
     201The directory { \tt \$SOPHYABASE/include/SophyaConfInfo/ } contains files
     202describing the installed configuration of SOPHYA software.
     203
     204The file { \tt \$SOPHYABASE/include/machdefs.h } contains definitions
     205(flags, typedef) used in SOPHYA.
     206
     207The file { \tt \$SOPHYABASE/include/sophyamake.inc } contains the
     208compilation commands and flags used for building the software.
     209Users can use most of compilation and link commands defined in this file:
     210 {\tt \$CCOMPILE , \$CXXCOMPILE . \$CXXLINK \ldots}.
     211 (See module Example).
     212
     213The configure script (BuildMgr/configure) creates the directory tree and the
     214above files.
    229215
    230216\subsection{the runcxx program}
     
    240226\begin{verbatim}
    241227csh> runcxx -h
    242 SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Feb 28 2001 11:19:17 cxx
    243  runcxx : compiling and running of a piece of C++ code
    244    Usage: runcxx [-compopt CompileOptions] [-linkopt LinkOptions]
    245                  [-tmpdir TmpDirectory] [-f C++CodeFileName]
    246                  [-inc includefile] [-inc includefile ...]
    247                  [-import modulename] [-import modulename ...]
    248                  [-uarg UserArg1 UserArg2 ...]
    249    if no file name is specified, read from standard input
    250    modulenames: SkyMap, Samba, SkyT, FitsIOServer, LinAlg, IFFTW
     228 PIOPersist::Initialize() Starting Sophya Persistence management service
     229SOPHYA Version  1.9 Revision 0 (V_Mai2005) -- May 31 2005 15:11:32 cxx
     230 runcxx : compiling and running of a piece of C++ code
     231   Usage: runcxx [-compopt CompileOptions] [-linkopt LinkOptions]
     232                 [-tmpdir TmpDirectory] [-f C++CodeFileName]
     233                 [-inc includefile] [-inc includefile ...]
     234                 [-import modulename] [-import modulename ...]
     235                 [-uarg UserArg1 UserArg2 ...]
     236   if no file name is specified, read from standard input
     237   modulenames: SkyMap, Samba, SkyT, FitsIOServer,
     238                LinAlg, IFFTW, XAstroPack
    251239\end{verbatim}
    252240Most examples in this manual can be tested using runcxx. The
     
    264252\subsection{the scanppf program}
    265253{\bf scanppf} is a simple SOPHYA application which can be used to check
    266 PPF files and list their contents.
     254PPF files and list their contents. It can also provide the list of all registered
     255PPF handlers.
    267256\begin{verbatim}
    268257csh> scanppf -h
    269  PIOPersist::Initialize() Starting Sophya Persistence management service
    270 SOPHYA Version  1.4 Revision 0 (V_Nov2002) -- Nov 15 2002 10:32:12 cxx
    271  Usage: scanppf filename [s/n/a0/a1/a2/a3]
    272    s[=default} : Sequential reading of objects
    273    n : Object reading at NameTags
    274    a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
     258 PIOPersist::Initialize() Starting Sophya Persistence management service
     259SOPHYA Version  1.9 Revision 0 (V_Mai2005) -- May 31 2005 15:11:32 cxx
     260 Usage: scanppf [flags] filename
     261 flags = -s -n -a0 -a1 -a2 -a3 -lh -lho
     262   -s[=default} : Sequential reading of objects
     263   -n : Object reading at NameTags
     264   -a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
     265   -lh : List PPersist handler classes
     266   -lho : List PPersist handler and dataobj classes
    275267\end{verbatim}
    276268
     
    342334\begin{figure}[hbt]
    343335\dclsa{PPersist}
    344 \dclsbb{PIOPersist}{PInPersist}
    345 \dclsb{POutPersist}
     336\dclsccc{PPFBinarIOStream}{PPFBinaryInputStream}{PInPersist}
     337\dclscc{PPFBinaryOutputStream}{POutPersist}
    346338\caption{partial class diagram for classes handling persistence in Sophya}
    347339\end{figure}
     
    385377The operators {\tt operator << (POutPersist ...) } and
    386378{\tt operator >> (PInPersist ...) } are often overloaded
    387 to perform {\tt PutObject()} and {\tt GetObject()} operations,
    388 as illustrated in the example below:
     379to perform {\tt PutObject()} and {\tt GetObject()} operations.
     380the {\bf PPFNameTag} (ppfnametag.h) class can be used in conjunction with
     381{\tt << >> } operators to write objects with a name tag or to retrieve
     382an object identified with a name tag. The example below shows the
     383usage of these operators:
    389384\begin{verbatim}
    390385// Creating and filling a histogram
     
    393388// Writing histogram to a PPF stream
    394389POutPersist os("hw.ppf");
    395 os << hw;
     390os << PPFNameTag("myhisto") << hw;
     391
    396392// Reading a histogram from a PPF stream
    397393PInPersist is("hr.ppf");
    398 is >> hr;
     394is >> PPFNameTag("myhisto")  >> hr;
    399395\end{verbatim}
    400396
    401397The {\bf scanppf} program can be used to list the content of a PPF file.
    402 \index{scanppf}
    403 \begin{verbatim}
    404 csh> scanppf -h
    405 SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Feb 28 2001 11:19:17 cxx
    406  Usage: scanppf filename [s/n/a0/a1/a2/a3]
    407    s[=default} : Sequential reading of objects
    408    n : Object reading at NameTags
    409    a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
    410 \end{verbatim}
    411 
    412398
    413399\subsection{\tcls{NDataBlock}}
     
    476462\end{verbatim}
    477463
    478 
     464\subsection{\tcls{SegDataBlock} , \tcls{SwSegDataBlock}}
     465\begin{figure}[hbt]
     466\dclsccc{AnyDataObj}{\tcls{SegDBInterface}}{ \tcls{SegDataBlock} }
     467\dclscc{\tcls{SegDBInterface}}{ \tcls{SwSegDataBlock} }
     468\end{figure}
     469\begin{itemize}
     470\item[] \tcls{SegDataBlock}  handles arrays of object of
     471type {\bf T} with reference sharing in memory. The array can be extended
     472(increase in array size) with fixed segment size. It implements the interface
     473defined by tcls{SegDBInterface}.
     474\item[] \tcls{SwSegDataBlock} Implements the same tcls{SegDBInterface}
     475using a data swapper (\tcls{DataSwapperInterface} .
     476Can thus be used for very large objects.
     477\end{itemize}
     478 
    479479\newpage
    480480\section{Module TArray}
     
    870870\dclsbb{AnyDataObj}{Histo2D}
    871871\dclsbb{AnyDataObj}{Ntuple}
    872 \dclsb{XNtuple}
    873872\caption{partial class diagram for histograms and ntuples}
    874873\end{figure}
     
    931930\subsection{Data tables (tuples)}
    932931\index{NTuple}
    933 NTuple are memory resident tables of 32 bits floating values (float).
    934 They are arranged in columns. Each line is often called an event.
     932NTuple are memory resident tables of 32 or 64 bits floating values
     933(float/double).They are arranged in columns. Each line is often called an event.
    935934These objects are frequently used to analyze data.
    936 Graphicals tools (spiapp) can plot a column against an other one
     935The piapp graphicals tools can plot a column against an other one
    937936with respect to various selection cuts. \\
    938937Here is an example of creation and filling~:
     
    954953\end{verbatim}
    955954
    956 XNTuple are sophisticated NTuple : they accept various types
     955XNTuple provide additional functionalities, compared to NTuple.
     956They are deprecated and are only kept  for backward compatibility
     957and should not be used anymore. Use DataTable and
     958SwPPFDataTable instead.
     959Object of type XNTuple handle various types
    957960of column values (double,float,int,string,...) and can handle
    958961very large data sets, through swap space on disk.
    959 \index{XNTuple}
    960 In the sample code below we show how to create a XNTuple
    961 object with four columns (double, double, int, string).
    962 Several entries (lines) are then appended to the table,
    963 which is saved to a PPF file.
    964 \begin{verbatim}
    965 #include "xntuple.h"
    966 // ...
    967 char * names[4] = {"X", "X2", "XInt","XStr"};
    968 // XNTuple (Table) creation with 4 columns, of integer,
    969 // double(2) and string type
    970 XNTuple  xnt(2,0,1,1, names);
    971 // Filling the NTuple
    972 r_8 xd[2];
    973 int_4 xi[2];
    974 char xss[2][32];
    975 char * xs[2] = {xss[0], xss[1]} ;
    976 for(int i=0; i<50; i++) {
    977    xi[0] = i;  xd[0] = i+0.5;  xd[1] = xd[0]*xd[0];
    978    sprintf(xs[0],"X=%g", xd[0]);
    979    xnt.Fill(xd, NULL, xi, xs);
    980 }
    981 // Printing table info
    982 cout << xnt ;
    983 // Saving object into a PPF file
    984 POutPersist po("xnt.ppf");
    985 po << xnt ;
    986 \end{verbatim}
     962
     963\index{DataTable}
     964
     965The class {\bf DataTable} extends significantly the functionalities provided by
     966NTuple. DataTable is a memory resident implementation of the interface
     967{\bf BaseDataTable } which organizes the data as a 2-D table. User can define
     968the name and data type of each column. Data is added to the table as rows.
     969The table is extended as necessary when adding rows.
     970The sample code below shows an example of DataTable usage :
     971\begin{verbatim}
     972   #include "datatable.h"
     973   // ...
     974   DataTable dt(64);
     975   dt.AddFloatColumn("X0_f");
     976   dt.AddFloatColumn("X1_f");
     977   dt.AddDoubleColumn("X0X0pX1X1_d");
     978   double x[5];
     979   for(int i=0; i<63; i++) {
     980     x[0] = (i/9)-4.;  x[1] = (i/9)-3.;  x[2] = x[0]*x[0]+x[1]*x[1];
     981     dt.AddLine(x);
     982   }
     983   // Printing table info
     984   cout << dt ;
     985   // Saving object into a PPF file
     986   POutPersist po("dtable.ppf");
     987   po << dt ;
     988
     989\end{verbatim}
     990
     991\begin{figure}[hbt]
     992\dclsccc{AnyDataObj}{BaseDataTable}{DataTable}
     993\dclscc{BaseDataTable}{SwPPFDataTable}
     994\end{figure}
     995
     996\index{SwPPFDataTable}
     997The class {\bf SwPPFDataTable} implements the BaseDataTable interface
     998using segmented data blocks with swap on PPF streams. Very large data sets
     999can be created and manipulated through tis class
    9871000
    9881001\subsection{Writing, viewing \dots }
     
    12111224The class {\bf Periodic} provides the necessary services needed to
    12121225implement the execution of a periodic action.
     1226
     1227\subsection{Thread management classes}
    12131228A basic interface to POSIX threads \index{thread} is also provided
    12141229through the \index{ZThread} {\bf ZThread}, {\bf ZMutex} and {\bf ZSync}
    12151230classes.
    1216 
    1217 \subsection{Dynamic linker}
     1231 
     1232\subsection{Dynamic linker and C++ compiler classes}
    12181233\index{PDynLinkMgr}
    12191234The class {\bf PDynLinkMgr} can be used for managing shared libraries
     
    12331248\end{verbatim}
    12341249
    1235 \subsection{CxxCompilerLinker class}
    12361250\index{CxxCompilerLinker}
    1237 This class provides the services to compile C++ code and building
     1251The {\bf CxxCompilerLinker} class provides the services to compile C++ code and building
    12381252shared libraries, using the same compiler and options which have
    12391253been used to create the SOPHYA shared library.
     
    12551269\end{verbatim}
    12561270
     1271\subsection{Command interpreter}
     1272The class {\bf Commander} can be used in interactive programs to provide
     1273c-shell like command interpreter and scripting capabilties.
     1274Arithmetic expression evaluation is implemented through the {\bf CExpressionEvaluator}
     1275and {\bf RPNExpressionEvaluator} classes.
     1276 
    12571277\newpage
    12581278\section{Module SkyMap}
     
    14971517\newpage
    14981518\section{Building and installing Sophya}
     1519\subsection{supported platforms}
    14991520Presently, the Sophya library has been tested with the following
    15001521compiler/platform pairs:
    15011522
    15021523\begin{center}
    1503 \begin{tabular}{ll}
    1504 Compaq/DEC OSF1  &     cxx  (6.0 , 6.2)  \\
    1505 Compaq/DEC OSF1  &     g++  (2.95)  \\
    1506 Linux            &     g++  (2.91 , 2.95)  \\
    1507 Linux            &     KCC  (3.4)   \\
    1508 Solaris          &     g++  (2.95)  \\
     1524\begin{tabular}{|l|l|}
     1525\hline
     1526OS & compiler \\
     1527\hline
     1528HP/Compaq/DEC Tru64 ( OSF1)  &     cxx  (6.1 , 6.3)  \\
     1529Linux (RH)          &     g++  (3.2)  \\
     1530Linux  (SCL)          &     icc  (8.1)   (Intel compiler) \\
    15091531SGI IRIX64       &     CC   (7.3)   \\
    1510 MacOSX/Darwin 10.1  &         c++/gcc 2.95  \\
     1532MacOSX/Darwin 10.3  &         g++ 3.3  \\
     1533\hline
    15111534\end{tabular}
    15121535\end{center}
     
    15151538{\bf FitsIOServer} is the example of such a module, where the {\tt libcfitsio.a}
    15161539is used.
    1517 The build procedure expects to find the include files and the libraries in: \\
    1518 {\tt \$EXTLIBDIR/Include/FitsIO } \\
    1519 {\tt \$EXTLIBDIR/`uname`-\$SOPHYACXX/Libs} \\
    1520 The complete directory tree content for the various external libraries used
    1521 by this version of SOPHYA is listed below:
    1522 \begin{verbatim}
    1523 csh> ls $EXTLIBDIR/Include/
    1524 FFTW         FitsIO        XAstro
    1525 csh> ls $EXTLIBDIR/Include/FFTW/
    1526 fftw.h    rfftw.h
    1527 csh> ls $EXTLIBDIR/Include/XAstro/
    1528 P_.h           circum.h       satlib.h       vector.h
    1529 astro.h        deepconst.h    satspec.h      vsop87.h
    1530 chap95.h       preferences.h  sattypes.h
    1531 csh> ls $EXTLIBDIR/Include/FitsIO/
    1532 cfortran.h   eval_defs.h  fitsio.h     grparser.h   ricecomp.h
    1533 compress.h   eval_tab.h   fitsio2.h    longnam.h
    1534 drvrsmem.h   f77_wrap.h   group.h      region.h
    1535 csh> ls $EXTLIBDIR/Linux-g++/Libs/
    1536 libcfitsio.a  libfftw.la    librfftw.a    libxastro.a
    1537 libblas.a     libfftw.a     liblapack.a   librfftw.la
    1538 \end{verbatim}
     1540par
    15391541The object files from a given Sophya module are grouped in an archive library
    15401542with the module's name ({\tt libmodulename.a}). All Sophya modules
     
    15441546grouped in ({\tt libPI.so}).
    15451547
    1546 The environment variables {\bf SOPHYADEVREP}, {\bf EXTLIBDIR} and {\bf SOPHYACXX}
    1547 must be defined in order to install the Sophya package.
     1548\subsection{Installation}
     1549
     1550The build procedure has two main steps: \\
     1551- The configure step (BuildMgr/configure) setup the directory structure and
     1552the necessary configuration file. \\
     1553- The make step compiles the different sources files, create the library and optionaly
     1554builds all or some of the associated executables.
     1555
     1556\par
     1557{\tt BuildMgr/configure } is a c-shell script with a number of arguments:
     1558\begin{verbatim}
     1559csh> ./configure -h
     1560configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln]
     1561  [-minc mymake.inc]
     1562  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ]
     1563  [-extlp dir1 -extlp dir2 ... ]
     1564  [-noextlib -noext fits -noext fftw -noext lapack ]
     1565  [-noext astro -noext minuit]
     1566\end{verbatim}
     1567\begin{itemize}
     1568\item[] -sbase : define SOPHYA installation base directory. \$SOPHYABASE is used
     1569if not specified.
     1570\item[] -scxx : selects the C++ compiler. \$SOPHYACXX  s used
     1571if not specified.
     1572\item[] -incln : creates symbolic link for include files, instead of copying them.
     1573\item[] -minc : give an explicit name for the file used to generate
     1574\$SOPHYABASE/include/sophyamake.inc.
     1575\item[] -extp : Adds the specied path to the search path of the external libraries
     1576include files and archive library.
     1577\item[] -extip : Adds the specied path to the search path of the external libraries
     1578include files.
     1579\item[] -extp : Adds the specied path to the search path of the external libraries
     1580archive (libxxx.a).
     1581\item[] -noextlib : Disable compiling of modules referencing external libraries.
     1582\item[] -noext : Disable compiling of the specified module (with reference to external
     1583library.
     1584\end{itemize}
     1585
    15481586In the example below, we assume that we want to install Sophya from a
    15491587released (tagged) version in the source directory {\tt \$SRC} in the
    1550 {\tt /usr/local/Sophya} diretory, using {\tt g++}. We assume that
    1551 the external libraries directory tree has been set up in
    1552 {\tt /usr/local/ExtLibs/}. \\[3mm]
    1553 \centerline{
    1554           \rule{20mm}{0.5mm}
    1555         {\bf \large the use of GNU make is mandatory}
    1556         \rule{20mm}{0.5mm} }
    1557  
     1588{\tt /usr/local/Sophya} directory, using {\tt g++}. We assume that
     1589the external libraries can be found in {\tt /usr/local/ExtLibs/}.
     1590We disable the compilation of the MinuitAdapt and XAstrPack packages.
     1591
    15581592\vspace*{3mm}
    15591593\begin{verbatim}
    1560 # We select our C++ compiler
    1561 csh> setenv SOPHYACXX g++
    1562 # Setup the build directory
     1594# Create the top level  directory
    15631595csh> mkdir /usr/local/Sophya/
    1564 csh> setenv SOPHYADEVREP /usr/local/Sophya/
    1565 csh> setenv EXTLIBDIR /usr/local/ExtLibs/
    1566 # Use the top level makefile in Mgr/
    1567 csh> cd \$SRC
    1568 csh> cp Mgr/Makefile Makefile
    1569 # Step 1: Create the directory tree and copy the include files (.h)
    1570 csh> make depend
    1571 # Step 2: Compile the modules without external library reference
     1596csh> cd $SRC/BuildMgr
     1597# Step 1.a : Run the configuration script
     1598csh> ./configure -sbase /usr/local/Sophya -scxx g++  -extp /usr/local/ExtLibs/ \
     1599-noext astro -noext minuit
     1600# Step 1.b : Check the generated file  $SOPHYABASE/include/
     1601# Step 2.a: Compile the modules without external library reference
    15721602csh> make libs
    1573 # Step 3: Compile the modules WITH  external library reference (optional)
     1603# Step 2.b: Compile the modules WITH  external library reference (optional)
    15741604csh> make extlibs
    1575 # Step 4: Build libsophya.so
     1605# Step 2.c: Build libsophya.so
    15761606csh> make slb
    1577 # Step 5: Build libextsophya.so (optional)
     1607# Step 2.d: Build libextsophya.so (optional)
    15781608csh> make slbext
    1579 # Step 6: Compile the PI and PIext modules (optional)
     1609# Step 2.e: Compile the PI and PIext modules (optional)
    15801610csh> make PI
    1581 # Step 7: Build the corresponding shared library libPI.so (optional)
     1611# Step 2.f: Build the corresponding shared library libPI.so (optional)
    15821612csh> make slbpi
    15831613\end{verbatim}
     
    15861616to use:
    15871617\begin{verbatim}
    1588 # Step 2,3,6
    1589 csh> make all
    1590 # Step 4,5,7
    1591 csh> make slball
     1618# Step 2.a ... 2.f
     1619csh> make all slball
    15921620\end{verbatim}
    15931621
     
    15961624\begin{verbatim}
    15971625# To compile test programs
    1598 csh> cd Tests
    1599 csh> make arrt ...
    1600 csh> cd ..
    1601 # To compile other programs, for example from the PMixer module
    1602 csh> cd PMixer
    1603 csh> make
    1604 csh> cd ..
     1626csh> cd ../PrgUtil
     1627csh> make
    16051628# To build (s)piapp (libPI.so is needed)
    1606 csh> cd ProgPI
     1629csh> cd ../ProgPI
    16071630csh> make
    16081631csh> cd ..
Note: See TracChangeset for help on using the changeset viewer.