source: JEM-EUSO/esaf_lal/tags/v1_r0/esafdoc/UserGuide/Introduction.tex @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 8.1 KB
Line 
1% ESAF User Guide
2% $Id: Introduction.tex 2441 2006-02-01 08:29:07Z thea $
3% M.Pallavicini, A. Thea - created
4
5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6% introduction
7%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8\section{Introduction}%
9%\addcontentsline{toc}{section}{Introduction}
10\label{sec:intro}
11\esaf{} stands for Euso Simulation and Analysis Framework.  It is a software
12framework developed for the Extreme Universe Space Observatory, EUSO.
13
14It is an integrated software designed to handle the event simulation chain
15(shower development simulation, light production due to fluorescence and
16Cerenkov, atmospheric effects, light transport to the Euso detector and the
17response of the Euso detector itself) and the reconstruction and analysis of
18both simulated events and of the real events.
19
20This note is a simple User Guide, therefore very little space is devoted to the
21description of the internal structure of ESAF and of the code. The reader
22should look at the ESAF document in the bibliography.
23
24The topic addressed in this document are basically the following:
25
26\begin{itemize}
27\item Requirements
28\item Getting the source code
29\item Compiling, linking and updating
30\item Running \Simu{}
31\item Output Root file structure
32\item The reconstruction code
33\end{itemize}
34
35The \esaf{} code is written in C++ and Fortran and is based on the \ROOT{}
36package~\cite{bib:root}. Although the code is written in a highly portable way,
37because of lack of man power we support the Linux platform only.
38
39The compiler is the standard gcc version 3.2 or higher~\cite{bib:gcc}.  Several
40Linux distributions have been used in the recent years without major problems.
41
42Even if we do NOT give any support, we encourage the user to try to port the
43code to different UNIX platforms if needed, because it should not create major
44problems.
45
46
47\subsection{Requirements}%
48%\addcontentsline{toc}{subsection}{Requirements}
49
50\begin{description}
51
52\item[gcc] version 3.2 or higher must be installed on your system.  Type
53\code{gcc -v} to get the version. If you get an error here, you don't have \code{gcc}
54at all!
55
56\item[\ROOT] must be installed and configured; the \code{ROOTSYS} environment
57variable must be properly set and must point to a recent version of \ROOT{}
58(3.10.2 or higher). Development is carried on using the last \textbf{pro}
59version available (differences among \textbf{new}, \textbf{pro} and
60\textbf{old} are explained on \ROOT{} website) therefore we strongly suggest
61keep the \ROOT{} version up to date. If you do not know how to set the
62\code{ROOTSYS} variable, ask your local system manager.
63
64\item[g77] The Fortran compiler sometimes is not included in the Linux
65distribution. Make sure that it is installed on your machine and eventually
66contact your computer administrator to get it.
67
68\item[zlib] We use compressed ASCII files and we need the zlib library
69\cite{bib:zlib}.  This is a very standard library available for any UNIX
70platform.  Be sure that you have it.
71\end{description}
72
73
74\subsection{Getting the code}%
75%\addcontentsline{toc}{subsection}{Getting the code}
76
77The \esaf{} code is available through \textbf{CVS} (Concurrent Version System)
78\cite{bib:cvs} from the CVS server at the Lyon in2p3 Computing Center.
79The code is available in "read-only" mode for normal users and in
80read/write mode for developers.
81
82In the normal read-only mode, the user should configure his ssh directory first.
83Inside your directory \code{.ssh}, create an ASCII file named \code{config} with
84the following lines:
85
86\begin{displaycode}
87Host cvs.in2p3.fr
88     Port 2222
89     User euso
90     PasswordAuthentication yes
91     RSAAuthentication no
92     PubkeyAuthentication no
93     ForwardX11 no
94     ForwardAgent no
95\end{displaycode}
96
97Then the user should set the following UNIX environment variables (see CVS
98manual for details):
99
100\begin{displaycode}
101[user]# export CVSROOT=euso@cvs.in2p3.fr:/cvs/euso/
102[user]# export CVS_RSH=ssh
103\end{displaycode}
104
105After these settings are done you are ready to get the code with the standard
106CVS command:
107
108\begin{displaycode}
109[user]# cvs co esaf
110\end{displaycode}
111
112The developer that needs write acces to the CVS repository must get in contact
113with the \esaf{} group and get an account at the Lyon CC. The complete
114documentation about Lyon CVS accounts are available on the Lyon CC webpage
115\cite{bib:cvslyon}.
116
117\subsection{Compiling and Linking}%
118%\addcontentsline{toc}{subsection}{Compiling and Linking}
119
120Once you have the \esaf{} source code, compiling is a very simple task.
121Just enter into the \esaf{} directory that CVS has created in the place
122where you typed \code{cvs co esaf} and then type \code{make}.
123
124The compilation and linking may take several minutes, depending on the
125machine you are using. If everything went fine, at the end you should have
1262 executable files in the \code{bin/i686} directory, named \code{\Simu{}} and
127\code{\Reco{}}.
128
129Compilation and or Linking may fail for several reasons; if so, and you didn't
130modified the code, make sure that all requirements are satisfied.
131
132\subsection{Updating the code}
133%\addcontentsline{toc}{subsection}{Updating the code}
134
135\esaf{} is continuously updated (developing and debugging); in most cases
136changes are small and don't affect \esaf{}'s behaviour deeply. On the contrary
137sometimes are so significant to require a total rebuild of the code and may and
138affect also the output files so that they are not compatible between different
139versions of the program. Therefore we advise to keep the code up-to-date.
140\code{}
141To do this just go in \code{esaf} directory and type at the system prompt
142
143\begin{displaycode}
144[user]# cvs up -d
145\end{displaycode}
146
147This updates files that are changed, deleted or created; the optiona flag
148\code{-d} is needed when new directory has been added to the repository. This
149doesn't occur often, so basically you can just type \code{cvs up}.
150
151It is also possible to update each directory or file indipendently running
152\code{cvs up} from the directory itself (as long as in that directory there
153is a subdirectory \code{CVS}).
154
155There is an \esaf{} CVS mailing list that keeps the users informed whenever new
156code is committed to the repository and that sends the list of the modified
157files. If you are interested to receive these mails, you are invited to contact
158the authors.
159
160\subsection{Building options}
161%\addcontentsline{toc}{subsection}{Building options}
162
163In the main \esaf{} directory the \code{Rules} file contains the compilation
164options.
165
166The most important option for the user is \code{ESAFTMP}; this variable points
167to the directory where \code{make} saves the temporary object files for creation
168of libraries and binaries. Default directory is:
169
170\begin{displaycode}
171ESAFTMP = /tmp
172\end{displaycode}
173
174In some cases is advisable to change the default directory (editing the file
175\code{Rules}) because the directory \code{/tmp}, present in all systems, is
176generally emptied when you reboot the machine.
177
178In \code{ESAFTMP} directory contains \code{ESAFTMP.username/architeture/} in
179which are other subdirectories, one for each library of \esaf{}.
180
181\subsection{Cleaning and rebuilding}
182%\addcontentsline{toc}{subsection}{Cleaning and rebuilding}
183
184Sometimes, after a major change or when an obsolete file is removed from
185repository \code{make} could fail to rebuild \esaf{}. This is due to old
186temporary files in \code{ESAFSYS} that conflicts with the new code. To get rid
187of them two ways exist.
188
189In most cases \code{make} is able to clean \code{ESAFSYS} by itself. Just go in
190\code{esaf/} directory and type
191
192\begin{displaycode} 
193[user]# make clean
194[user]# make
195\end{displaycode}
196
197If also \code{make clean} fails or the compilation is still broken,
198\code{ESAFSYS} must be deleted by hand.
199
200\begin{displaycode}
201[user]# cd [ESAFTMP]
202[user]# rm -rf
203[user]# cd [ESAFSYS]
204[user]# make
205\end{displaycode}
206
207As last chance, if you still have problems, you can delete the entire \code{esaf/}
208and the \code{ESAFTMP} directories and reinstall \esaf{}.
209
210The other options in the file \code{Rules} is \code{DEBUG}, for compiling with
211(\code{DEBUG = 1}) or without (\code{DEBUG = 0}) debugger support.
212%and \code{VERBOSE\_COMPILING} in order to visualize or not each single step of
213%compilation.
214
Note: See TracBrowser for help on using the repository browser.