source: Sophya/trunk/SophyaLib/Manual/sophya.tex@ 978

Last change on this file since 978 was 978, checked in by ansari, 25 years ago

MAJ doc sophya overview - Reza 28/4/2000

File size: 9.3 KB
Line 
1\documentclass[twoside,11pt]{article}
2% Package standard : Utilisation de caracteres accentues, mode francais et graphique
3\usepackage[latin1]{inputenc}
4\usepackage[T1]{fontenc}
5\usepackage[english]{babel}
6\usepackage{graphicx}
7% package a mettre pour faire du pdf
8\usepackage{palatino}
9
10% Extension de symboles mathematiques
11\usepackage{amssymb}
12
13\usepackage{defsophya}
14
15
16
17\begin{document}
18
19\begin{titlepage}
20\titrehp{Sophya \\ An overview }
21\auteurs{
22R. Ansari & ansari@lal.in2p3.fr \\
23G. Le Meur & lemeur@lal.in2p3.fr \\
24C. Magneville & cmv@hep.saclay.cea.fr \\
25S. Versille & versille@lal.in2p3.fr
26}
27% \auteursall
28\titrebp{2}
29\end{titlepage}
30
31\tableofcontents
32
33\newpage
34
35\section{Introduction}
36
37 {\bf SOPHYA} ({\bf SO}ftware for {\bf PHY}sics {\bf A}nalysis)
38is a collection of C++ classes designed for numerical and
39physics analysis software development. Our goal is to provide
40easy to use, yet powerful classes which can be used by scientists.
41We have decided to use as much as possible available
42numerical analysis libraries, encapsulating them whenever
43possible.
44
45 The SOPHYA design and implementation has been carried out
46with the specific goal of providing the general framework for
47the Planck-HFI data processing software. However, most of the
48packages presented here have a more general scope than the CMB analysis
49and Planck surveyor mission problem.
50 The source directory tree
51\footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSEros}
52is organised into a number of modules.
53
54\begin{itemize}
55\item[] {\bf Mgr/} Scripts for code management,
56makefile generation and software installation
57\item[] {\bf SysTools/} General architecture support classes such
58as {\tt PPersist, NDataBlock<T>}, and few utility classes
59({\tt DataCard, DVList} \ldots).
60\item[] {\bf TArray/} template numerical arrays, vectors and matrices
61({\tt PixelMap<T> SphericalMap<T>} \ldots) and few geometry
62handling utility classes.
63\item[] {\bf NTools/} Some standard numerical analysis tools
64(linear, and non linear parameter fitting, FFT, \ldots)
65\item[] {\bf HiStats/} Histogram-ming and data set handling classes \\
66({\tt Histo Histo2D NTuple XNTuple} \ldots)
67\end{itemize}
68
69The modules listed below are more tightly related to the
70CMB (Cosmic Microwave Background) data analysis problem:
71\begin{itemize}
72\item[] {\bf SkyMap/} Local and full sky maps
73\item[] {\bf SkyT/}
74classes for spectral emission and detector frequency response modelling \\
75({\tt SpectralResponse, RadSpectra, BlackBody} \ldots)
76\item[] {\bf Samba/} few classes for map and TOD analysis.
77\item[] {\bf PMixer/} skymixer and related programs
78\end{itemize}
79
80The following modules contain the interface classes with
81external libraries:
82\begin{itemize}
83\item[] {\bf FitsIOSrever/} Classes for handling file input-output
84in FITS format using the cfitsio library.
85\item[] {\bf LinAlg/} Interface with Lapack linear algebra package
86\item[] {\bf IFFTW/} Interface with FFTW package
87\end{itemize}
88
89Other modules:
90\begin{itemize}
91\item[] {\bf Tests/} Simple test programs
92\item[] {\bf ProgPI/} interactive analysis tool - It should be noted that
93this module uses the SOPHYA class library and is based on {\bf PI}
94which is a C++ library defining a complete GUI program
95architecture. An additional module (PIext) define the interactive
96analysis program framework and the interfaces with the objects
97in SOPHYA. The {\bf PI/} \footnote{the PI package documentation
98is available from {\tt http://www.lal.in2p3.fr/recherche/eros/PeidaDoc/} }
99and {\bf PIext/} modules are not currently part
100of the SOPHYA CVS structure.
101\end{itemize}
102
103\section{Using Sophya}
104Two environment variables {\bf DPCBASEREP} and {\bf EROSCXX} are used
105to define the path where the Sophya libraries and executable are installed.
106{\bf DPCBASEREP} defines the base directory path and {\bf EROSCXX} the
107name of the C++ compiler. The complete path is built using {\bf DPCBASEREP},
108the operating system name (as obtained by the {\tt uname} command), and
109the compiler name. In the example below, we show the complete path
110for a {\tt Linux} system, using the GNU g++ compiler:
111
112\begin{itemize}
113\item \$DPCBASEREP/Include : Include (.h) files
114\item \$DPCBASEREP/Linux-g++/Libs : Path for the archive libraries (.a)
115\item \$DPCBASEREP/Linux-g++/ShLibs : Shared library path (.so)
116\item \$DPCBASEREP/Linux-g++/Exec : Executable file path
117\end{itemize}
118
119In order to use the shared libraries, the {\bf LD\_LIBRARY\_PATH} variable
120should contain the Sophya shared library path
121({\tt \$DPCBASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux)
122
123The file {\tt \$DPCBASEREP/Include/MakefileUser.h} defines the compilation
124flag and the list of Sophya libraries. It should be included in the
125user's makefile. The default compilation rules assumes that the object (.o)
126and executable files would be put in the following diretories: \\
127{\tt \$HOME/`uname`-\$EROSCXX/Objs} \\
128{\tt \$HOME/`uname`-\$EROSCXX/Exec}.
129In the case of a {\tt Linux} system and using {\tt g++} as the C++ compiler,
130these two directories would be translated to \\
131{\tt \$HOME/Linux-g++/Objs} and {\tt \$HOME/Linux-g++/Exec}.
132The GNU make program should be used.
133\par
134The file {\tt \$DPCBASEREP/Include/makefile\_auto} defines the rules to compile
135a given source program, and link it against the Sophya libraries to produce
136an executable. The example below shows the steps to compile a program named
137{\tt trivial.cc }.
138\begin{verbatim}
139csh> cp $DPCBASEREP/Include/makefile_auto makefile
140csh> make trivial
141\end{verbatim}
142This command should compile the {\tt trivial.cc} file, producing
143{\tt \$HOME/`uname`-\$EROSCXX/Objs/trivial.o} and link it against the sophya
144libraries to produce {\tt \$HOME/`uname`-\$EROSCXX/Exec/trivial}.
145\par
146The file {\tt \$DPCBASEREP/Include/makefile\_example} provides another
147example makefile.
148
149
150\section{Building and installing Sophya}
151Presently, the Sophya library compilation has been tested with the following
152compiler/platform pairs:
153
154\begin{center}
155\begin{tabular}{ll}
156Compaq/DEC OSF1 & cxx (6.0 , 6.2) \\
157Linux & g++ (2.91 , 2.95) \\
158Linux & KCC (3.4) \\
159Solaris & g++ (2.95) \\
160SGI IRIX64 & CC \\
161\end{tabular}
162\end{center}
163
164Some of the modules in the Sophya package uses external libraries. The
165{\bf FitsIOServer} is the example of such a module, where the {\tt libcfitsio.a}
166is used.
167The build procedure expects to find the include files and the libraries in: \\
168{\tt \$EXTLIBDIR/Include/FitsIO } \\
169{\tt \$EXTLIBDIR/`uname`-\$EROSCXX/Libs} \\
170
171The object files from a given Sophya module are grouped in an archive library
172with the module's name ({\tt libmodulename.a}). All Sophya modules
173 are grouped in a single shared library ({\tt libsophya.so}), while the
174modules with reference to external libraries are grouped in
175({\tt libextsophya.so}). The {\bf PI} and {\bf PIext} modules are
176grouped in ({\tt libPI.so}).
177
178The environment variables {\bf DPCDEVREP}, {\bf EXTLIBDIR} and {\bf EROSCXX}
179must be defined in order to install the Sophya package.
180In the example below, we assume that we want to install Sophya from a
181released (tagged) version in the source directory {\tt \$SRC} in the
182{\tt /usr/local/Sophya} diretory, using {\tt g++}. We assume that
183the external libraries directory tree has been set up in
184{\tt /usr/local/ExtLibs/}. \\[3mm]
185\centerline{\bf \large the use of GNU make is mandatory.}
186\vspace*{3mm}
187\begin{verbatim}
188# We select our C++ compiler
189csh> setenv EROSCXX g++
190# Setup the build directory
191csh> mkdir /usr/local/Sophya/
192csh> setenv DPCDEVREP /usr/local/Sophya/
193csh> setenv EXTLIBDIR /usr/local/ExtLibs/
194# Use the top level makefile in Mgr/
195csh> cd $SRC
196csh> cp Mgr/Makefile Makefile
197# Step 1: Create the directory tree and copy the include files (.h)
198csh> make depend
199# Step 2: Compile the modules without external library reference
200csh> make libs
201# Step 3: Compile the modules WITH external library reference (optional)
202csh> make extlibs
203# Step 4: Build libsophya.so
204csh> make slb
205# Step 5: Build libextsophya.so (optional)
206csh> make slbext
207# Step 6: Compile the PI and PIext modules (optional)
208csh> make PI
209# Step 7: Build the corresponding shared library libPI.so (optional)
210csh> make slbpi
211\end{verbatim}
212
213To compile all modules and build the shared libraries, it is possible
214to use:
215\begin{verbatim}
216# Step 2,3,6
217csh> make all
218# Step 4,5,7
219csh> make slb
220\end{verbatim}
221
222At this step, all libraries sould have been made. Programs using
223Sophya libraries can now be built:
224\begin{verbatim}
225# To compile test programs
226csh> cd Tests
227csh> make arrt ...
228csh> cd ..
229# To compile other programs, for example from the PMixer module
230csh> cd PMixer
231csh> make
232csh> cd ..
233# To build (s)piapp (libPI.so is needed)
234csh> cd ProgPI
235csh> make
236csh> cd ..
237\end{verbatim}
238
239\section{Mgr/ module}
240This module contains scripts which can be used for ge
241blabla ...
242
243\section{SysTools module}
244This is a dclsa{AAAA} \\[2mm]
245\dclsa{AAA}
246This is a dclsb{BBBB}{BBBB} \\[2mm]
247\dclsbb{BBBB}{BBBB}
248This is a dclsc{CCCCC}{CCCCC}{CCCCC} \\[2mm]
249\dclsccc{\tcls{CCCCC}}{CCCCC}{CCCCC}
250
251
252\begin{figure}
253\dclsa{DataCard}
254\dclsbb{AnyDataObj}{NDataBlock$<$T$>$}
255\dclsccc{BaseArray}{TArray}{TMatrix}
256\dclsb{NDataBlock$<$T$>$}
257\dclscc{TArray}{TMatrix}
258\dclsc{\tcls{Tvector}}
259\caption{ Partial class diagram}
260\end{figure}
261
262
263PixelMap<T> --- LocalMap<T>
264 SphericalMap<T> --- SphereThetaPhi<T>
265 SphereHEALPix<T>
266
267
268\end{document}
Note: See TracBrowser for help on using the repository browser.