Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:00:19

0001 #!/bin/sh
0002 
0003 echo "Quick run and copy script by Freya.Blekman@cern.ch. Usage: \"run_and_to_castor.sh filelist.txt cmssconfigfile.cfg\""
0004 echo "All CMSSW settings need to already have been done"
0005 FILES=$1
0006 CONFIGFILE=$2
0007 #examine input file
0008 
0009 CONFIGFILEINPUTNAME=`grep .dmp $CONFIGFILE | awk -F"file:" '{print $2}' | awk -F"\"" '{print $1}'`
0010 CONFIGFILEOUTPUT=`grep .root $CONFIGFILE | awk -F"\"" '{print $2}'`
0011 #echo "modifying output file "$CONFIGFILEOUTPUT" in "$CONFIGFILE
0012 #echo "modifying input file "$CONFIGFILEINPUTNAME" in "$CONFIGFILE
0013 
0014 
0015 #echo $FILES
0016 for afile in `less $FILES | grep .dmp`
0017 do
0018 #    echo " "
0019     echo "now looking at file: " $afile
0020     pathname=${afile%/*}
0021     filesubname=${afile##*/}
0022     filenamenopostfix=`echo $filesubname | awk -F".dmp" '{print $1}'`
0023     filenamedigi=$pathname"/"$filenamenopostfix"_Digi.root"
0024     filenameraw=$pathname"/"$filenamenopostfix"_Raw.root"
0025     configfilename=$filenamenopostfix"_dmptoraw.cfg"
0026     cp -f $CONFIGFILE $configfilename
0027     replace $CONFIGFILEINPUTNAME $afile $CONFIGFILEOUTPUT $filenamedigi -- $configfilename
0028     echo $filenamedigi" is ready for running, type \"cmsRun "$filenamedigi"\" to start..."
0029 done