Changeset 2790 in Sophya
- Timestamp:
- May 31, 2005, 7:00:43 PM (20 years ago)
- Location:
- trunk/SophyaLib/Manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/defsophya.sty
r1435 r2790 4 4 \newcommand{\tclsc}[2] {#1$<$#2$>$} 5 5 % Putting a class name in a box 6 \newcommand{\clsbox}[1] { \framebox[4 0mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf #1} } }6 \newcommand{\clsbox}[1] { \framebox[45mm][c]{\mbox{\rule[-1mm]{0mm}{5mm} \bf #1} } } 7 7 % Emplty class box 8 \newcommand{\eclbox} { \makebox[4 0mm][c]{\mbox{\rule[-1mm]{0mm}{5mm}} } \ }8 \newcommand{\eclbox} { \makebox[45mm][c]{\mbox{\rule[-1mm]{0mm}{5mm}} } \ } 9 9 % Length of \longleftarrow 10 10 \newlength{\arrclsw} \settowidth{\arrclsw}{$\longleftarrow$} -
trunk/SophyaLib/Manual/sophya.tex
r2437 r2790 43 43 \vspace{1cm} 44 44 \begin{center} 45 {\bf \Large Sophya Version: 1.5 (V\_Dec2002) }45 {\bf \Large Sophya Version: 2.0 (V\_Jun2005) } 46 46 % Document revision 1.0 } 47 47 \end{center} … … 59 59 physics analysis software development. Our goal is to provide 60 60 easy to use, yet powerful classes which can be used by scientists. 61 We have decided to use as much as possible available62 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.61 Although some of the SOPHYA modules (SkyMap, Samba, SkyT) 62 have been designed with the specific goal CMB data analysis, most 63 modules presented here have a much broader scope and can be 64 used in scientific data analysis and modeling/simulation. 65 Whenever possible, we use existing numerical package and libraries, 66 encapsulating them whenever 67 possible. 68 68 \par 69 69 \vspace*{2mm} … … 77 77 \vspace*{2mm} 78 78 The source directory tree 79 \footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVS Planck}79 \footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSSophya} 80 80 is organised into a number of modules. 81 81 82 82 \begin{itemize} 83 \item[] {\bf Mgr/} Scripts for code management,83 \item[] {\bf BuildMgr/} Scripts for code management, 84 84 makefile generation and software installation 85 85 \item[] {\bf BaseTools/} General architecture support classes such … … 92 92 (linear, and non linear parameter fitting, FFT, \ldots) 93 93 \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 fewgeometry94 ({\tt Histo Histo2D NTuple DataTable} \ldots) 95 \item[] {\bf SkyMap/} Local and full sky maps, and some 3D geometry 96 96 handling utility classes. \\ 97 97 ({\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 100 99 {\tt DataCard} class, as well as string manipulation functions in C and C++. 101 100 \item[] {\bf SysTools/} This module contains classes implementing 102 101 an interface to various OS specific services, such 103 as shared object and dynamic linkhandling.102 threads and dynamic link/shared library handling. 104 103 105 104 \end{itemize} … … 125 124 extracted from the {\bf Xephem } source code. The corresponding source 126 125 code is also available from SOPHYA cvs repository, module {\bf XephemAstroLib}. 126 \item[] {\bf MinuitAdapt/} Wrapper classes to CERN minimization routines (Minuit). 127 127 128 \end{itemize} 128 129 … … 162 163 \begin{itemize} 163 164 \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)piapp165 makefiles. 166 \item[] {\bf DemoPIApp/} Sample scripts and programs for (s)piapp 166 167 interactive analysis tools. 167 168 \end{itemize} … … 173 174 {\bf http://www.sophya.org}. 174 175 175 \subsection{ Environment variables}176 T wo environment variables {\bf SOPHYABASEREP} and {\bf SOPHYACXX} areused176 \subsection{Directories, environment variables, configuration files} 177 The environment variable {\bf SOPHYABASE} is used 177 178 to define the path where the Sophya libraries and executable are installed. 178 {\bf SOPHYABASEREP} defines the base directory path and {\bf SOPHYACXX} the179 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), and181 the compiler name. In the example below, we show the complete path182 for a {\tt Linux} system, using the GNU g++ compiler:183 184 179 \begin{itemize} 185 \item \$SOPHYABASE REP/Include : Include (.h) files186 \item \$SOPHYABASE REP/Linux-g++/Libs: Path for the archive libraries (.a)187 \item \$SOPHYABASE REP/Linux-g++/ShLibs: Shared library path (.so)188 \item \$SOPHYABASE REP/Linux-g++/Exec: Executable file path180 \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 189 184 \end{itemize} 190 185 191 186 In order to use the shared libraries, the {\bf LD\_LIBRARY\_PATH} variable 192 187 should 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 }). \\ 189 On Silocon Graphics machines (IRIX64) , the default SOPHYA configuration 190 correspond to the 64 bit architecture. 191 The environment variable { \bf LD\_LIBRARY64\_PATH } defines 192 the shared library path in this case and should contain ({\tt \$SOPHYABASE/slb }. 193 194 The 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 201 The directory { \tt \$SOPHYABASE/include/SophyaConfInfo/ } contains files 202 describing the installed configuration of SOPHYA software. 203 204 The file { \tt \$SOPHYABASE/include/machdefs.h } contains definitions 205 (flags, typedef) used in SOPHYA. 206 207 The file { \tt \$SOPHYABASE/include/sophyamake.inc } contains the 208 compilation commands and flags used for building the software. 209 Users can use most of compilation and link commands defined in this file: 210 {\tt \$CCOMPILE , \$CXXCOMPILE . \$CXXLINK \ldots}. 211 (See module Example). 212 213 The configure script (BuildMgr/configure) creates the directory tree and the 214 above files. 229 215 230 216 \subsection{the runcxx program} … … 240 226 \begin{verbatim} 241 227 csh> 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 229 SOPHYA 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 251 239 \end{verbatim} 252 240 Most examples in this manual can be tested using runcxx. The … … 264 252 \subsection{the scanppf program} 265 253 {\bf scanppf} is a simple SOPHYA application which can be used to check 266 PPF files and list their contents. 254 PPF files and list their contents. It can also provide the list of all registered 255 PPF handlers. 267 256 \begin{verbatim} 268 257 csh> 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 259 SOPHYA 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 275 267 \end{verbatim} 276 268 … … 342 334 \begin{figure}[hbt] 343 335 \dclsa{PPersist} 344 \dcls bb{PIOPersist}{PInPersist}345 \dcls b{POutPersist}336 \dclsccc{PPFBinarIOStream}{PPFBinaryInputStream}{PInPersist} 337 \dclscc{PPFBinaryOutputStream}{POutPersist} 346 338 \caption{partial class diagram for classes handling persistence in Sophya} 347 339 \end{figure} … … 385 377 The operators {\tt operator << (POutPersist ...) } and 386 378 {\tt operator >> (PInPersist ...) } are often overloaded 387 to perform {\tt PutObject()} and {\tt GetObject()} operations, 388 as illustrated in the example below: 379 to perform {\tt PutObject()} and {\tt GetObject()} operations. 380 the {\bf PPFNameTag} (ppfnametag.h) class can be used in conjunction with 381 {\tt << >> } operators to write objects with a name tag or to retrieve 382 an object identified with a name tag. The example below shows the 383 usage of these operators: 389 384 \begin{verbatim} 390 385 // Creating and filling a histogram … … 393 388 // Writing histogram to a PPF stream 394 389 POutPersist os("hw.ppf"); 395 os << hw; 390 os << PPFNameTag("myhisto") << hw; 391 396 392 // Reading a histogram from a PPF stream 397 393 PInPersist is("hr.ppf"); 398 is >> hr;394 is >> PPFNameTag("myhisto") >> hr; 399 395 \end{verbatim} 400 396 401 397 The {\bf scanppf} program can be used to list the content of a PPF file. 402 \index{scanppf}403 \begin{verbatim}404 csh> scanppf -h405 SOPHYA Version 1.1 Revision 0 (V_Fev2001) -- Feb 28 2001 11:19:17 cxx406 Usage: scanppf filename [s/n/a0/a1/a2/a3]407 s[=default} : Sequential reading of objects408 n : Object reading at NameTags409 a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)410 \end{verbatim}411 412 398 413 399 \subsection{\tcls{NDataBlock}} … … 476 462 \end{verbatim} 477 463 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 471 type {\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 473 defined by tcls{SegDBInterface}. 474 \item[] \tcls{SwSegDataBlock} Implements the same tcls{SegDBInterface} 475 using a data swapper (\tcls{DataSwapperInterface} . 476 Can thus be used for very large objects. 477 \end{itemize} 478 479 479 \newpage 480 480 \section{Module TArray} … … 870 870 \dclsbb{AnyDataObj}{Histo2D} 871 871 \dclsbb{AnyDataObj}{Ntuple} 872 \dclsb{XNtuple}873 872 \caption{partial class diagram for histograms and ntuples} 874 873 \end{figure} … … 931 930 \subsection{Data tables (tuples)} 932 931 \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.932 NTuple 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. 935 934 These objects are frequently used to analyze data. 936 Graphicals tools (spiapp)can plot a column against an other one935 The piapp graphicals tools can plot a column against an other one 937 936 with respect to various selection cuts. \\ 938 937 Here is an example of creation and filling~: … … 954 953 \end{verbatim} 955 954 956 XNTuple are sophisticated NTuple : they accept various types 955 XNTuple provide additional functionalities, compared to NTuple. 956 They are deprecated and are only kept for backward compatibility 957 and should not be used anymore. Use DataTable and 958 SwPPFDataTable instead. 959 Object of type XNTuple handle various types 957 960 of column values (double,float,int,string,...) and can handle 958 961 very 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 965 The class {\bf DataTable} extends significantly the functionalities provided by 966 NTuple. DataTable is a memory resident implementation of the interface 967 {\bf BaseDataTable } which organizes the data as a 2-D table. User can define 968 the name and data type of each column. Data is added to the table as rows. 969 The table is extended as necessary when adding rows. 970 The 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} 997 The class {\bf SwPPFDataTable} implements the BaseDataTable interface 998 using segmented data blocks with swap on PPF streams. Very large data sets 999 can be created and manipulated through tis class 987 1000 988 1001 \subsection{Writing, viewing \dots } … … 1211 1224 The class {\bf Periodic} provides the necessary services needed to 1212 1225 implement the execution of a periodic action. 1226 1227 \subsection{Thread management classes} 1213 1228 A basic interface to POSIX threads \index{thread} is also provided 1214 1229 through the \index{ZThread} {\bf ZThread}, {\bf ZMutex} and {\bf ZSync} 1215 1230 classes. 1216 1217 \subsection{Dynamic linker }1231 1232 \subsection{Dynamic linker and C++ compiler classes} 1218 1233 \index{PDynLinkMgr} 1219 1234 The class {\bf PDynLinkMgr} can be used for managing shared libraries … … 1233 1248 \end{verbatim} 1234 1249 1235 \subsection{CxxCompilerLinker class}1236 1250 \index{CxxCompilerLinker} 1237 Th isclass provides the services to compile C++ code and building1251 The {\bf CxxCompilerLinker} class provides the services to compile C++ code and building 1238 1252 shared libraries, using the same compiler and options which have 1239 1253 been used to create the SOPHYA shared library. … … 1255 1269 \end{verbatim} 1256 1270 1271 \subsection{Command interpreter} 1272 The class {\bf Commander} can be used in interactive programs to provide 1273 c-shell like command interpreter and scripting capabilties. 1274 Arithmetic expression evaluation is implemented through the {\bf CExpressionEvaluator} 1275 and {\bf RPNExpressionEvaluator} classes. 1276 1257 1277 \newpage 1258 1278 \section{Module SkyMap} … … 1497 1517 \newpage 1498 1518 \section{Building and installing Sophya} 1519 \subsection{supported platforms} 1499 1520 Presently, the Sophya library has been tested with the following 1500 1521 compiler/platform pairs: 1501 1522 1502 1523 \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 1526 OS & compiler \\ 1527 \hline 1528 HP/Compaq/DEC Tru64 ( OSF1) & cxx (6.1 , 6.3) \\ 1529 Linux (RH) & g++ (3.2) \\ 1530 Linux (SCL) & icc (8.1) (Intel compiler) \\ 1509 1531 SGI IRIX64 & CC (7.3) \\ 1510 MacOSX/Darwin 10.1 & c++/gcc 2.95 \\ 1532 MacOSX/Darwin 10.3 & g++ 3.3 \\ 1533 \hline 1511 1534 \end{tabular} 1512 1535 \end{center} … … 1515 1538 {\bf FitsIOServer} is the example of such a module, where the {\tt libcfitsio.a} 1516 1539 is 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} 1540 par 1539 1541 The object files from a given Sophya module are grouped in an archive library 1540 1542 with the module's name ({\tt libmodulename.a}). All Sophya modules … … 1544 1546 grouped in ({\tt libPI.so}). 1545 1547 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 1550 The build procedure has two main steps: \\ 1551 - The configure step (BuildMgr/configure) setup the directory structure and 1552 the necessary configuration file. \\ 1553 - The make step compiles the different sources files, create the library and optionaly 1554 builds 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} 1559 csh> ./configure -h 1560 configure [-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 1569 if not specified. 1570 \item[] -scxx : selects the C++ compiler. \$SOPHYACXX s used 1571 if 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 1576 include files and archive library. 1577 \item[] -extip : Adds the specied path to the search path of the external libraries 1578 include files. 1579 \item[] -extp : Adds the specied path to the search path of the external libraries 1580 archive (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 1583 library. 1584 \end{itemize} 1585 1548 1586 In the example below, we assume that we want to install Sophya from a 1549 1587 released (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 1589 the external libraries can be found in {\tt /usr/local/ExtLibs/}. 1590 We disable the compilation of the MinuitAdapt and XAstrPack packages. 1591 1558 1592 \vspace*{3mm} 1559 1593 \begin{verbatim} 1560 # We select our C++ compiler 1561 csh> setenv SOPHYACXX g++ 1562 # Setup the build directory 1594 # Create the top level directory 1563 1595 csh> 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 1596 csh> cd $SRC/BuildMgr 1597 # Step 1.a : Run the configuration script 1598 csh> ./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 1572 1602 csh> 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) 1574 1604 csh> make extlibs 1575 # Step 4: Build libsophya.so1605 # Step 2.c: Build libsophya.so 1576 1606 csh> make slb 1577 # Step 5: Build libextsophya.so (optional)1607 # Step 2.d: Build libextsophya.so (optional) 1578 1608 csh> make slbext 1579 # Step 6: Compile the PI and PIext modules (optional)1609 # Step 2.e: Compile the PI and PIext modules (optional) 1580 1610 csh> 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) 1582 1612 csh> make slbpi 1583 1613 \end{verbatim} … … 1586 1616 to use: 1587 1617 \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 1619 csh> make all slball 1592 1620 \end{verbatim} 1593 1621 … … 1596 1624 \begin{verbatim} 1597 1625 # 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 .. 1626 csh> cd ../PrgUtil 1627 csh> make 1605 1628 # To build (s)piapp (libPI.so is needed) 1606 csh> cd ProgPI1629 csh> cd ../ProgPI 1607 1630 csh> make 1608 1631 csh> cd ..
Note:
See TracChangeset
for help on using the changeset viewer.