Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #!/bin/bash
0002 
0003 # needed to allow the loop on *.png without using "*.png" as value
0004 shopt -s nullglob
0005 date
0006 
0007 if [ $# -ne 5 ]; then
0008     afstokenchecker.sh "You have to provide a <DB>, an <Account>, a <GTAccount>, a <RunInfoAccount> and the <FrontierPath> !!!"
0009     exit
0010 fi
0011 
0012 afstokenchecker.sh "Starting execution of Monitor_RunInfo $1 $2 $3 $4 $5"
0013 
0014 #Example: DB=cms_orcoff_prod
0015 DB=$1
0016 #Example: ACCOUNT=CMS_COND_21X_STRIP
0017 ACCOUNT=$2
0018 #Example: GTACCOUNT=CMS_COND_21X_GLOBALTAG
0019 GTACCOUNT=$3
0020 #Example: RUNINFOACCOUNT=CMS_COND_31X_RUN_INFO
0021 RUNINFOACCOUNT=$4
0022 #Example: FRONTIER=FrontierProd
0023 FRONTIER=$5
0024 DBTAGCOLLECTION=DBTagsIn_${DB}_${ACCOUNT}.txt
0025 GLOBALTAGCOLLECTION=GlobalTagsForDBAccount.txt
0026 DBTAGDIR=DBTagCollection
0027 GLOBALTAGDIR=GlobalTags
0028 STORAGEPATH=/afs/cern.ch/cms/tracker/sistrcalib/WWW/CondDBMonitoring
0029 WORKDIR=$PWD
0030 
0031 #Function to publish png pictures on the web. Will be used at the end of the script:
0032 CreateIndex ()
0033 {
0034     cp /afs/cern.ch/cms/tracker/sistrcalib/WWW/index_new.html .
0035 
0036     COUNTER=0
0037     LASTUPDATE=`date`
0038 
0039     for Plot in *.png; do
0040         if [[ $COUNTER%2 -eq 0 ]]; then
0041             cat >> index_new.html  << EOF
0042 <TR> <TD align=center> <a href="$Plot"><img src="$Plot"hspace=5 vspace=5 border=0 style="width: 90%" ALT="$Plot"></a> 
0043   <br> $Plot </TD>
0044 EOF
0045         else
0046             cat >> index_new.html  << EOF
0047   <TD align=center> <a href="$Plot"><img src="$Plot"hspace=5 vspace=5 border=0 style="width: 90%" ALT="$Plot"></a> 
0048   <br> $Plot </TD> </TR> 
0049 EOF
0050         fi
0051 
0052         let COUNTER++
0053     done
0054 
0055     cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_foot.html | sed -e "s@insertDate@$LASTUPDATE@g" >> index_new.html
0056 
0057     mv -f index_new.html index.html
0058 }
0059 
0060 # Creation of all needed directories if not existing yet
0061 if [ ! -d "$STORAGEPATH/$DB" ]; then 
0062     afstokenchecker.sh "Creating directory $STORAGEPATH/$DB"
0063     mkdir $STORAGEPATH/$DB;
0064 fi
0065 
0066 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT" ]; then 
0067     afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT"
0068     mkdir $STORAGEPATH/$DB/$ACCOUNT; 
0069 fi
0070 
0071 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR" ]; then 
0072     afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR"
0073     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR; 
0074 fi
0075 
0076 # Array of already analyzed tags
0077 
0078 declare -a checkedtags;
0079 
0080 # Access of all Global Tags contained in the given DB account
0081 cmscond_tagtree_list -c frontier://cmsfrontier.cern.ch:8000/$FRONTIER/$GTACCOUNT -P /afs/cern.ch/cms/DB/conddb | grep tree | awk '{print $2}' > $GLOBALTAGCOLLECTION
0082 
0083 # Definition of some Parameters
0084 MONITOR_QUALITY=True
0085 TAGSUBDIR=RunInfo
0086 LOGDESTINATION=Reader
0087 QUALITYLOGDEST=QualityInfo
0088 CREATETRENDS=True
0089 MONITORCUMULATIVE=False
0090 
0091 # Loop on all Global Tags
0092 for globaltag in `cat $GLOBALTAGCOLLECTION`; do
0093 
0094     afstokenchecker.sh "Processing Global Tag $globaltag";
0095 
0096     NEWTAG=False
0097     NEWIOV=False
0098     CFGISSAVED=False
0099 
0100     RUNINFOTAGANDOBJECT=`cmscond_tagtree_list -c frontier://cmsfrontier.cern.ch:8000/$FRONTIER/$GTACCOUNT -P /afs/cern.ch/cms/DB/conddb -T $globaltag | grep runinfo | grep $RUNINFOACCOUNT | awk '{printf "%s %s",$3,$5}'`
0101 
0102     if [ `echo $RUNINFOTAGANDOBJECT | wc -w` -eq 0 ]; then
0103         continue
0104     fi
0105 
0106     CABLINGTAGANDOBJECT=`cmscond_tagtree_list -c frontier://cmsfrontier.cern.ch:8000/$FRONTIER/$GTACCOUNT -P /afs/cern.ch/cms/DB/conddb -T $globaltag | grep SiStripFedCabling | grep $ACCOUNT | awk '{printf "%s %s",$3,$5}'`
0107 
0108     if [ `echo $CABLINGTAGANDOBJECT | wc -w` -eq 0 ]; then
0109         continue
0110     fi
0111 
0112     RUNINFOTAG=`echo $RUNINFOTAGANDOBJECT | awk '{print $1}' | sed -e "s@tag:@@g"`
0113     RUNINFOOBJECT=`echo $RUNINFOTAGANDOBJECT | awk '{print $2}' | sed -e "s@object:@@g"`
0114 
0115     CABLINGTAG=`echo $CABLINGTAGANDOBJECT | awk '{print $1}' | sed -e "s@tag:@@g"`
0116     CABLINGOBJECT=`echo $CABLINGTAGANDOBJECT | awk '{print $2}' | sed -e "s@object:@@g"`
0117 
0118     tag=${RUNINFOTAG}_${CABLINGTAG}
0119     # check if $tag contains blank and if so, issue a warning
0120     if [ `expr index "$tag" " "` -ne 0 ]; then
0121         afstokenchecker.sh "WARNING!! $tag has blank spaces"
0122     fi
0123 
0124     # Creation of DB-Tag directory if not existing yet
0125     if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR" ]; then 
0126         afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR"
0127         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR; 
0128     fi
0129 
0130     if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag" ]; then 
0131         afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag"
0132         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag;
0133 
0134         NEWTAG=True
0135     fi
0136 
0137     if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/RelatedGlobalTags" ]; then 
0138         afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/RelatedGlobalTags"
0139         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/RelatedGlobalTags;
0140     fi
0141 
0142     # Creation of Global Tag directory if not existing yet
0143     if [ ! -d "$STORAGEPATH/$DB/$GLOBALTAGDIR" ]; then 
0144         afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$GLOBALTAGDIR"
0145         mkdir $STORAGEPATH/$DB/$GLOBALTAGDIR;
0146     fi
0147 
0148     if [ ! -d "$STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag" ]; then 
0149         afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag"
0150         mkdir $STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag;
0151     fi
0152 
0153     if [ ! -d "$STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag/RunInfo" ]; then 
0154         afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag/RunInfo"
0155         mkdir $STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag/RunInfo;
0156     fi
0157 
0158     # Creation of links between the DB-Tag and the respective Global Tags
0159     if [ ! -f $STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag/RunInfo/$tag ] || [ ! -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/RelatedGlobalTags/$globaltag ]; then
0160         cd $STORAGEPATH/$DB/$GLOBALTAGDIR/$globaltag/RunInfo;
0161         rm -f $tag;
0162         cat >> $tag << EOF
0163 <html>
0164 <body>
0165 <a href="https://test-stripdbmonitor.web.cern.ch/test-stripdbmonitor/CondDBMonitoring/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag">https://test-stripdbmonitor.web.cern.ch/test-stripdbmonitor/CondDBMonitoring/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag</a>
0166 </body>
0167 </html>
0168 EOF
0169 
0170         cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/RelatedGlobalTags;
0171         rm -f $globaltag;
0172         cat >> $globaltag << EOF
0173 <html>
0174 <body>
0175 <a href="https://test-stripdbmonitor.web.cern.ch/test-stripdbmonitor/CondDBMonitoring/$DB/$GLOBALTAGDIR/$globaltag">https://test-stripdbmonitor.web.cern.ch/test-stripdbmonitor/CondDBMonitoring/$DB/$GLOBALTAGDIR/$globaltag</a>
0176 </body>
0177 </html>
0178 EOF
0179 
0180     cd $WORKDIR;
0181 
0182 # check if the tag has been analyzed already
0183 
0184     ALREADYCHECKED=0;
0185 
0186     for checkedtag in ${checkedtags[*]}; do
0187         if [ $checkedtag == $tag ]; then
0188             ALREADYCHECKED=1
0189         fi
0190     done
0191 
0192     if [ $ALREADYCHECKED -eq 1 ]; then
0193         date "+[%c] Tags $tag already checked: skip"
0194         continue
0195     fi
0196 
0197     checkedtags[${#checkedtags[*]}]=$tag;
0198 
0199     # Get the list of IoVs for the given DB-Tag
0200     iov_list_tag.py -c frontier://cmsfrontier.cern.ch:8000/$FRONTIER/$RUNINFOACCOUNT -P /afs/cern.ch/cms/DB/conddb -t $RUNINFOTAG  > list_Iov.txt # Access via Frontier
0201 
0202     # Access DB for the given DB-Tag and dump histograms in .png if not existing yet
0203     afstokenchecker.sh "Now the values are retrieved from the DB..."
0204     
0205     if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles" ]; then
0206         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles;
0207         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/cfg;
0208         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots;
0209         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB;
0210         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB;
0211         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID;
0212         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC;
0213 
0214         for i in {1..4}; do
0215             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i;
0216 
0217             if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0218                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Profile;
0219             fi
0220             if [ "$MONITORCUMULATIVE" = "True" ]; then
0221                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Cumulative;
0222             fi
0223             if [ "$CREATETRENDS" = "True" ]; then
0224                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Trends;
0225             fi
0226         done
0227 
0228         for i in {1..6}; do
0229             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i;
0230 
0231             if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0232                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Profile;
0233             fi
0234             if [ "$MONITORCUMULATIVE" = "True" ]; then
0235                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Cumulative;
0236             fi
0237             if [ "$CREATETRENDS" = "True" ]; then
0238                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Trends;
0239             fi
0240         done
0241 
0242         for i in {1..2}; do
0243             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i;
0244             for j in {1..3}; do
0245                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j;
0246 
0247                 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0248                     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Profile;
0249                 fi
0250                 if [ "$MONITORCUMULATIVE" = "True" ]; then
0251                     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Cumulative;
0252                 fi
0253                 if [ "$CREATETRENDS" = "True" ]; then
0254                     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Trends;
0255                 fi
0256             done
0257         done
0258 
0259         for i in {1..2}; do
0260             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i;
0261             for j in {1..9}; do
0262                 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j;
0263 
0264                 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0265                     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Profile;
0266                 fi
0267                 if [ "$MONITORCUMULATIVE" = "True" ]; then
0268                     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Cumulative;
0269                 fi
0270                 if [ "$CREATETRENDS" = "True" ]; then
0271                     mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Trends;
0272                 fi
0273             done
0274         done
0275 
0276         if [ "$MONITOR_QUALITY" = "True" ] || [ "$MONITOR_CABLING" = "True" ]; then
0277             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Trends
0278             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Trends;
0279             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Trends;
0280             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side1/Trends;
0281             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side2/Trends;
0282             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side1/Trends;
0283             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side2/Trends;
0284             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary
0285         fi
0286 
0287 
0288         mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap;
0289 
0290         if [ "$MONITOR_QUALITY" = "True" ]; then
0291             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadAPVs
0292             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadFibers
0293             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadModules
0294             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadStrips
0295             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/QualityLog
0296         fi
0297 
0298         if [ "$MONITOR_CABLING" = "True" ]; then
0299             mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/CablingLog
0300         fi
0301 
0302     fi
0303 
0304     if [ `echo *.png | wc -w` -gt 0 ]; then
0305         rm *.png;
0306     fi
0307 
0308     # Produce only the cfg. The whole Monitoring of all IOVs is too much!!!
0309     if [ "$NEWTAG" = "True" ]; then # Skip Tags already processed. Take only new ones.
0310         afstokenchecker.sh "New Tag $tag found. Being processed..."
0311         CMSRUNCOMMAND="cmsRun ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/test/RunInfo_conddbmonitoring_cfg.py print logDestination=$LOGDESTINATION qualityLogDestination=$QUALITYLOGDEST runInfoTag=$RUNINFOTAG cablingTag=$CABLINGTAG cablingConnectionString=frontier://$FRONTIER/$ACCOUNT runinfoConnectionString=frontier://$FRONTIER/$RUNINFOACCOUNT MonitorCumulative=$MONITORCUMULATIVE"  
0312 #outputRootFile=$ROOTFILE 
0313 #runNumber=$IOV_number
0314 
0315         cp ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/test/RunInfo_conddbmonitoring_cfg.py RunInfo_cfg.py 
0316         cat >> RunInfo_cfg.py <<EOF
0317 #
0318 # $CMSRUNCOMMAND
0319 #
0320 EOF
0321         mv RunInfo_cfg.py $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/cfg/${tag}_cfg.py
0322         continue
0323     else
0324         continue
0325     fi
0326 
0327 #    # Process each IOV of the given DB-Tag seperately
0328 #    for IOV_number in `cat list_Iov.txt`; do
0329 #
0330 #       if [ "$IOV_number" = "Total" ] || [ $IOV_number -gt 100000000 ]; then
0331 #           continue
0332 #       fi
0333 #
0334 #       ROOTFILE="${tag}_Run_${IOV_number}.root"
0335 #
0336 #       if [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles/$ROOTFILE ]; then # Skip IOVs already processed. Take only new ones.
0337 #           continue
0338 #       fi
0339 #
0340 #       afstokenchecker.sh "New IOV $IOV_number found. Being processed..."
0341 #
0342 #       NEWIOV=True
0343 #
0344 #       cat template_DBReaderRunInfo_cfg.py | sed -e "s@insertRun@$IOV_number@g" -e "s@insertLog@$LOGDESTINATION@g" -e "s@insertDB@$DB@g" -e "s@insertFrontier@$FRONTIER@g" -e "s@insertInfoAccount@$RUNINFOACCOUNT@g" -e "s@insertCablingAccount@$ACCOUNT@g" -e "s@insertInfoTag@$RUNINFOTAG@g" -e "s@insertCablingTag@$CABLINGTAG@g" -e "s@insertOutFile@$ROOTFILE@g" -e "s@insertMonitorCumulative@$MONITORCUMULATIVE@g"> DBReader_cfg.py
0345 #
0346 #       afstokenchecker.sh "Executing cmsRun. Stay tuned ..."
0347 #
0348 #       cmsRun DBReader_cfg.py
0349 #
0350 #       afstokenchecker.sh "cmsRun finished. Now moving the files to the corresponding directories ..."
0351 #
0352 #       if [ "$NEWTAG" = "True" ] && [ "$CFGISSAVED" = "False" ]; then
0353 #           cp DBReader_cfg.py $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/cfg/${tag}_cfg.py
0354 #           CFGISSAVED=True
0355 #       fi
0356 #
0357 #       mv $ROOTFILE $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles;
0358 #
0359 #       if [ "$MONITOR_QUALITY" = "True" ]; then
0360 #           cat $LOGDESTINATION.log | awk 'BEGIN{doprint=0}{if(match($0,"New IOV")!=0) doprint=1;if(match($0,"%MSG")!=0) {doprint=0;} if(doprint==1) print $0}' > QualityInfo_Run${IOV_number}.txt
0361 #           mv QualityInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/QualityLog/
0362 #
0363 #           rm $LOGDESTINATION.log
0364 #       fi
0365 #
0366 #       if [ "$MONITOR_CABLING" = "True" ]; then
0367 #           if [ "$ACCOUNT" != "CMS_COND_21X_STRIP" ]; then
0368 #               cat $LOGDESTINATION.log | awk 'BEGIN{doprint=0}{if(match($0,"beginRun")!=0) doprint=1;if(match($0,"%MSG")!=0) {doprint=0;} if(doprint==1) print $0}' > CablingInfo_Run${IOV_number}.txt
0369 #               mv CablingInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/CablingLog/
0370 #           fi
0371 #
0372 #           cat $LOGDESTINATION.log | awk 'BEGIN{doprint=0}{if(match($0,"New IOV")!=0) doprint=1;if(match($0,"%MSG")!=0) {doprint=0;} if(doprint==1) print $0}' > QualityInfoFromCabling_Run${IOV_number}.txt
0373 #           mv QualityInfoFromCabling_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/CablingLog/
0374 #
0375 #           rm $LOGDESTINATION.log
0376 #       fi
0377 #
0378 #       for Plot in `ls *.png | grep TIB`; do
0379 #           PNGNAME=`echo ${Plot#*_*_*_*_*_} | gawk -F . '{print $1}'`
0380 #           LAYER=`echo ${PNGNAME#*_*_} | gawk -F _ '{print $1}'`
0381 #           if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0382 #               if [ `echo $Plot | grep Cumulative` ]; then
0383 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$LAYER/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0384 #               else
0385 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$LAYER/Profile/${PNGNAME}__Run${IOV_number}.png;
0386 #               fi
0387 #           else
0388 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$LAYER/${PNGNAME}__Run${IOV_number}.png;
0389 #           fi
0390 #       done;
0391 #
0392 #       for Plot in `ls *.png | grep TOB`; do
0393 #           PNGNAME=`echo ${Plot#*_*_*_*_*_} | gawk -F . '{print $1}'`
0394 #           LAYER=`echo ${PNGNAME#*_*_} | gawk -F _ '{print $1}'`
0395 #           if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0396 #               if [ `echo $Plot | grep Cumulative` ]; then
0397 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$LAYER/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0398 #               else
0399 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$LAYER/Profile/${PNGNAME}__Run${IOV_number}.png;
0400 #               fi
0401 #           else
0402 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$LAYER/${PNGNAME}__Run${IOV_number}.png;
0403 #           fi
0404 #       done;
0405 #
0406 #       for Plot in `ls *.png | grep TID`; do
0407 #           PNGNAME=`echo ${Plot#*_*_*_*_*_} | gawk -F . '{print $1}'`
0408 #           SIDE=`echo ${PNGNAME#*_*_} | gawk -F _ '{print $1}'`
0409 #           DISK=`echo ${PNGNAME#*_*_*_*_*_*_} | gawk -F _ '{print $1}'`
0410 #           if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0411 #               if [ `echo $Plot | grep Cumulative` ]; then
0412 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$SIDE/Disk$DISK/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0413 #               else
0414 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$SIDE/Disk$DISK/Profile/${PNGNAME}__Run${IOV_number}.png;
0415 #               fi
0416 #           else
0417 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$SIDE/Disk$DISK/${PNGNAME}__Run${IOV_number}.png;
0418 #           fi
0419 #       done;
0420 #
0421 #       for Plot in `ls *.png | grep TEC`; do
0422 #           PNGNAME=`echo ${Plot#*_*_*_*_*_} | gawk -F . '{print $1}'`
0423 #           SIDE=`echo ${PNGNAME#*_*_} | gawk -F _ '{print $1}'`
0424 #           DISK=`echo ${PNGNAME#*_*_*_*_*_*_} | gawk -F _ '{print $1}'`
0425 #           if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0426 #               if [ `echo $Plot | grep Cumulative` ]; then
0427 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$SIDE/Disk$DISK/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0428 #               else
0429 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$SIDE/Disk$DISK/Profile/${PNGNAME}__Run${IOV_number}.png;
0430 #               fi
0431 #           else
0432 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$SIDE/Disk$DISK/${PNGNAME}__Run${IOV_number}.png;
0433 #           fi
0434 #       done;
0435 #
0436 #       for Plot in `ls *.png | grep TkMap`; do
0437 #           #PNGNAME=`echo $Plot | gawk -F . '{print $1}'`
0438 #           mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap/$Plot;
0439 #       done;
0440 #
0441 #       for Plot in `ls *.png | grep Bad`; do
0442 #           PNGNAME=`echo ${Plot#*_} | gawk -F . '{print $1}'`
0443 #           if      [ `echo $PNGNAME | grep Apvs` ]; then
0444 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadAPVs/${PNGNAME}__Run${IOV_number}.png;
0445 #           else if [ `echo $PNGNAME | grep Fibers` ]; then
0446 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadFibers/${PNGNAME}__Run${IOV_number}.png;
0447 #           else if [ `echo $PNGNAME | grep Modules` ]; then
0448 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadModules/${PNGNAME}__Run${IOV_number}.png;
0449 #           else if [ `echo $PNGNAME | grep Strips` ]; then
0450 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadStrips/${PNGNAME}__Run${IOV_number}.png;
0451 #           fi
0452 #           fi
0453 #           fi
0454 #           fi
0455 #       done;
0456 #
0457 #       for Plot in `ls *.png | grep Cabling`; do
0458 #           PNGNAME=`echo ${Plot#*_} | gawk -F . '{print $1}'`
0459 #           mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/${PNGNAME}__Run${IOV_number}.png;
0460 #       done;
0461 #
0462 #       #cd $WORKDIR;
0463 #
0464 #    done;
0465 
0466 #    # Run the Trends and Publish all histograms on a web page
0467 #    if [ "$NEWTAG" = "True" ] || [ "$NEWIOV" = "True" ]; then
0468 #
0469 #       if [ "$CREATETRENDS" = "True" ]; then
0470 #           afstokenchecker.sh "Creating the Trend Plots ..."
0471 #
0472 #           ./getOfflineDQMData.sh $DB $ACCOUNT $TAGSUBDIR $tag
0473 #           getOfflineDQMData.sh $DB $ACCOUNT $TAGSUBDIR $tag
0474 #
0475 #           for i in {1..4}; do
0476 #               for Plot in `ls *.png | grep TIBLayer$i`; do
0477 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Trends;
0478 #               done
0479 #           done
0480 #
0481 #           for i in {1..6}; do
0482 #               for Plot in `ls *.png | grep TOBLayer$i`; do
0483 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Trends;
0484 #               done
0485 #           done
0486 #
0487 #           for i in {1..3}; do
0488 #               for Plot in `ls *.png | grep TID-Disk$i`; do
0489 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side1/Disk$i/Trends;
0490 #               done
0491 #               for Plot in `ls *.png | grep TID+Disk$i`; do
0492 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side2/Disk$i/Trends;
0493 #               done
0494 #           done
0495 #
0496 #           for i in {1..9}; do
0497 #               for Plot in `ls *.png | grep TEC-Disk$i`; do
0498 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side1/Disk$i/Trends;
0499 #               done
0500 #               for Plot in `ls *.png | grep TEC+Disk$i`; do
0501 #                   mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side2/Disk$i/Trends;
0502 #               done
0503 #           done
0504 #           
0505 #           for Plot in `ls *.png | grep TIB`; do
0506 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Trends;
0507 #           done
0508 #
0509 #           for Plot in `ls *.png | grep TOB`; do
0510 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Trends;
0511 #           done
0512 #
0513 #           for Plot in `ls *.png | grep TID-`; do
0514 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side1/Trends;
0515 #           done
0516 #
0517 #           for Plot in `ls *.png | grep TID+`; do
0518 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side2/Trends;
0519 #           done
0520 #
0521 #           for Plot in `ls *.png | grep TEC-`; do
0522 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side1/Trends;
0523 #           done
0524 #
0525 #           for Plot in `ls *.png | grep TEC+`; do
0526 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side2/Trends;
0527 #           done
0528 #
0529 #           for Plot in `ls *.png | grep Tracker`; do
0530 #               mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Trends;
0531 #           done
0532 #       fi
0533 #
0534 #       mv TrackerSummary.root $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles;
0535 #       rm -f TrackerPlots.root;
0536 #       rm -f makePlots_cc.d makePlots_cc.so;
0537 #       rm -f makeTKTrend_cc.d makeTKTrend_cc.so;
0538 #
0539 #       afstokenchecker.sh "Publishing the new tag $tag (or the new IOV) on the web ..."
0540 #
0541 #       for i in {1..4}; do
0542 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0543 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TIB Layer $i --- Summary Report@g" > index_new.html
0544 #           if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0545 #               cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Profile;
0546 #               CreateIndex
0547 #
0548 #               if [ "$MONITORCUMULATIVE" = "True" ]; then
0549 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Cumulative;
0550 #                   CreateIndex
0551 #               fi
0552 #
0553 #               if [ "$CREATETRENDS" = "True" ]; then
0554 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Trends;
0555 #                   CreateIndex
0556 #               fi
0557 #           else
0558 #               cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i;
0559 #               CreateIndex
0560 #           fi
0561 #       done
0562 #
0563 #       for i in {1..6}; do
0564 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0565 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TOB Layer $i --- Summary Report@g" > index_new.html
0566 #           if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0567 #               cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Profile;
0568 #               CreateIndex
0569 #
0570 #               if [ "$MONITORCUMULATIVE" = "True" ]; then
0571 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Cumulative;
0572 #                   CreateIndex
0573 #               fi
0574 #
0575 #               if [ "$CREATETRENDS" = "True" ]; then
0576 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Trends;
0577 #                   CreateIndex
0578 #               fi
0579 #           else
0580 #               cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i;
0581 #               CreateIndex
0582 #           fi
0583 #       done
0584 #
0585 #       for i in {1..2}; do
0586 #           for j in {1..3}; do
0587 #               cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0588 #               cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TID Side $i Disk $j --- Summary Report@g" > index_new.html
0589 #               if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0590 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Profile;
0591 #                   CreateIndex
0592 #
0593 #                   if [ "$MONITORCUMULATIVE" = "True" ]; then
0594 #                       cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Cumulative;
0595 #                       CreateIndex
0596 #                   fi
0597 #
0598 #                   if [ "$CREATETRENDS" = "True" ]; then
0599 #                       cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Trends;
0600 #                       CreateIndex
0601 #                   fi
0602 #               else
0603 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j;
0604 #                   CreateIndex
0605 #               fi
0606 #           done
0607 #       done
0608 #
0609 #       for i in {1..2}; do
0610 #           for j in {1..9}; do
0611 #               cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0612 #               cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TEC Side $i Disk $j --- Summary Report@g" > index_new.html
0613 #               if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0614 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Profile;
0615 #                   CreateIndex
0616 #
0617 #                   if [ "$MONITORCUMULATIVE" = "True" ]; then
0618 #                       cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Cumulative;
0619 #                       CreateIndex
0620 #                   fi
0621 #
0622 #                   if [ "$CREATETRENDS" = "True" ]; then
0623 #                       cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Trends;
0624 #                       CreateIndex
0625 #                   fi
0626 #               else
0627 #                   cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j;
0628 #                   CreateIndex
0629 #               fi
0630 #           done
0631 #       done
0632 #
0633 #       if [ "$CREATETRENDS" = "True" ]; then
0634 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0635 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Full Strip Tracker --- Trend Plots@g" > index_new.html
0636 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Trends;
0637 #           CreateIndex
0638 #
0639 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0640 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TIB --- Trend Plots@g" > index_new.html
0641 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Trends;
0642 #           CreateIndex
0643 #
0644 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0645 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TOB --- Trend Plots@g" > index_new.html
0646 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Trends;
0647 #           CreateIndex
0648 #
0649 #           for i in {1..2}; do
0650 #               cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0651 #               cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TID Side $i --- Trend Plots@g" > index_new.html
0652 #               cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Trends;
0653 #               CreateIndex
0654 #
0655 #               cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0656 #               cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- TEC Side $i --- Trend Plots@g" > index_new.html
0657 #               cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Trends;
0658 #               CreateIndex
0659 #           done
0660 #       fi
0661 #
0662 #       if [ "$MONITOR_QUALITY" = "True" ]; then
0663 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0664 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Bad APVs --- Summary Report@g" > index_new.html
0665 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadAPVs;
0666 #           CreateIndex
0667 #
0668 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0669 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Bad Fibers --- Summary Report@g" > index_new.html
0670 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadFibers;
0671 #           CreateIndex
0672 #           
0673 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0674 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Bad Modules --- Summary Report@g" > index_new.html
0675 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadModules;
0676 #           CreateIndex
0677 #
0678 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0679 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Bad Strips --- Summary Report@g" > index_new.html
0680 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadStrips;
0681 #           CreateIndex
0682 #               
0683 #       fi
0684 #    
0685 #       if [ "$MONITOR_CABLING" = "True" ]; then
0686 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0687 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Summary Report@g" > index_new.html
0688 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/;
0689 #           CreateIndex
0690 #               
0691 #       fi
0692 #
0693 #       if [ -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap" ]; then
0694 #           cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0695 #           cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html  | sed -e "s@insertPageName@$tag --- Tracker Maps for all IOVs ---@g" > index_new.html
0696 #           cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap;
0697 #           CreateIndex
0698 #
0699 #       fi
0700 #
0701 #    fi
0702 #
0703 #    cd $WORKDIR;
0704 
0705 done;