Skip to content

Commit

Permalink
Merge pull request #2810 from venturia/tkdbmonitoring_70x
Browse files Browse the repository at this point in the history
DQM/SiStripMonitorSummary -- Added the possibility to monitor SiStripAPVPhaseOffsets tags
  • Loading branch information
nclopezo committed Mar 14, 2014
2 parents 1a40144 + ab1d0f7 commit c362c51
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ for tag in `cat $DBTAGCOLLECTION`; do
MONITOR_THRESHOLD=False
MONITOR_LATENCY=False
MONITOR_SHIFTANDCROSSTALK=False
MONITOR_APVPHASEOFFSETS=False
MONITOR_ALCARECOTRIGGERBITS=False

LOGDESTINATION=cout
Expand Down Expand Up @@ -182,6 +183,12 @@ for tag in `cat $DBTAGCOLLECTION`; do
TAGSUBDIR=SiStripShiftAndCrosstalk
LOGDESTINATION=Reader
CONDLOGDEST=ShiftAndCrosstalkInfo
else if [ `echo $tag | grep "APVPhaseOffsets" | wc -w` -gt 0 ]; then
MONITOR_APVPHASEOFFSETS=True
RECORD=SiStripConfObjectRcd
TAGSUBDIR=SiStripAPVPhaseOffsets
LOGDESTINATION=Reader
CONDLOGDEST=APVPhaseOffsetsInfo
else if [ `echo $tag | grep "AlCaRecoTriggerBits" | wc -w` -gt 0 ]; then
MONITOR_ALCARECOTRIGGERBITS=True
RECORD=AlCaRecoTriggerBitsRcd
Expand All @@ -202,6 +209,7 @@ for tag in `cat $DBTAGCOLLECTION`; do
fi
fi
fi
fi

# Creation of DB-Tag directory if not existing yet
if [ ! -d "$STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR" ]; then
Expand Down Expand Up @@ -411,6 +419,10 @@ EOF
mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/ShiftAndCrosstalkLog
fi

if [ "$MONITOR_APVPHASEOFFSETS" = "True" ]; then
mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/APVPhaseOffsetsLog
fi

if [ "$MONITOR_ALCARECOTRIGGERBITS" = "True" ]; then
mkdir $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/AlCaRecoTriggerBitsLog
fi
Expand Down Expand Up @@ -482,6 +494,10 @@ EOF
continue
fi

if [ "$MONITOR_APVPHASEOFFSETS" = "True" ] && [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/APVPhaseOffsetsLog/APVPhaseOffsetsInfo_Run${IOV_number}.txt ]; then # Skip IOVs already processed. Take only new ones.
continue
fi

if [ "$MONITOR_ALCARECOTRIGGERBITS" = "True" ] && [ -f $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/AlCaRecoTriggerBitsLog/AlCaRecoTriggerBitsInfo_Run${IOV_number}.txt ]; then # Skip IOVs already processed. Take only new ones.
continue
fi
Expand All @@ -491,7 +507,7 @@ EOF
NEWIOV=True

afstokenchecker.sh "Executing cmsRun. Stay tuned ..."
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 PedestalMon=$MONITOR_PEDESTAL NoiseMon=$MONITOR_NOISE QualityMon=$MONITOR_QUALITY CablingMon=$MONITOR_CABLING GainMon=$MONITOR_GAIN LorentzAngleMon=$MONITOR_LA ThresholdMon=$MONITOR_THRESHOLD MonitorCumulative=$MONITORCUMULATIVE ActiveDetId=$USEACTIVEDETID"
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 ThresholdMon=$MONITOR_THRESHOLD MonitorCumulative=$MONITORCUMULATIVE ActiveDetId=$USEACTIVEDETID"
$CMSRUNCOMMAND

afstokenchecker.sh "cmsRun finished. Now moving the files to the corresponding directories ..."
Expand Down Expand Up @@ -554,6 +570,13 @@ EOF

fi

if [ "$MONITOR_APVPHASEOFFSETS" = "True" ]; then
# cat $LOGDESTINATION.log | awk 'BEGIN{doprint=0}{if(match($0,"PrintSummary")!=0) doprint=1;if(match($0,"PrintDebug")!=0) doprint=1;if(match($0,"%MSG")!=0) {doprint=0;} if(doprint==1) print $0}' > APVPhaseOffsetsInfo_Run${IOV_number}.txt
mv $CONDLOGDEST.log APVPhaseOffsetsInfo_Run${IOV_number}.txt
mv APVPhaseOffsetsInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/APVPhaseOffsetsLog/

fi

if [ "$MONITOR_ALCARECOTRIGGERBITS" = "True" ]; then
mv AlCaRecoTriggerBitsInfo_Run${IOV_number}.txt $STORAGEPATH/$DB/$ACCOUNT/$DBTAGDIR/$TAGSUBDIR/$tag/AlCaRecoTriggerBitsLog/
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.bool, # string, int, or float
"Monitor shift and crosstalk?")
options.register ('APVPhaseOffsetsMon',
False,
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.bool, # string, int, or float
"Monitor APV phase offsets?")
options.register ('PedestalMon',
False,
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
Expand Down Expand Up @@ -193,6 +198,10 @@
process.reader = cms.EDAnalyzer("SiStripConfObjectDummyPrinter")
process.p1 = cms.Path(process.reader)

elif options.APVPhaseOffsetsMon == True:
process.reader = cms.EDAnalyzer("SiStripConfObjectDummyPrinter")
process.p1 = cms.Path(process.reader)

elif options.ALCARecoTriggerBitsMon == True:
process.AlCaRecoTriggerBitsRcdRead = cms.EDAnalyzer( "AlCaRecoTriggerBitsRcdRead"
, outputType = cms.untracked.string( 'text' )
Expand Down

0 comments on commit c362c51

Please sign in to comment.