Last change
on this file since 19779 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 | #
|
---|
4 | PS3="Select the Date for which MERPP should run? "
|
---|
5 | DATES=`ls -d -1 ./cacodata_old/20* | cut -d/ -f3 '-'`
|
---|
6 | select DATE in $DATES "Exit"; do
|
---|
7 | break
|
---|
8 | done
|
---|
9 | if [ "$DATE" = "Exit" ]
|
---|
10 | then
|
---|
11 | exit
|
---|
12 | fi
|
---|
13 |
|
---|
14 | INDIR=./cacodata_old/$DATE
|
---|
15 | OUTDIR=./cacodata/$DATE
|
---|
16 | if [ -d $OUTDIR ]
|
---|
17 | then
|
---|
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
|
---|
24 | fi
|
---|
25 | echo $DATE
|
---|
26 | mkdir ./cacodata/$DATE
|
---|
27 |
|
---|
28 | LOGFILE=$OUTDIR/dcconv.log
|
---|
29 | CACOFILES=`ls -1 $INDIR/dc_*.txt`
|
---|
30 |
|
---|
31 | TIME=`date`
|
---|
32 | echo "-----------------------------------------------------------------" > $LOGFILE
|
---|
33 | echo " dcconvertor run started $TIME" >> $LOGFILE
|
---|
34 | echo "-----------------------------------------------------------------" >> $LOGFILE
|
---|
35 |
|
---|
36 | for i in $CACOFILES
|
---|
37 | do
|
---|
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."
|
---|
43 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.