(file) Return to e01011ana.tex CVS log (file) (dir) Up to [HallC] / Documents / Howtos

File: [HallC] / Documents / Howtos / Attic / e01011ana.tex (download) / (as text)
Revision: 1.1.2.3, Fri Jun 17 19:59:57 2005 UTC (19 years, 3 months ago) by saw
Branch: hks05
Changes since 1.1.2.2: +36 -16 lines
Update from Miyoshi and spell check

\documentclass{chowto}

\title{Run analysis code in your directory}
\howtotype{user}
\category{general}
\experiment{HKS}
%\maintainer{} % Optional
\author{T. Miyoshi}
\date{June 17 , 2004}

\begin{document}

\begin{abstract}
This document describes how to run analysis code in your directory.

\end{abstract}

\section{Preparation}

First of all, set environment variables in your .cshrc or login file:

\begin{verbatim}
> setenv CVSROOT /group/hks/e01011soft
\end{verbatim}

If you can not see work or group directory from your pc, then,

\begin{verbatim}
> setenv CVSROOT <yourname>@cvs.jlab.org:/group/hks/e01011soft
\end{verbatim}

If required, set one more thing,

\begin{verbatim}
> setenv CVS_RSH ssh
\end{verbatim}

Before checking out CVS, make sure you are one of members of c-hks group
in /w/work1801/hks. If you can create any directory, it is ok.
If not, ask Steve to add your username on c-hks group.

Make your analysis directory. For example, assume the name is 
$ana$. Go to $ana$ directory. Then,

\begin{verbatim}
> cvs checkout e01011src
> cvs checkout e01011-replay
\end{verbatim}

Then, source code directory and replay directory is created.

Go to e01011src directory, edit Makefile.in to change
$OFFLINE$ in the 1st line. If your code is in
/work/hallc/hks/$<$yourname$>$/ana/e01011src, then
change it to 

\begin{verbatim}
OFFLINE=/work/hallc/hks/<yourname>/ana/e01011src
\end{verbatim}

Then, go to your e01011-replay directory.
Go to SRC. There is no more $OFFLINE$ parameter in Makefile.
Make sure INCLUDE and LIB are used for compilation in SRC.

\section{Run replay}

When you start today's work everyday, first execute in your
e01011-replay directory,

\begin{verbatim}
> cvs update
\end{verbatim}

to prevent parameter mismatching. Any parameters may be changed 
while you are in your dream. If you find 'C' during update
it means the file is conflict. Please remove any conflict by yourself.

When you go to e01011-replay directory first,
just do,

\begin{verbatim}
>./DO_FIRST
\end{verbatim}

to create scalers, peds, epics, paw and paw/kumacs symbolic link.
If you already have kumacs directory in paw directory,
create backup directory and then move kumacs directory by renaming, for example,
kumacs-bak, then ./DO$_-$FIRST again. The paw/kumacs may be updated any more.
We will update e01011-replay/kumacs.

Then, go to e01011-replay/SRC directory. then

\begin{verbatim}
> make
\end{verbatim}

to compile updated program. After the compilation is succeeded,
go back to e01011-replay directory. Then, edit REPLAY.PARM.

Make sure parameters, especially, see if raw data path is correct:
\begin{verbatim}
g_data_source_filename= '/.../..._%d.log'
\end{verbatim}

(Note that run number is filled in \%d when running the code) 

hbook or ntuple is on/off:

; means off, no ';' means on,

\begin{verbatim}
  g_alias_filename    = 'paw/paw%d.kumac'  
  g_histout_filename  = 'paw/%d.hbook'
  coin_ntuple        = 'paw/coin%d.rzdat'
\end{verbatim}

Do not turn on all the ntuple. or ntuple may not be filled correctly
after memory is overflow-ed. The goal is to accumulate coinXXXXX.rzdat.
Until cut condition is determined and you don't have good parameters
for DCs, Cherenkovs and hodoscopes, do not turn on coin ntuple. You may 
copy c$_-$ntuple$_-$init.f and c$_-$ntuple$_-$keep.f 
from e01011src/ENGINE to e01011-replay/SRC
and then test it. Before all parameter is settled, we may need to check parameters 
detector by detector, in this case we may use some particular ntuples. 

To run replay,

\begin{verbatim}
  ./replay_script <run number>
\end{verbatim}

The $replay_-script$ is just a shell script you can see it
by 'more' or 'less' command. Executable file is in EXE/engine$_-$replay
which is created after make. actually, the options of replay are

\begin{verbatim}
grun=<run number> 
gstart=<the number of events you skip>
gstop=<the number of events you replay>
g_config_filename=<config filename c.f. REPLAY.PARM.test,etc...>
\end{verbatim}

Example:

\begin{verbatim}
./replay_script 50000
\end{verbatim}

Run replay for run number = 50000 to the end.

\begin{verbatim}
./replay_script 50000 gstop=20000
\end{verbatim}

Run replay for run number = 50000 to the 1st 20000 events.

\begin{verbatim}
./replay_script 50000 gstart=10000 gstop=20000
\end{verbatim}

Run replay for run number = 50000 to 20000 events after skipping 
10000 events. Eventually it replays from the 10000th to the 30000th event.

\begin{verbatim}
./replay_script 50000 g_config_filename=REPLAY.PARM.test
\end{verbatim}

use your special config file REPLAY.PARM.test to this replay.

\section{Bugs}

(1) If you have used e01011-replay directory,
new directory e01011-replay/SRC/LIB may not be updated correctly.
Please first do checkout in your ana directory,

\begin{verbatim}
cvs checkout e01011-replay
\end{verbatim}

(2) If parameter files are updated but archive is not fully updated,
replay may not work. Until fixing problem, try compile codes 
in e01011src, 'make install', then copy LIB files and INCLUDE files
to e01011-replay/SRC/. Committing source file is authorized to only
analysis experts (Sumihama, Lulin and Fujii(?)). If you want to change
source code ask the experts.

\end{document}

% Revision history:
% $Log: e01011ana.tex,v $
% Revision 1.1.2.3  2005/06/17 20:59:57  saw
% Update from Miyoshi and spell check
%
% Revision 1.1.2.2  2005/06/09 17:32:10  saw
% Add DO_FIRST instructions
%
% Revision 1.1.2.1  2005/05/23 14:19:52  saw
% Initial version
%

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0