File indexing completed on 2023-03-17 10:57:00
0001
0002
0003
0004 shopt -s nullglob
0005 date
0006
0007 if [ $
0008 afstokenchecker.sh "You have to provide a <tag_search_string>, a <DB> and a DB name for the connection string!!!"
0009 exit
0010 fi
0011
0012 afstokenchecker.sh "Starting execution of MonitorDB_NewDirStructure_KeepTagLinks_generic_V2 $1 $2 $3"
0013
0014
0015 SEARCHSTRING=$1
0016
0017 DB=$2
0018 ACCOUNT=CMS_CONDITIONS
0019 FRONTIER=$3
0020 DBTAGCOLLECTION=DBTagsIn_${DB}.txt
0021 GLOBALTAGCOLLECTION=GlobalTagsForDBTag.txt
0022 DBTAGDIR=DBTagCollection
0023 GLOBALTAGDIR=GlobalTags
0024 STORAGEPATH=/afs/cern.ch/cms/tracker/sistrcalib/WWW/CondDBMonitoring
0025 WORKDIR=$PWD
0026
0027
0028 CreateIndex ()
0029 {
0030 cp /afs/cern.ch/cms/tracker/sistrcalib/WWW/index_new.html .
0031
0032 COUNTER=0
0033 LASTUPDATE=`date`
0034
0035 for Plot in *.png; do
0036 if [[ $COUNTER%2 -eq 0 ]]; then
0037 cat >> index_new.html << EOF
0038 <TR> <TD align=center> <a href="$Plot"><img src="$Plot"hspace=5 vspace=5 border=0 style="width: 90%" ALT="$Plot"></a>
0039 <br> $Plot </TD>
0040 EOF
0041 else
0042 cat >> index_new.html << EOF
0043 <TD align=center> <a href="$Plot"><img src="$Plot"hspace=5 vspace=5 border=0 style="width: 90%" ALT="$Plot"></a>
0044 <br> $Plot </TD> </TR>
0045 EOF
0046 fi
0047
0048 let COUNTER++
0049 done
0050
0051 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_foot.html | sed -e "s@insertDate@$LASTUPDATE@g" >> index_new.html
0052
0053 mv -f index_new.html index.html
0054 }
0055
0056
0057 if [ ! -d "$STORAGEPATH/$DB" ]; then
0058 afstokenchecker.sh "Creating directory $STORAGEPATH/$DB"
0059 mkdir $STORAGEPATH/$DB;
0060 fi
0061
0062 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT" ]; then
0063 afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR"
0064 mkdir $STORAGEPATH/$DB/$ACCOUNT;
0065 fi
0066
0067 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR" ]; then
0068 afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR"
0069 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR;
0070 fi
0071
0072
0073 if [ ! -d "$STORAGEPATH/$DB/$GLOBALTAGDIR" ]; then
0074 afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$GLOBALTAGDIR"
0075 mkdir $STORAGEPATH/$DB/$GLOBALTAGDIR;
0076 fi
0077
0078
0079 conddb --db $DB --nocolors listTags | grep --regexp=^$SEARCHSTRING | awk '{if(match($1,"V0")!=0 || match($1,"/")!=0) {} else {print $1}}' > $DBTAGCOLLECTION
0080
0081
0082 for tag in `cat $DBTAGCOLLECTION`; do
0083
0084 afstokenchecker.sh "Processing DB-Tag $tag";
0085
0086 NEWTAG=False
0087 NEWIOV=False
0088 CFGISSAVED=False
0089
0090
0091 MONITOR_NOISE=False
0092 MONITOR_PEDESTAL=False
0093 MONITOR_GAIN=False
0094 MONITOR_QUALITY=False
0095 MONITOR_CABLING=False
0096 MONITOR_LA=False
0097 MONITOR_BP=False
0098 MONITOR_THRESHOLD=False
0099 MONITOR_LATENCY=False
0100 MONITOR_SHIFTANDCROSSTALK=False
0101 MONITOR_APVPHASEOFFSETS=False
0102 MONITOR_ALCARECOTRIGGERBITS=False
0103
0104 LOGDESTINATION=cout
0105 QUALITYLOGDEST=QualityInfo
0106 CABLINGLOGDEST=CablingInfo
0107 CONDLOGDEST=Dummy
0108
0109 RECORDFORQUALITY=Dummy
0110
0111 MONITORCUMULATIVE=False
0112 USEACTIVEDETID=False
0113 CREATETRENDS=False
0114
0115 if [ `echo $tag | grep "Noise" | wc -w` -gt 0 ]; then
0116 MONITOR_NOISE=True
0117 USEACTIVEDETID=True
0118 RECORD=SiStripNoisesRcd
0119 TAGSUBDIR=SiStripNoise
0120 MONITORCUMULATIVE=True
0121 else if [ `echo $tag | grep "Pedestal" | wc -w` -gt 0 ]; then
0122 MONITOR_PEDESTAL=True
0123 USEACTIVEDETID=True
0124 RECORD=SiStripPedestalsRcd
0125 TAGSUBDIR=SiStripPedestal
0126 else if [ `echo $tag | grep "Gain" | wc -w` -gt 0 ]; then
0127 MONITOR_GAIN=True
0128 USEACTIVEDETID=True
0129 RECORD=SiStripApvGainRcd
0130 TAGSUBDIR=SiStripApvGain
0131 else if [ `echo $tag | grep "Bad" | wc -w` -gt 0 ]; then
0132 MONITOR_QUALITY=True
0133 USEACTIVEDETID=True
0134 RECORD=SiStripBadChannelRcd
0135 TAGSUBDIR=SiStripBadChannel
0136 LOGDESTINATION=Reader
0137 QUALITYLOGDEST=QualityInfo
0138 CREATETRENDS=True
0139 else if [ `echo $tag | grep "Cabling" | wc -w` -gt 0 ]; then
0140 MONITOR_CABLING=True
0141 USEACTIVEDETID=True
0142 RECORD=SiStripFedCablingRcd
0143 RECORDFORQUALITY=SiStripDetCablingRcd
0144 TAGSUBDIR=SiStripFedCabling
0145 LOGDESTINATION=Reader
0146 QUALITYLOGDEST=QualityInfoFromCabling
0147 CABLINGLOGDEST=CablingInfo
0148 CREATETRENDS=True
0149 else if [ `echo $tag | grep "Lorentz" | wc -w` -gt 0 ]; then
0150 MONITOR_LA=True
0151 USEACTIVEDETID=False
0152 RECORD=SiStripLorentzAngleRcd
0153 TAGSUBDIR=SiStripLorentzAngle
0154 else if [ `echo $tag | grep "BackPlane" | wc -w` -gt 0 ]; then
0155 MONITOR_BP=True
0156 USEACTIVEDETID=False
0157 RECORD=SiStripBackPlaneCorrectionRcd
0158 TAGSUBDIR=SiStripBackPlaneCorrection
0159 else if [ `echo $tag | grep "Threshold" | wc -w` -gt 0 ]; then
0160 MONITOR_THRESHOLD=True
0161 USEACTIVEDETID=True
0162 RECORD=SiStripThresholdRcd
0163 TAGSUBDIR=SiStripThreshold
0164 else if [ `echo $tag | grep "VOff" | wc -w` -gt 0 ]; then
0165 MONITOR_QUALITY=True
0166 USEACTIVEDETID=True
0167 RECORD=SiStripDetVOffRcd
0168 TAGSUBDIR=SiStripVoltage
0169 LOGDESTINATION=Reader
0170 CREATETRENDS=True
0171 else if [ `echo $tag | grep "Latency" | wc -w` -gt 0 ]; then
0172 MONITOR_LATENCY=True
0173 RECORD=SiStripLatencyRcd
0174 TAGSUBDIR=SiStripLatency
0175 LOGDESTINATION=Reader
0176 CONDLOGDEST=LatencyInfo
0177 else if [ `echo $tag | grep "Shift" | wc -w` -gt 0 ]; then
0178 MONITOR_SHIFTANDCROSSTALK=True
0179 RECORD=SiStripConfObjectRcd
0180 TAGSUBDIR=SiStripShiftAndCrosstalk
0181 LOGDESTINATION=Reader
0182 CONDLOGDEST=ShiftAndCrosstalkInfo
0183 else if [ `echo $tag | grep "APVPhaseOffsets" | wc -w` -gt 0 ]; then
0184 MONITOR_APVPHASEOFFSETS=True
0185 RECORD=SiStripConfObjectRcd
0186 TAGSUBDIR=SiStripAPVPhaseOffsets
0187 LOGDESTINATION=Reader
0188 CONDLOGDEST=APVPhaseOffsetsInfo
0189 else if [ `echo $tag | grep "AlCaRecoTriggerBits" | wc -w` -gt 0 ]; then
0190 MONITOR_ALCARECOTRIGGERBITS=True
0191 RECORD=AlCaRecoTriggerBitsRcd
0192 TAGSUBDIR=SiStripDQM
0193 else
0194 USEACTIVEDETID=False
0195 RECORD=Unknown
0196 TAGSUBDIR=Unknown
0197
0198 fi
0199 fi
0200 fi
0201 fi
0202 fi
0203 fi
0204 fi
0205 fi
0206 fi
0207 fi
0208 fi
0209 fi
0210 fi
0211
0212
0213 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR" ]; then
0214 afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR"
0215 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR;
0216 fi
0217
0218 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag" ]; then
0219 afstokenchecker.sh "Creating directory $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag"
0220 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag;
0221
0222 NEWTAG=True
0223 fi
0224
0225 if [ "$RECORD" = "Unknown" ]; then
0226 afstokenchecker.sh "Unknown strip tag. Processing skipped!"
0227 continue
0228 fi
0229
0230
0231 afstokenchecker.sh "Getting the list of IOVs for the given DB tag..."
0232 conddb --db $DB --nocolors list -L 5000 $tag | awk '{if(match($1,"[a-z]")!=0 || match($1,"-")!=0) {} else {print $1}}' > list_Iov.txt
0233
0234
0235 afstokenchecker.sh "Now the values are retrieved from the DB..."
0236
0237 if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles" ]; then
0238 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles;
0239 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/Documentation;
0240 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/cfg;
0241 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots;
0242 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB;
0243 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB;
0244 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID;
0245 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC;
0246
0247 for i in {1..4}; do
0248 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i;
0249
0250 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0251 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Profile;
0252 fi
0253 if [ "$MONITORCUMULATIVE" = "True" ]; then
0254 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Cumulative;
0255 fi
0256 if [ "$CREATETRENDS" = "True" ]; then
0257 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Trends;
0258 fi
0259 done
0260
0261 for i in {1..6}; do
0262 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i;
0263
0264 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0265 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Profile;
0266 fi
0267 if [ "$MONITORCUMULATIVE" = "True" ]; then
0268 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Cumulative;
0269 fi
0270 if [ "$CREATETRENDS" = "True" ]; then
0271 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Trends;
0272 fi
0273 done
0274
0275 for i in {1..2}; do
0276 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i;
0277 for j in {1..3}; do
0278 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j;
0279
0280 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0281 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Profile;
0282 fi
0283 if [ "$MONITORCUMULATIVE" = "True" ]; then
0284 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Cumulative;
0285 fi
0286 if [ "$CREATETRENDS" = "True" ]; then
0287 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Trends;
0288 fi
0289 done
0290 done
0291
0292 for i in {1..2}; do
0293 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i;
0294 for j in {1..9}; do
0295 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j;
0296
0297 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0298 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Profile;
0299 fi
0300 if [ "$MONITORCUMULATIVE" = "True" ]; then
0301 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Cumulative;
0302 fi
0303 if [ "$CREATETRENDS" = "True" ]; then
0304 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Trends;
0305 fi
0306 done
0307 done
0308
0309 if [ "$MONITOR_QUALITY" = "True" ] || [ "$MONITOR_CABLING" = "True" ]; then
0310 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Trends
0311 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Trends;
0312 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Trends;
0313 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side1/Trends;
0314 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side2/Trends;
0315 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side1/Trends;
0316 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side2/Trends;
0317 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary
0318 fi
0319
0320
0321 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap;
0322
0323 if [ "$MONITOR_QUALITY" = "True" ]; then
0324 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadAPVs
0325 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadFibers
0326 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadModules
0327 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadStrips
0328 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/QualityLog
0329 fi
0330
0331 if [ "$MONITOR_CABLING" = "True" ]; then
0332 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/CablingLog
0333 fi
0334
0335 if [ "$MONITOR_LATENCY" = "True" ]; then
0336 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/LatencyLog
0337 fi
0338
0339 if [ "$MONITOR_SHIFTANDCROSSTALK" = "True" ]; then
0340 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/ShiftAndCrosstalkLog
0341 fi
0342
0343 if [ "$MONITOR_APVPHASEOFFSETS" = "True" ]; then
0344 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/APVPhaseOffsetsLog
0345 fi
0346
0347 if [ "$MONITOR_ALCARECOTRIGGERBITS" = "True" ]; then
0348 mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/AlCaRecoTriggerBitsLog
0349 fi
0350
0351 fi
0352
0353 if [ `echo *.png | wc -w` -gt 0 ]; then
0354 rm *.png;
0355 fi
0356
0357
0358
0359 for IOV_number in `cat list_Iov.txt`; do
0360
0361 if [ "$IOV_number" = "Total" ] || [ $IOV_number -gt 100000000 ]; then
0362 continue
0363 fi
0364
0365 ROOTFILE="${tag}_Run_${IOV_number}.root"
0366
0367 if [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles/$ROOTFILE ]; then
0368 continue
0369 fi
0370
0371 if [ "$MONITOR_LATENCY" = "True" ] && [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/LatencyLog/LatencyInfo_Run${IOV_number}.txt ]; then
0372 continue
0373 fi
0374
0375 if [ "$MONITOR_SHIFTANDCROSSTALK" = "True" ] && [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/ShiftAndCrosstalkLog/ShiftAndCrosstalkInfo_Run${IOV_number}.txt ]; then
0376 continue
0377 fi
0378
0379 if [ "$MONITOR_APVPHASEOFFSETS" = "True" ] && [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/APVPhaseOffsetsLog/APVPhaseOffsetsInfo_Run${IOV_number}.txt ]; then
0380 continue
0381 fi
0382
0383 if [ "$MONITOR_ALCARECOTRIGGERBITS" = "True" ] && [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/AlCaRecoTriggerBitsLog/AlCaRecoTriggerBitsInfo_Run${IOV_number}.txt ]; then
0384 continue
0385 fi
0386
0387 afstokenchecker.sh "New IOV $IOV_number found. Being processed..."
0388
0389 NEWIOV=True
0390
0391 afstokenchecker.sh "Executing cmsRun. Stay tuned ..."
0392 CMSRUNCOMMAND="cmsRun ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/test/DBReader_conddbmonitoring_generic_cfg.py print logDestination=$LOGDESTINATION qualityLogDestination=$QUALITYLOGDEST cablingLogDestination=$CABLINGLOGDEST condLogDestination=$CONDLOGDEST outputRootFile=$ROOTFILE connectionString=frontier://$FRONTIER/$ACCOUNT recordName=$RECORD recordForQualityName=$RECORDFORQUALITY tagName=$tag runNumber=$IOV_number LatencyMon=$MONITOR_LATENCY ALCARecoTriggerBitsMon=$MONITOR_ALCARECOTRIGGERBITS ShiftAndCrosstalkMon=$MONITOR_SHIFTANDCROSSTALK APVPhaseOffsetsMon=$MONITOR_APVPHASEOFFSETS PedestalMon=$MONITOR_PEDESTAL NoiseMon=$MONITOR_NOISE QualityMon=$MONITOR_QUALITY CablingMon=$MONITOR_CABLING GainMon=$MONITOR_GAIN LorentzAngleMon=$MONITOR_LA BackPlaneCorrectionMon=$MONITOR_BP ThresholdMon=$MONITOR_THRESHOLD MonitorCumulative=$MONITORCUMULATIVE ActiveDetId=$USEACTIVEDETID"
0393 $CMSRUNCOMMAND
0394
0395 afstokenchecker.sh "cmsRun finished. Now moving the files to the corresponding directories ..."
0396
0397 cp ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/test/DBReader_conddbmonitoring_generic_cfg.py DBReader_cfg.py
0398 cat >> DBReader_cfg.py << EOF
0399
0400
0401
0402 EOF
0403
0404 mv DBReader_cfg.py $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/cfg/${tag}_cfg.py
0405 CFGISSAVED=True
0406
0407 if [ "$NEWTAG" = "True" ]; then
0408 cat >> ${tag}_documentation << EOF
0409 <html>
0410 <body>
0411 <a href="https://twiki.cern.ch/twiki/bin/view/CMS/StripTrackerDBTagsForCalibrations#${tag}">https://twiki.cern.ch/twiki/bin/view/CMS/StripTrackerDBTagsForCalibrations
0412 </body>
0413 </html>
0414 EOF
0415
0416 mv ${tag}_documentation $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/Documentation;
0417 fi
0418
0419 if [ -f $ROOTFILE ]; then mv $ROOTFILE $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/rootfiles; fi
0420
0421 if [ "$MONITOR_QUALITY" = "True" ]; then
0422
0423 mv $QUALITYLOGDEST.log QualityInfo_Run${IOV_number}.txt
0424 mv QualityInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/QualityLog/
0425
0426 fi
0427
0428 if [ "$MONITOR_CABLING" = "True" ]; then
0429 if [ "$ACCOUNT" != "CMS_COND_21X_STRIP" ]; then
0430
0431 mv $CABLINGLOGDEST.log CablingInfo_Run${IOV_number}.txt
0432 mv CablingInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/CablingLog/
0433 fi
0434
0435
0436 mv $QUALITYLOGDEST.log QualityInfoFromCabling_Run${IOV_number}.txt
0437 mv QualityInfoFromCabling_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/CablingLog/
0438
0439 fi
0440
0441 if [ "$MONITOR_LATENCY" = "True" ]; then
0442
0443 mv $CONDLOGDEST.log LatencyInfo_Run${IOV_number}.txt
0444 mv LatencyInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/LatencyLog/
0445
0446 fi
0447
0448 if [ "$MONITOR_SHIFTANDCROSSTALK" = "True" ]; then
0449
0450 mv $CONDLOGDEST.log ShiftAndCrosstalkInfo_Run${IOV_number}.txt
0451 mv ShiftAndCrosstalkInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/ShiftAndCrosstalkLog/
0452
0453 fi
0454
0455 if [ "$MONITOR_APVPHASEOFFSETS" = "True" ]; then
0456
0457 mv $CONDLOGDEST.log APVPhaseOffsetsInfo_Run${IOV_number}.txt
0458 mv APVPhaseOffsetsInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/APVPhaseOffsetsLog/
0459
0460 fi
0461
0462 if [ "$MONITOR_ALCARECOTRIGGERBITS" = "True" ]; then
0463 mv AlCaRecoTriggerBitsInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/AlCaRecoTriggerBitsLog/
0464 fi
0465
0466 if [ -f $LOGDESTINATION.log ]; then rm $LOGDESTINATION.log; fi
0467 if [ -f $QUALITYLOGDEST.log ]; then rm $QUALITYLOGDEST.log; fi
0468 if [ -f $CABLINGLOGDEST.log ]; then rm $CABLINGLOGDEST.log; fi
0469 if [ -f $CONDLOGDEST.log ]; then rm $CONDLOGDEST.log; fi
0470
0471
0472 for Plot in `ls *.png | grep TIB`; do
0473 PNGNAME=`echo ${Plot
0474 LAYER=`echo ${PNGNAME
0475 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0476 if [ `echo $Plot | grep Cumulative` ]; then
0477 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$LAYER/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0478 else
0479 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$LAYER/Profile/${PNGNAME}__Run${IOV_number}.png;
0480 fi
0481 else
0482 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$LAYER/${PNGNAME}__Run${IOV_number}.png;
0483 fi
0484 done;
0485
0486 for Plot in `ls *.png | grep TOB`; do
0487 PNGNAME=`echo ${Plot
0488 LAYER=`echo ${PNGNAME
0489 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0490 if [ `echo $Plot | grep Cumulative` ]; then
0491 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$LAYER/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0492 else
0493 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$LAYER/Profile/${PNGNAME}__Run${IOV_number}.png;
0494 fi
0495 else
0496 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$LAYER/${PNGNAME}__Run${IOV_number}.png;
0497 fi
0498 done;
0499
0500 for Plot in `ls *.png | grep TID`; do
0501 PNGNAME=`echo ${Plot
0502 SIDE=`echo ${PNGNAME
0503 DISK=`echo ${PNGNAME
0504 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0505 if [ `echo $Plot | grep Cumulative` ]; then
0506 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$SIDE/Disk$DISK/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0507 else
0508 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$SIDE/Disk$DISK/Profile/${PNGNAME}__Run${IOV_number}.png;
0509 fi
0510 else
0511 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$SIDE/Disk$DISK/${PNGNAME}__Run${IOV_number}.png;
0512 fi
0513 done;
0514
0515 for Plot in `ls *.png | grep TEC`; do
0516 PNGNAME=`echo ${Plot
0517 SIDE=`echo ${PNGNAME
0518 DISK=`echo ${PNGNAME
0519 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0520 if [ `echo $Plot | grep Cumulative` ]; then
0521 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$SIDE/Disk$DISK/Cumulative/${PNGNAME}__Run${IOV_number}.png;
0522 else
0523 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$SIDE/Disk$DISK/Profile/${PNGNAME}__Run${IOV_number}.png;
0524 fi
0525 else
0526 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$SIDE/Disk$DISK/${PNGNAME}__Run${IOV_number}.png;
0527 fi
0528 done;
0529
0530 for Plot in `ls *.png | grep TkMap`; do
0531
0532 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap/$Plot;
0533 done;
0534
0535 for Plot in `ls *.png | grep Bad`; do
0536 PNGNAME=`echo ${Plot
0537 if [ `echo $PNGNAME | grep Apvs` ]; then
0538 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadAPVs/${PNGNAME}__Run${IOV_number}.png;
0539 else if [ `echo $PNGNAME | grep Fibers` ]; then
0540 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadFibers/${PNGNAME}__Run${IOV_number}.png;
0541 else if [ `echo $PNGNAME | grep Modules` ]; then
0542 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadModules/${PNGNAME}__Run${IOV_number}.png;
0543 else if [ `echo $PNGNAME | grep Strips` ]; then
0544 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadStrips/${PNGNAME}__Run${IOV_number}.png;
0545 fi
0546 fi
0547 fi
0548 fi
0549 done;
0550
0551 for Plot in `ls *.png | grep Cabling`; do
0552 PNGNAME=`echo ${Plot
0553 mv $Plot $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/${PNGNAME}__Run${IOV_number}.png;
0554 done;
0555
0556
0557
0558 done;
0559
0560
0561 if [ "$NEWTAG" = "True" ] || [ "$NEWIOV" = "True" ]; then
0562
0563 if [ "$CREATETRENDS" = "True" ]; then
0564 afstokenchecker.sh "Creating the Trend Plots ..."
0565
0566 getOfflineDQMData.sh $DB $ACCOUNT $TAGSUBDIR $tag $STORAGEPATH
0567
0568 afstokenchecker.sh "Moving Trend Plots Using the script moveTrendPlots..."
0569
0570 moveTrendPlots.sh $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag
0571
0572
0573 fi
0574
0575 afstokenchecker.sh "Publishing the new tag $tag (or the new IOV) on the web ..."
0576
0577 for i in {1..4}; do
0578 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0579 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
0580 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0581 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Profile;
0582 CreateIndex
0583
0584 if [ "$MONITORCUMULATIVE" = "True" ]; then
0585 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Cumulative;
0586 CreateIndex
0587 fi
0588
0589 if [ "$CREATETRENDS" = "True" ]; then
0590 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i/Trends;
0591 CreateIndex
0592 fi
0593 else
0594 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Layer$i;
0595 CreateIndex
0596 fi
0597 done
0598
0599 for i in {1..6}; do
0600 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0601 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
0602 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0603 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Profile;
0604 CreateIndex
0605
0606 if [ "$MONITORCUMULATIVE" = "True" ]; then
0607 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Cumulative;
0608 CreateIndex
0609 fi
0610
0611 if [ "$CREATETRENDS" = "True" ]; then
0612 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i/Trends;
0613 CreateIndex
0614 fi
0615 else
0616 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Layer$i;
0617 CreateIndex
0618 fi
0619 done
0620
0621 for i in {1..2}; do
0622 for j in {1..3}; do
0623 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0624 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
0625 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0626 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Profile;
0627 CreateIndex
0628
0629 if [ "$MONITORCUMULATIVE" = "True" ]; then
0630 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Cumulative;
0631 CreateIndex
0632 fi
0633
0634 if [ "$CREATETRENDS" = "True" ]; then
0635 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j/Trends;
0636 CreateIndex
0637 fi
0638 else
0639 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Disk$j;
0640 CreateIndex
0641 fi
0642 done
0643 done
0644
0645 for i in {1..2}; do
0646 for j in {1..9}; do
0647 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0648 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
0649 if [ "$MONITORCUMULATIVE" = "True" ] || [ "$CREATETRENDS" = "True" ]; then
0650 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Profile;
0651 CreateIndex
0652
0653 if [ "$MONITORCUMULATIVE" = "True" ]; then
0654 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Cumulative;
0655 CreateIndex
0656 fi
0657
0658 if [ "$CREATETRENDS" = "True" ]; then
0659 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j/Trends;
0660 CreateIndex
0661 fi
0662 else
0663 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Disk$j;
0664 CreateIndex
0665 fi
0666 done
0667 done
0668
0669 if [ "$CREATETRENDS" = "True" ]; then
0670 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0671 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
0672 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Trends;
0673 CreateIndex
0674
0675 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0676 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- TIB --- Trend Plots@g" > index_new.html
0677 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TIB/Trends;
0678 CreateIndex
0679
0680 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0681 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- TOB --- Trend Plots@g" > index_new.html
0682 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TOB/Trends;
0683 CreateIndex
0684
0685 for i in {1..2}; do
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 --- TID Side $i --- Trend Plots@g" > index_new.html
0688 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TID/Side$i/Trends;
0689 CreateIndex
0690
0691 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0692 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
0693 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TEC/Side$i/Trends;
0694 CreateIndex
0695 done
0696 fi
0697
0698 if [ "$MONITOR_QUALITY" = "True" ]; then
0699 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0700 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- Bad APVs --- Summary Report@g" > index_new.html
0701 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadAPVs;
0702 CreateIndex
0703
0704 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0705 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- Bad Fibers --- Summary Report@g" > index_new.html
0706 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadFibers;
0707 CreateIndex
0708
0709 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0710 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- Bad Modules --- Summary Report@g" > index_new.html
0711 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadModules;
0712 CreateIndex
0713
0714 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0715 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- Bad Strips --- Summary Report@g" > index_new.html
0716 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/BadStrips;
0717 CreateIndex
0718
0719 fi
0720
0721 if [ "$MONITOR_CABLING" = "True" ]; then
0722 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0723 cat ${CMSSW_BASE}/src/DQM/SiStripMonitorSummary/data/template_index_header.html | sed -e "s@insertPageName@$tag --- Summary Report@g" > index_new.html
0724 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/Summary/;
0725 CreateIndex
0726
0727 fi
0728
0729 if [ -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap" ]; then
0730 cd /afs/cern.ch/cms/tracker/sistrcalib/WWW;
0731 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
0732 cd $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/plots/TrackerMap;
0733 CreateIndex
0734
0735 fi
0736
0737 fi
0738
0739 cd $WORKDIR;
0740
0741 done;