Script to make UCNtuples on the CAF

A script for making UCNtuples for any dataset or list of DFC files
exists.  The script resides on our UChicago machines:

   /cdf/data10a/ucntUtils/ntuple

The script is designed to be run from any UChicago machine.  Running
it without any arguments will provide the following syntax:

  Syntax:  ntuple -dataset  -list  [-version < version # (i.e. 4.11.2) >]
           [-tcl < tcl file location>] [-mc] [-queue < queue length (short, medium, long, test) >]
           [-email < email address >] [-output < output location >] [-start < start of range >]
           [-end < end of range >] [-norun]
  The -tcl option overrides the -mc option
  If -norun option is provided, job will not be submitted to CAF but
  submission command will be echoed

Example for ntupling dataset:
For example, to make ucntuples for the MC dataset identifier wtop0t,
one would type (from any starting directory):

  > ~jtsui/bin/ntuple -dataset wtop0t -mc

You will see various debug messages printed to the terminal that
should tell you what the script is attempting to do.  There are a few
stages that take a little time (like tarrring up the UCNtuple binary)
so please have patience.  The output from the previous command would
be (submitted by user levys):

  /cdf/home/levys> ~jtsui/bin/ntuple -dataset wtop0t -mc

  --- making temporary directory /cdf/scratch/levys/ntuple-wtop0t
  --- cd /cdf/scratch/levys/ntuple-wtop0t
  --- link in appopriate binary, etc.
  --- running /cdf/home/jtsui/bin/dumpdataset wtop0t
  --- running AC++ Dump ~jtsui/bin/datasetdump.tcl > wtop0t.lis

         =======================================================

         Error Log established
         13-Nov-2003 09:36:41 CST

         =======================================================

  --- running ~jtsui/bin/fillFileset.sh wtop0t.lis
  --- making tar file ../temp-wtop0t-ntuple.tgz
  --- number of job segments is 100
  --- submitting 1 job(s) (1 additional job for every 100 segments greater than 100)

  CafSubmit --tarFile=temp-wtop0t-ntuple.tgz --outLocation=icaf:wtop0t-\$.tgz 
  --email=levys@fnal.gov --procType=short --start=1 --end=100 ./ucntuple_dcache.sh
  wtop0t.lis \$ 4.11.2 /cdf/home/jtsui/caf_script/multi-mc.tcl

  --- cleanup

Example for ntupling list of DFC files:
You may also provide a file containing a list of DFC files that you
would like to make UCNtuples for.  For example, if you created the
file myFilesToUCNtuple.lis with the following MC DFC files:

  > cat myFilesToUCNtuple.lis
  wt024f8b.0064top0
  wt024f8b.0063top0
  wt024f8b.0062top0

Then you would run the script (from the same dir that contains
myFilesToUCNtuple.lis) as follows:

  > ~jtsui/bin/ntuple -list myFilesToUCNtuple.lis -mc

Please note:  It is highly recommended that you first run the
script using the -norun option.  This will execute all the script
commands but the job will _not_ be submitted to the CAF.  This
allows the user to check that the submitted command corresponds to
what is expected.

The CAF web-page contains additional information about the syntax of the
CafSubmit command that the script uses to launch the jobs and how one
can check the status of their pending jobs.

Please email Jason Tsui or Stephen Levy if you have any problems.
Last modified: Mon Nov 13 09:48:07 CST 2003