Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-08 02:27:14

0001 #!/bin/bash
0002 
0003 
0004 
0005 # Process arguments and set the flags
0006 fileName=$1
0007 
0008 # Obtain the runList from a file, if needed
0009 runList=""
0010 if [ ${#fileName} -gt 0 ] ; then
0011   if [ -s ${fileName} ] ; then
0012       runList=`cat ${fileName}`
0013   else
0014       echo "<${fileName}> does not seem to be a valid file"
0015       exit 2
0016   fi
0017 else
0018     if [ ${ignoreFile} -eq 0 ] ; then
0019         echo " ! no file provided"
0020     fi
0021     echo " ! will produce only the global html page"
0022 fi
0023 
0024 # create log directory
0025 LOG_DIR="dir-Logs"
0026 if [ ! -d ${LOG_DIR} ] ; then mkdir ${LOG_DIR}; fi
0027 rm -f ${LOG_DIR}/*
0028 
0029 #processing
0030 
0031 for i in ${runList} ; do
0032     runnumber=$i
0033 
0034     logFile="${LOG_DIR}/log_${runnumber}.out"
0035     rm -f ${logFile}
0036 
0037     #GlobalPSM processing
0038     echo -e "\nRemoteMonitoringPSM\n" >> ${logFile}
0039     ./../../macros/psm/RemoteMonitoringPSM.cc.exe GlobalPSM_$runnumber.root 2>&1 | tee -a ${logFile}
0040     if [ ! $? -eq 0 ] ; then
0041         echo "PSM processing failed"
0042         exit 2
0043     fi
0044 
0045     local_WebDir=dir-CMT-GLOBAL_${runnumber}
0046     rm -rf ${local_WebDir}
0047     if [ ! -d ${local_WebDir} ] ; then mkdir ${local_WebDir}; fi
0048     for j in $(ls -r *.html); do
0049         cat $j | sed 's#cms-cpt-software.web.cern.ch\/cms-cpt-software\/General\/Validation\/SVSuite#cms-conddb.cern.ch\/eosweb\/hcal#g' \
0050             > ${local_WebDir}/$j
0051     done
0052     mv *.png ${local_WebDir}
0053     mv *.html ${local_WebDir}
0054 ##    cp HELP.html ${local_WebDir}
0055 #   removing:
0056 #
0057 #
0058 #
0059     rm *.html
0060     rm *.png 
0061 #    rm -rf dir-CMT-GLOBAL_*
0062 #    rm *.root
0063 #
0064 done
0065 
0066 #---------------
0067 
0068 #fi
0069 
0070 
0071 
0072 echo "CMT script done"
0073 #---------------