Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the possibility to monitor SiStripAPVPhaseOffsets tags #2810

Merged
merged 1 commit into from
Mar 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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