Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:00

0001 #!/bin/sh
0002 
0003 echo " Folders available in /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/data/OnlineData/original/:"
0004 ls /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/data/OnlineData/original/
0005 
0006 if (( "$#" != "5" ))
0007     then
0008     echo "Input parameters needed: <full path to runs folder (for afs among given above)> <runMin> <runMax> <file field number for awk (13 for afs)> <execute=0 or 1>";
0009     exit;
0010 fi
0011 
0012 #BASEDIR=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/data/OnlineData/original/$1
0013 BASEDIR=$1
0014 #00017xxxx
0015 
0016 RUNMIN=$2
0017 RUNMAX=$3
0018 FILEFIELD=$4
0019 EXECSCRIPT=$5
0020 
0021 ls $BASEDIR/DQM_V0001_SiStrip_* > lsafs.dat
0022 if (( "$?" != "0" ))
0023     then
0024     ls $BASEDIR/*/DQM_V0001_SiStrip_* > lsafs.dat
0025 fi
0026 
0027 awk -v var=$FILEFIELD 'BEGIN { FS = "/" } ; { print $var }' lsafs.dat > lsfiles.dat
0028 rm lsafs.dat
0029 sed 's/DQM_V0001_SiStrip_R000//' lsfiles.dat > lsruns
0030 rm lsfiles.dat
0031 
0032 if (( "$EXECSCRIPT" == "1" )); then
0033     echo "Executing command:"
0034     ./extractErrorsvsTime $BASEDIR/ $RUNMIN $RUNMAX `sed 's/\.root//' lsruns | wc -l` `sed 's/\.root//' lsruns | awk '{ORS=" "}{print $0}'`
0035 else
0036     echo "./extractErrorsvsTime $BASEDIR/ $RUNMIN $RUNMAX " `sed 's/\.root//' lsruns | wc -l` `sed 's/\.root//' lsruns | awk '{ORS=" "}{print $0}'`
0037 # > lsruns.dat
0038 fi
0039 
0040 rm lsruns