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 |
---|
12 | framework developed for the Extreme Universe Space Observatory, EUSO. |
---|
13 | |
---|
14 | It is an integrated software designed to handle the event simulation chain |
---|
15 | (shower development simulation, light production due to fluorescence and |
---|
16 | Cerenkov, atmospheric effects, light transport to the Euso detector and the |
---|
17 | response of the Euso detector itself) and the reconstruction and analysis of |
---|
18 | both simulated events and of the real events. |
---|
19 | |
---|
20 | This note is a simple User Guide, therefore very little space is devoted to the |
---|
21 | description of the internal structure of ESAF and of the code. The reader |
---|
22 | should look at the ESAF document in the bibliography. |
---|
23 | |
---|
24 | The 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 | |
---|
35 | The \esaf{} code is written in C++ and Fortran and is based on the \ROOT{} |
---|
36 | package~\cite{bib:root}. Although the code is written in a highly portable way, |
---|
37 | because of lack of man power we support the Linux platform only. |
---|
38 | |
---|
39 | The compiler is the standard gcc version 3.2 or higher~\cite{bib:gcc}. Several |
---|
40 | Linux distributions have been used in the recent years without major problems. |
---|
41 | |
---|
42 | Even if we do NOT give any support, we encourage the user to try to port the |
---|
43 | code to different UNIX platforms if needed, because it should not create major |
---|
44 | problems. |
---|
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} |
---|
54 | at all! |
---|
55 | |
---|
56 | \item[\ROOT] must be installed and configured; the \code{ROOTSYS} environment |
---|
57 | variable 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} |
---|
59 | version available (differences among \textbf{new}, \textbf{pro} and |
---|
60 | \textbf{old} are explained on \ROOT{} website) therefore we strongly suggest |
---|
61 | keep 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 |
---|
65 | distribution. Make sure that it is installed on your machine and eventually |
---|
66 | contact 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 |
---|
70 | platform. Be sure that you have it. |
---|
71 | \end{description} |
---|
72 | |
---|
73 | |
---|
74 | \subsection{Getting the code}% |
---|
75 | %\addcontentsline{toc}{subsection}{Getting the code} |
---|
76 | |
---|
77 | The \esaf{} code is available through \textbf{CVS} (Concurrent Version System) |
---|
78 | \cite{bib:cvs} from the CVS server at the Lyon in2p3 Computing Center. |
---|
79 | The code is available in "read-only" mode for normal users and in |
---|
80 | read/write mode for developers. |
---|
81 | |
---|
82 | In the normal read-only mode, the user should configure his ssh directory first. |
---|
83 | Inside your directory \code{.ssh}, create an ASCII file named \code{config} with |
---|
84 | the following lines: |
---|
85 | |
---|
86 | \begin{displaycode} |
---|
87 | Host 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 | |
---|
97 | Then the user should set the following UNIX environment variables (see CVS |
---|
98 | manual 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 | |
---|
105 | After these settings are done you are ready to get the code with the standard |
---|
106 | CVS command: |
---|
107 | |
---|
108 | \begin{displaycode} |
---|
109 | [user]# cvs co esaf |
---|
110 | \end{displaycode} |
---|
111 | |
---|
112 | The developer that needs write acces to the CVS repository must get in contact |
---|
113 | with the \esaf{} group and get an account at the Lyon CC. The complete |
---|
114 | documentation 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 | |
---|
120 | Once you have the \esaf{} source code, compiling is a very simple task. |
---|
121 | Just enter into the \esaf{} directory that CVS has created in the place |
---|
122 | where you typed \code{cvs co esaf} and then type \code{make}. |
---|
123 | |
---|
124 | The compilation and linking may take several minutes, depending on the |
---|
125 | machine you are using. If everything went fine, at the end you should have |
---|
126 | 2 executable files in the \code{bin/i686} directory, named \code{\Simu{}} and |
---|
127 | \code{\Reco{}}. |
---|
128 | |
---|
129 | Compilation and or Linking may fail for several reasons; if so, and you didn't |
---|
130 | modified 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 |
---|
136 | changes are small and don't affect \esaf{}'s behaviour deeply. On the contrary |
---|
137 | sometimes are so significant to require a total rebuild of the code and may and |
---|
138 | affect also the output files so that they are not compatible between different |
---|
139 | versions of the program. Therefore we advise to keep the code up-to-date. |
---|
140 | \code{} |
---|
141 | To 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 | |
---|
147 | This 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 |
---|
149 | doesn't occur often, so basically you can just type \code{cvs up}. |
---|
150 | |
---|
151 | It 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 |
---|
153 | is a subdirectory \code{CVS}). |
---|
154 | |
---|
155 | There is an \esaf{} CVS mailing list that keeps the users informed whenever new |
---|
156 | code is committed to the repository and that sends the list of the modified |
---|
157 | files. If you are interested to receive these mails, you are invited to contact |
---|
158 | the authors. |
---|
159 | |
---|
160 | \subsection{Building options} |
---|
161 | %\addcontentsline{toc}{subsection}{Building options} |
---|
162 | |
---|
163 | In the main \esaf{} directory the \code{Rules} file contains the compilation |
---|
164 | options. |
---|
165 | |
---|
166 | The most important option for the user is \code{ESAFTMP}; this variable points |
---|
167 | to the directory where \code{make} saves the temporary object files for creation |
---|
168 | of libraries and binaries. Default directory is: |
---|
169 | |
---|
170 | \begin{displaycode} |
---|
171 | ESAFTMP = /tmp |
---|
172 | \end{displaycode} |
---|
173 | |
---|
174 | In 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 |
---|
176 | generally emptied when you reboot the machine. |
---|
177 | |
---|
178 | In \code{ESAFTMP} directory contains \code{ESAFTMP.username/architeture/} in |
---|
179 | which are other subdirectories, one for each library of \esaf{}. |
---|
180 | |
---|
181 | \subsection{Cleaning and rebuilding} |
---|
182 | %\addcontentsline{toc}{subsection}{Cleaning and rebuilding} |
---|
183 | |
---|
184 | Sometimes, after a major change or when an obsolete file is removed from |
---|
185 | repository \code{make} could fail to rebuild \esaf{}. This is due to old |
---|
186 | temporary files in \code{ESAFSYS} that conflicts with the new code. To get rid |
---|
187 | of them two ways exist. |
---|
188 | |
---|
189 | In 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 | |
---|
197 | If 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 | |
---|
207 | As last chance, if you still have problems, you can delete the entire \code{esaf/} |
---|
208 | and the \code{ESAFTMP} directories and reinstall \esaf{}. |
---|
209 | |
---|
210 | The 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 | |
---|