How to run full_d0reco and fix_d0reco on SGI and IBM



I.  Set up the D0 environment.

    This is done by typing the following commands:

    % source /usr/local/etc/d0local.cshrc
    % source /usr/local/etc/d0local.login

    The first of the above commands should normally appear in your .cshrc 
    file and the second in your .login file.  In that case the D0 environment 
    will be defined whenever you log in.  This step is necessary to define
    environment variables that allow the FULL_D0RECO executable to find its
    dbl3 files, as well as defining commands and aliases (e.g. libprod) that
    are used later in the setup procedure.

II.  Define the FULL_D0RECO production environment.

    There is always supposed to be a valid production release on d0sgi9.  To 
    set up the environment to use the production release, type the following 
    command.

    % libprod full_d0reco

    The above form of the libprod commands always give you the latest version 
    of FULL_D0RECO, which is V12.13 at the time of posting of this note.  
    Old versions of full_d0reco may still be available.  At the time
    of posting, V11.19 is available in addition to v12.13.  To access
    V11.19, use the following form of the libprod command.

    % libprod -r $prod/full_d0reco_v11 full_d0reco

    As in VMS, these steps modify the environment so that the FULL_D0RECO
    executable will read its RCP and STP files from the production release
    rather than from d0library.

III.  Initialize the FULL_D0RECO program.

    Type the following command in the directory in which you will execute the 
    FULL_D0RECO program.

    % `uff $prodfull_d0reco/full_d0reco.csh`
                          
    You will be prompted for the following information:

    1.  MC, COSMIC, TB or default RCP files?  (Type MC or just hit return for 
        data).
    2.  Input data file.
    3.  STA output directory.
    4.  DST output directory.
    5.  Using SD (Standard D0RECO) or FT (Full Tracking) or SH (SHowerlib)? 
        [SD]: (Enter selection).

    This step defines symbolic links in the current working directory that 
    are the equivalent of VMS logical names.  Symbolic links are defined for 
    the package rcp files, frame menu and rcp files (e.g. d0reco_rcp) and
    five special data file symbolic links:  

    event_data
    dst_output_data
    sta_output_data
    summary_output
    histograms

    The default definition of any symbolic link may be overridden with a 
    command such as the following:

    % ln -sf d0reco.rcp d0reco_rcp

    If you are running fix_d0reco, there is a sixth symbolic link, phi_hists,
    which points to the file that is to receive the "Raja" phi histograms.
    If you do not need these histograms, which will be true for most non-farm
    running, define this symbolic link to point to the null device:

    % ln -sf /dev/null phi_hists

IV.  Run the FULL_D0RECO executable.

    Type the following command:

    % `uff $prodfull_d0reco/full_d0reco.x`

       or

    % $prod/full_d0reco/new/full_d0reco.x

V.  Batch jobs.

    It is possible to put all of the above steps into a single shell script.
    Here is an example: 

    % cat full_d0reco.csh
    #! /bin/csh -f
    nice                                           # Run at batch priority
    source /usr/local/etc/d0local.cshrc            # Define the libprod alias
    libprod -r $prod/full_d0reco_v11 full_d0reco   # Use V11.19 prod. release
    `uff $prodfull_d0reco/full_d0reco.csh` << END  # Set up FULL_D0RECO
    
    /d0sgi0/scratch0/scratch/greenlee/myfile.raw
    /d0sgi0/scratch0/scratch/greenlee
    /d0sgi0/scratch0/scratch/greenlee
    
    END
    `uff $prodfull_d0reco/full_d0reco.x`           # Run FULL_D0RECO
    time                                           # Print time statistics

    To run the above shell script in the background and save the output in a
    file, type the following commands:

    % chmod +x full_d0reco.csh              # Make full_d0reco.csh executable
    % full_d0reco.csh >& full_d0reco.log &  # Run full_d0reco.csh in background

VI.  Disk space.

    The the above examples, large data files are stored in the scratch area,
    /d0sgi0/scratch0/scratch/greenlee (type "Info scratch_disk" for more
    information).  Do not store data files on user disks, although no quota
    prevents this.

VII.  Copying FZ files between VMS and UNIX.

    FZ files may be copied between VMS and UNIX using ZFTP.  To invoke ZFTP on
    d0sft or fnald0, type the following:

    $ zftp :== $d0$cernlib:zftp
    $ zftp <sgi_node>

    To invoke zftp in UNIX, type the following:

    % setup cern
    % zftp <vms_node>

    To pull a native mode file from a remote node, use the following zftp
    commands:

    ZFTP>cd <remote directory>
    ZFTP>lcd <local directory>
    ZFTP>getfz <file>

    To pull an exchange mode file, use the following command in place of getfz:

    ZFTP>getx <file> = 32760

    "Put" versions of these commands (putfz, putx) are also available.  VMS
    filenames should always be specified without directories or version numbers
    when copying to UNIX so that these elements will not appear in the UNIX
    filename. 


Last updated Apr. 9, 1996.
H.G.