source: branches/Mars_MC/mtemp/mwuerzburg/tools/dcconverter/rundcconv@ 17689

Last change on this file since 17689 was 4091, checked in by merck, 21 years ago
Merck: First commit to CVS
  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2# Script to convert DC current files from the old format to the new format
3#
4PS3="Select the Date for which MERPP should run? "
5DATES=`ls -d -1 ./cacodata_old/20* | cut -d/ -f3 '-'`
6select DATE in $DATES "Exit"; do
7 break
8done
9if [ "$DATE" = "Exit" ]
10then
11 exit
12fi
13
14INDIR=./cacodata_old/$DATE
15OUTDIR=./cacodata/$DATE
16if [ -d $OUTDIR ]
17then
18 echo "An output directory for the date $DATE already"
19 echo "exists. Please be sure that you selected the"
20 echo "correct date. If you want to rerun MERPP on this"
21 echo "date please delete the directory and all files it"
22 echo "contains from the rootfiles directory."
23 exit
24fi
25echo $DATE
26mkdir ./cacodata/$DATE
27
28LOGFILE=$OUTDIR/dcconv.log
29CACOFILES=`ls -1 $INDIR/dc_*.txt`
30
31TIME=`date`
32echo "-----------------------------------------------------------------" > $LOGFILE
33echo " dcconvertor run started $TIME" >> $LOGFILE
34echo "-----------------------------------------------------------------" >> $LOGFILE
35
36for i in $CACOFILES
37do
38 IN_FILE=$i
39 OUT_FILE=$OUTDIR/$i
40 dcconvertor $IN_FILE $OUT_FILE
41 echo $IN_FILE >> $LOGFILE
42 echo "Processed file $IN_FILE in $SECONDS secs."
43done
Note: See TracBrowser for help on using the repository browser.