``Twenty Minutes
to
the Future''
The ZEUS Scheme of
Modern Software Management
(ZSMSM)
John J. Ryan
DESY / F1
November, 1997
How to get Started:
1.) Update Shell Resource File
( .cshrc or .zshrc )
2.) Run the Example EAZE Job
3.) Convert Your EAZE Job
( It's 20 Minutes later; you can go have a beer .... )
Example CShell Resource File
( .cshrc )
Found in
$ZEUS_BASE_ROOT/ZEUSSysSoft/Setup
# The system login file
# ---------------------
if ( -f /etc/csh.cshrc ) source /etc/csh.cshrc
# Define the path to my personal home directory
# ---------------------------------------------
# (Change this to your's)
setenv
AFS_HOME /afs/desy.de/user/j/jryan
#
# Define the path to the ZEUS Base directory
# ------------------------------------------
setenv
ZEUS_BASE_ROOT /afs/desy.de/group/zeus.zsmsm
# Setup the ZEUS environment
# --------------------------
source $ZEUS_BASE_ROOT/ZEUSSysSoft/Setup/setup_ZEUS.csh
# Setup the my personal environment
# ---------------------------------
if ( -f $AFS_HOME/.Setup/setup_me.csh ) then
source $AFS_HOME/.Setup/setup_me.csh
endif
Example EAZE Job
cd /data/
myarea
gnutar -z -xvf $ZSYS_ROOT/tars/eaze_example.tgz
For older versions, you can do this as a 2-step process:
gunzip -c $ZSYS_ROOT/tars/eaze_example.tgz | tar -xvf -
cd eaze_example
ls
cards/ cmd/ doc/ exe/ gen/ inc/ lib/ obj/ src/
cd cmd
make help
This procedure makes an example EAZE job.
It books and fills an example Ntuple.
It also extracts a small number of events to an output file.
. . .
make all
make run
Converting Your EAZE Job
cd /data/
myarea
gnutar -z -xvf $ZSYS_ROOT/tars/eaze_template.tgz
cd eaze_template
ls
cards/ cmd/ doc/ exe/ gen/ inc/ lib/ obj/ src/
cd src
patchy_to_dirs.exe my_eaze_job.car
clean_eaze_ex.csh
cd ../cmd
make help
This procedure makes ....
. . .
make all
(builds locally)make run
(runs locally)
rsh zarah2 "(cd `pwd` ; make all ZEUSRELEASE=pro)"
This job could then be submitted to NQS on zarah with the following command:
jobsub eaze_run.sh -f \
eaze_run.sh ../exe/mips-sgi-irix5.3/eaze_example.exe \
../cards/control.cards
Changing the Name
of Your EAZE Job
cmd / eaze_job.make :
#__________________________________________________
#
#
What's in the example:# -----------------------
PROGRAM_NAME = eaze_example
Adding Directories to Your EAZE Job
cmd / eaze_job.make :
#__________________________________________________
#
#
What's in the example:# -----------------------
#
Define the subdirectories of the Include tree# ---------------------------------------------
USERINCS := control hbook analysis
#
Define the subdirectories of the Source tree# --------------------------------------------
USERSRCS := User_Hooks ntuple analysis
Getting More Common Blocks
for Your EAZE Job
cmd / eaze_job.make :
#__________________________________________________
#
# Add required include directories
#__________________________________________________
#
#
Already in the example:# -----------------------
FPPFLAGS += $(WINDOWSINCS)
FPPFLAGS += $(ZEUSINCS)
#
Common things to add :# -----------------------
FPPFLAGS += $(
PHANTOMINCS)
FPPFLAGS += -I$(CCINCDIR)
FPPFLAGS += -I$(VCINCDIR)/vckeep
FPPFLAGS += $(GEANTINCS)
http://www-zeus.desy.de/~zrec/zsmsm/project_defs.html
Project Definitions
Overview
Each project has several variables (Make macros) defined which allow indirect referencing of the components of the project. The primary reference is to the directory base-path for the project. For example, . . . .
ZeusUtil Paths
Phantom Library location
PHANTOMDIR = $(ZSOFT_ROOT)/zeus/ZeusUtil/phantom/v$(PHVERS)
PHANTOMLIBDIR = $(PHANTOMDIR)/lib$(ZARCH_TYPER)
PHANTOMINCDIR = $(PHANTOMDIR)/inc
PHANTOMLIB = $(PHANTOMLIBDIR)/libphantom.a
# setup phantom includes-paths
-include $(PHANTOMDIR)/cmd/setup_inc_paths.make
PHANTOMINCS
= a big list of -I$(PHANTOMINCDIR)/subdirectories
zrrecon Library location
ZRRECONDIR = $(ZSOFT_ROOT)/zeus/ZeusUtil/zrecon/v$(ZRVERS)
ZRLIBDIR = $(ZRRECONDIR)/lib$(ZARCH_TYPER)
ZRINCDIR = $(ZRRECONDIR)/inc
ZRLIB = $(ZRLIBDIR)/libzrecon.a
o1recon Library location
O1RECONDIR = $(ZSOFT_ROOT)/zeus/ZeusUtil/o1recon/v$(O1VERS)
O1LIBDIR = $(O1RECONDIR)/lib$(ZARCH_TYPER)
O1INCDIR
= $(O1RECONDIR)/incO1LIB = $(O1LIBDIR)/libo1recon.a
CPP:
Inclusion
#include <system_file>
#include "user_file"
#include "Detectors/UCAL/noisecm.inc"
Conditionalization
#if defined(
MACRO_NAME)some stuff
#elif defined(
ANOTHER_MACRO_NAME)different stuff
# if !defined(
NEGATIVE_CONDITION)nested conditional stuff
# endif
#else
default stuff
#endif
#ifdef
CONDITION_1 || CONDITION_2
#ifdef
CONDITION_1 && CONDITION_2
Unix Tools
find, grep, emacs, sed, awk, perl
ZEUS Tools
$ZSYS_ROOT/cmd
search_all: recursively
grep filessearch_all grep_pattern 'filename_pattern' \
[grep_options]
sed_files_R: recursively
sed filessed_files_R 'filepattern' 'sed_script' [options]
rename_files_R: recursively
mv filesrename_files_R 'filepattern' old_suffix new_suffix
do_all: apply a simple command
recursively to files
do_all 'filename_pattern' command
ZSMSM Home Page
_
ZSMSM Home Page
http://www-zeus.desy.de/~zrec/zsmsm_home_page.html
manuals
Release Notes
Troubleshooting hints