#! /bin/csh -f ################################################################################ # swg_build_list # # ---------------------------------------------------------------------------- # # Author : Jurgen Knodlseder CESR (C) (all rights reserved) # # Version : 2.3.0 # # Date of version : 23-Oct-2003 # # ---------------------------------------------------------------------------- # # History : # # 1.0.0 ??-???-???? First version # # 2.0.0 6-Mar-2003 Implement versioning # # 2.1.0 19-Sep-2003 Test on presence of science HK # # 2.2.0 17-Oct-2003 Exclude failed science windows (last digit = 2) # # 2.3.0 23-Oct-2003 Test correct ScW for presence of SCHK files # # ---------------------------------------------------------------------------- # ################################################################################ # # Check existence of arguments #============================= if ( $#argv != 2 ) then echo "Usage: swg_build_list " exit endif set curr = $PWD cd $REP_BASE_PROD foreach file ( scw/$argv[1]/*/swg_prp.fits* ) set failed = `echo $file | awk '{print substr($0,10,6)}'` set type = `echo $file | awk '{print substr($0,21,1)}'` if ( $failed != failed && $type != 2 ) then set rev = `echo $file | awk '{print substr($0,5,4)}'` set scw = `echo $file | awk '{print substr($0,10,12)}'` set ver = `echo $file | awk '{print substr($0,23,3)}'` if ( $?lastscw == 0 ) then set lastfile = $file set lastscw = $scw endif if ( $scw != $lastscw ) then set tfile1 = scw/$1/$lastscw.$ver/spi/raw/spi_raw_schk.fits set tfile2 = scw/$1/$lastscw.$ver/spi/raw/spi_raw_schk.fits.gz if ( -e $tfile1 || -e $tfile2 ) then echo $lastfile"[1]" >> $curr/$argv[2] endif endif set lastfile = $file set lastscw = $scw endif end set tfile1 = scw/$1/$lastscw.$ver/spi/raw/spi_raw_schk.fits set tfile2 = scw/$1/$lastscw.$ver/spi/raw/spi_raw_schk.fits.gz if ( -e $tfile1 || -e $tfile2 ) then echo $lastfile"[1]" >> $curr/$argv[2] endif