Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:30

0001 #!/bin/sh
0002 function die { echo $1: status $2 ; exit $2; }
0003 
0004 iov=308698
0005 tag="SiStripBadChannel_FromOnline_GR10_v1_hlt"
0006 
0007 # set up jobdir
0008 # O2O runs under $JOBDIR/{since}/{analyzer}
0009 export JOBDIR=`pwd`
0010 outputdir="$JOBDIR/$iov/SiStripO2OBadStrip"
0011 if [ -d "$outputdir" ]; then
0012         rm -r $outputdir
0013 fi
0014 mkdir -p $outputdir
0015 
0016 # config file corresponding to $iov
0017 cfgfile="$JOBDIR/sistrip-daq-test-cfg.txt"
0018 cat << EOF > $cfgfile
0019         PartTIBD= cms.untracked.PSet(
0020                 PartitionName = cms.untracked.string("TI_27-JAN-2010_2"),
0021                 ForceCurrentState = cms.untracked.bool(False),
0022                 ForceVersions = cms.untracked.bool(True),
0023                 CablingVersion = cms.untracked.vuint32(74,0),
0024                 FecVersion = cms.untracked.vuint32(900,0),
0025                 FedVersion = cms.untracked.vuint32(1521,0),
0026                 DcuDetIdsVersion = cms.untracked.vuint32(9,12),
0027                 MaskVersion = cms.untracked.vuint32(125,0),
0028                 DcuPsuMapVersion = cms.untracked.vuint32(273,0)
0029         ),
0030         PartTOB= cms.untracked.PSet(
0031                 PartitionName = cms.untracked.string("TO_30-JUN-2009_1"),
0032                 ForceCurrentState = cms.untracked.bool(False),
0033                 ForceVersions = cms.untracked.bool(True),
0034                 CablingVersion = cms.untracked.vuint32(73,0),
0035                 FecVersion = cms.untracked.vuint32(901,0),
0036                 FedVersion = cms.untracked.vuint32(1520,0),
0037                 DcuDetIdsVersion = cms.untracked.vuint32(9,12),
0038                 MaskVersion = cms.untracked.vuint32(120,0),
0039                 DcuPsuMapVersion = cms.untracked.vuint32(274,0)
0040         ),
0041         PartTECP= cms.untracked.PSet(
0042                 PartitionName = cms.untracked.string("TP_09-JUN-2009_1"),
0043                 ForceCurrentState = cms.untracked.bool(False),
0044                 ForceVersions = cms.untracked.bool(True),
0045                 CablingVersion = cms.untracked.vuint32(71,1),
0046                 FecVersion = cms.untracked.vuint32(899,0),
0047                 FedVersion = cms.untracked.vuint32(1522,0),
0048                 DcuDetIdsVersion = cms.untracked.vuint32(9,0),
0049                 MaskVersion = cms.untracked.vuint32(118,0),
0050                 DcuPsuMapVersion = cms.untracked.vuint32(266,1)
0051         ),
0052         PartTECM= cms.untracked.PSet(
0053                 PartitionName = cms.untracked.string("TM_09-JUN-2009_1"),
0054                 ForceCurrentState = cms.untracked.bool(False),
0055                 ForceVersions = cms.untracked.bool(True),
0056                 CablingVersion = cms.untracked.vuint32(69,1),
0057                 FecVersion = cms.untracked.vuint32(898,0),
0058                 FedVersion = cms.untracked.vuint32(1523,0),
0059                 DcuDetIdsVersion = cms.untracked.vuint32(9,0),
0060                 MaskVersion = cms.untracked.vuint32(124,0),
0061                 DcuPsuMapVersion = cms.untracked.vuint32(267,1)
0062         )
0063 EOF
0064 
0065 # export the reference payload from prod db
0066 refdb="${tag}_ref.db"
0067 if [ -f "$refdb" ]; then
0068         rm  $refdb
0069 fi
0070 conddb_import -f frontier://FrontierProd/CMS_CONDITIONS -c sqlite:$refdb -i $tag -t $tag -b $iov -e $iov --reserialize
0071 
0072 # run DAQ O2O test
0073 SiStripDAQPopCon.py SiStripO2OBadStrip $iov $cfgfile --destTags SiStripBadChannel_FromOnline_GR10_v1_hlt --destDb None --inputTag SiStripBadChannel_FromOnline_GR10_v1_hlt --condDbRead frontier://FrontierProd/CMS_CONDITIONS --no-upload --bookkeeping-db private || die "Failure running SiStripDAQPopCon.py" $?
0074 
0075 # compare the new payload with the reference payload
0076 tagdiff=$( conddb --db $refdb diff --destdb $outputdir/SiStripO2OBadStrip_$iov.db -s $tag )
0077 if [ $? -ne 0 ]; then
0078         die "DAQO2OTest: Cannot compare the tags!" $?
0079 fi
0080 if [ $( printf $tagdiff | grep -c $iov ) -ne "0" ]; then
0081         printf $tagdiff
0082         die "DAQO2OTest: Payload hash does not match!" 1
0083 fi
0084 
0085 exit