Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:18

0001 #! /bin/tcsh
0002 cmsenv
0003 
0004 echo " START Geometry Validation"
0005 set loctag = ''
0006 if ($#argv == 0) then
0007     set gtag="MC_31X_V8::All"
0008     set geometry="GeometryIdeal"
0009 else if($#argv == 1) then
0010     set gtag=`echo ${1}`
0011     set geometry="GeometryIdeal"
0012 else if ($#argv == 2) then
0013     set gtag=`echo ${1}`
0014     set geometry=`echo ${2}`
0015 else if ($#argv == 3) then 
0016     set gtag=`echo ${1}`
0017     set geometry=`echo ${2}`
0018     set loctag = `echo ${3}`
0019 endif
0020 echo geometry = ${geometry}
0021 #global tag gtag is assumed to be of the form GeometryWORD such as GeometryExtended or GeometryIdeal
0022 #as of 3.4.X loaded objects in the DB, these correspond to condlabels Extended, Ideal, etc...
0023 set condlabel = `(echo $geometry | sed '{s/Geometry//g}')`
0024 echo ${condlabel} " geometry label from db"
0025 echo "Check out and compile the needed packages"
0026 #The following are examples which should be changed if you are testing new code
0027 #or scripts 
0028 #required:
0029 addpkg Geometry/TrackerGeometryBuilder
0030 addpkg Geometry/RPCGeometry
0031 addpkg Geometry/DTGeometry
0032 addpkg Geometry/CSCGeometry
0033 addpkg Geometry/CaloEventSetup
0034 addpkg GeometryReaders/XMLIdealGeometryESSource
0035 addpkg DetectorDescription/Schema
0036 addpkg Configuration/StandardSequences
0037 addpkg CondTools/Geometry
0038 
0039 #add cvs updates here for REAL LOCAL testing
0040 # or change the above to cvs co -r yourtag to make sure new files get in :)
0041 # e.g. cvs update -A Geometry/DTGeometry/test/*.py
0042 # e.g. cp -r /from/my/work/area/Geometry/* Geometry/.
0043 #cvs update -r V03-02-05-01 Validation/Geometry
0044 #cvs update -r V03-09-10-02 Geometry/CaloEventSetup 
0045 #cvs update -r V01-02-21-07 GeometryReaders/XMLIdealGeometryESSource 
0046 
0047 #cvs update -r V00-03-11 Geometry/DTGeometry 
0048 #cvs update -r V01-01-25 Geometry/RPCGeometry 
0049 #cvs update -r V01-05-06 Geometry/CSCGeometry 
0050 #cvs update -r V05-00-11 Geometry/TrackerGeometryBuilder
0051 
0052 #add cvs updates here for REAL LOCAL testing
0053 # e.g. cvs update -A Geometry/DTGeometry/test/*.py
0054 # e.g. cp -r /from/my/work/area/Geometry/* Geometry/.
0055 #cvs update -r V03-02-05-01 Validation/Geometry
0056 #cvs update -r V03-09-10-02 Geometry/CaloEventSetup 
0057 #cvs update -r V01-02-21-07 GeometryReaders/XMLIdealGeometryESSource 
0058 
0059 #cvs update -r V00-03-11 Geometry/DTGeometry 
0060 #cvs update -r V01-01-25 Geometry/RPCGeometry 
0061 #cvs update -r V01-05-06 Geometry/CSCGeometry 
0062 #cvs update -r V05-00-11 Geometry/TrackerGeometryBuilder
0063 
0064 if ($loctag != '') then 
0065     cd CondCore/ESSources/python
0066     set escloctag = `(echo $loctag | sed '{s/\//\\\//g}')`
0067     sed -i "{s/frontier:\/\/FrontierProd\/CMS_CONDITIONS/${escloctag}/g}" CondDBESSource_cfi.py 
0068 endif
0069 
0070 cd $CMSSW_BASE/src
0071 scram build
0072 
0073 echo "Finish the setup of release working area"
0074 
0075 mkdir workArea
0076 cd workArea
0077 set myDir=`pwd`
0078 echo $myDir
0079 
0080 cp $CMSSW_BASE/src/CondTools/Geometry/test/geometryxmlwriter.py .
0081 echo $geometry
0082 sed -i "{s/GeometryExtended/${geometry}/}" geometryxmlwriter.py >  GeometryValidation.log
0083 cmsRun geometryxmlwriter.py >>  GeometryValidation.log
0084 
0085 cp $CMSSW_BASE/src/CondTools/Geometry/test/geometrywriter.py .
0086 sed -i "{s/GeometryExtended/${geometry}/}" geometrywriter.py >>  GeometryValidation.log
0087 sed -i "{s/geTagXX.xml/fred.xml/g}" geometrywriter.py >>  GeometryValidation.log
0088 cmsRun geometrywriter.py >>  GeometryValidation.log
0089 if ( -e myfile.db ) then
0090     echo "The local DB file is present" | tee -a GeometryValidation.log
0091 else
0092     echo "ERROR the local DB file is not present" | tee -a GeometryValidation.log
0093     exit
0094 endif
0095 
0096 echo "Start compare the content of GT and the local DB" | tee -a GeometryValidation.log
0097 
0098 # (MEC:1) The following two tests with the diff below them actually make
0099 # sure that the Global Tag (GT) and Local DB XML file blobs are fine... 
0100 # meaning that the full simulation geometry source is fine (XML blob)
0101 # as well as the reco geometries.
0102 cp $CMSSW_BASE/src/CondTools/Geometry/test/geometrytest_local.py .
0103 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" geometrytest_local.py >> GeometryValidation.log
0104 cmsRun geometrytest_local.py > outLocalDB.log
0105 if ( -s outLocalDB.log ) then
0106     echo "Local DB access run ok" | tee -a GeometryValidation.log
0107 else
0108     echo "ERROR the output of Local DB access test is empty" | tee -a GeometryValidation.log
0109     exit
0110 endif
0111 
0112 cp $CMSSW_BASE/src/CondTools/Geometry/test/geometrytest_db.py .
0113 sed -i "{/process.GlobalTag.globaltag/d}" geometrytest_db.py >> GeometryValidation.log 
0114 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" geometrytest_db.py >> GeometryValidation.log
0115 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" geometrytest_db.py >> GeometryValidation.log 
0116 cmsRun geometrytest_db.py > outGTDB.log
0117 if ( -s outGTDB.log ) then
0118     echo "GT DB access run ok" | tee -a GeometryValidation.log
0119 else
0120     echo "ERROR the output of GT DB access test is empty" | tee -a GeometryValidation.log
0121     exit
0122 endif
0123 
0124 diff outLocalDB.log outGTDB.log > logDiffLocalvsGT.log
0125 if ( -s logLocalvsGTDiff.log ) then
0126     echo "WARNING THE CONTENT OF GLOBAL TAG IS DIFFERENT WHIT RESPECT TO THE LOCAL DB FILE" | tee -a GeometryValidation.log
0127 endif
0128 
0129 echo "End compare the content of GT and the local DB" | tee -a GeometryValidation.log
0130 
0131 echo "Start Tracker RECO geometry validation" | tee -a GeometryValidation.log
0132 
0133 mkdir tkdb
0134 mkdir tkdblocal
0135 mkdir tkddd
0136 
0137 cp myfile.db tkdblocal
0138 
0139 cd tkdb
0140 cp $CMSSW_BASE/src/Geometry/TrackerGeometryBuilder/test/trackerModuleInfoDB_cfg.py .
0141 sed -i "{/process.GlobalTag.globaltag/d}" trackerModuleInfoDB_cfg.py >> ../GeometryValidation.log
0142 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" trackerModuleInfoDB_cfg.py >> ../GeometryValidation.log 
0143 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" trackerModuleInfoDB_cfg.py >> ../GeometryValidation.log 
0144 cmsRun trackerModuleInfoDB_cfg.py >> ../GeometryValidation.log
0145 mv trackerModuleInfoDB_cfg.py ../
0146 if ( -s ModuleInfo.log ) then
0147     echo "TK test from DB run ok" | tee -a ../GeometryValidation.log
0148 else
0149     echo "ERROR the output of TK test from DB is empty" | tee -a ../GeometryValidation.log
0150     exit
0151 endif
0152 
0153 cd ../tkdblocal
0154 cp $CMSSW_BASE/src/Geometry/TrackerGeometryBuilder/test/trackerModuleInfoLocalDB_cfg.py .
0155 sed -i "{/process.GlobalTag.globaltag/d}" trackerModuleInfoLocalDB_cfg.py >> ../GeometryValidation.log
0156 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" trackerModuleInfoLocalDB_cfg.py >> ../GeometryValidation.log 
0157 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" trackerModuleInfoLocalDB_cfg.py >> ../GeometryValidation.log 
0158 cmsRun trackerModuleInfoLocalDB_cfg.py >> ../GeometryValidation.log
0159 mv trackerModuleInfoLocalDB_cfg.py ../
0160 if ( -s ModuleInfo.log ) then
0161     echo "TK test from Local DB run ok" | tee -a ../GeometryValidation.log
0162 else
0163     echo "ERROR the output of TK test from Local DB is empty" | tee -a ../GeometryValidation.log
0164     exit
0165 endif
0166 
0167 cd ../tkddd
0168 cp $CMSSW_BASE/src/Geometry/TrackerGeometryBuilder/test/trackerModuleInfoDDD_cfg.py .
0169 sed -i "{/process.GlobalTag.globaltag/d}" trackerModuleInfoDDD_cfg.py >> ../GeometryValidation.log
0170 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" trackerModuleInfoDDD_cfg.py >> ../GeometryValidation.log 
0171 cmsRun trackerModuleInfoDDD_cfg.py >> ../GeometryValidation.log
0172 mv trackerModuleInfoDDD_cfg.py ../
0173 if ( -s ModuleInfo.log ) then
0174     echo "TK test from DDD run ok" | tee -a ../GeometryValidation.log
0175 else
0176     echo "ERROR the output of TK test from DDD is empty" | tee -a ../GeometryValidation.log
0177     exit
0178 endif
0179 
0180 cd ../
0181 rm -f tkdblocal/myfile.db
0182 diff -r tkdb/ tkddd/ > logTkDiffGTvsDDD.log
0183 if ( -s logTkDiffGTvsDDD.log ) then
0184     echo "WARNING THE TRACKER RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND GT DB" | tee -a GeometryValidation.log
0185 endif
0186 
0187 diff -r tkdblocal/ tkddd/ > logTkDiffLocalvsDDD.log
0188 if ( -s logTkDiffLocalvsDDD.log ) then
0189     echo "WARNING THE TRACKER RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND LOCAL DB" | tee -a GeometryValidation.log
0190 endif
0191 
0192 diff -r tkdb/ tkdblocal/ > logTkDiffGTvsLocal.log
0193 if ( -s logTkDiffGTvsLocal.log ) then
0194     echo "WARNING THE TRACKER RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0195 endif
0196 
0197 echo "End Tracker RECO geometry validation" | tee -a GeometryValidation.log
0198 
0199 echo "Start DT RECO geometry validation" | tee -a GeometryValidation.log
0200 
0201 cp $CMSSW_BASE/src/Geometry/DTGeometry/test/testDTGeometryFromDB_cfg.py .  
0202 sed -i "{/process.GlobalTag.globaltag/d}" testDTGeometryFromDB_cfg.py >> GeometryValidation.log
0203 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testDTGeometryFromDB_cfg.py >> GeometryValidation.log 
0204 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testDTGeometryFromDB_cfg.py >> GeometryValidation.log 
0205 cmsRun testDTGeometryFromDB_cfg.py > outDB_DT.log
0206 if ( -s outDB_DT.log ) then
0207     echo "DT test from DB run ok" | tee -a GeometryValidation.log
0208 else
0209     echo "ERROR the output of DT test from DB is empty" | tee -a GeometryValidation.log
0210     exit
0211 endif
0212 
0213 cp $CMSSW_BASE/src/Geometry/DTGeometry/test/testDTGeometryFromLocalDB_cfg.py .  
0214 sed -i "{/process.GlobalTag.globaltag/d}" testDTGeometryFromLocalDB_cfg.py >> GeometryValidation.log
0215 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testDTGeometryFromLocalDB_cfg.py >> GeometryValidation.log 
0216 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testDTGeometryFromLocalDB_cfg.py >> GeometryValidation.log 
0217 cmsRun testDTGeometryFromLocalDB_cfg.py > outLocalDB_DT.log
0218 if ( -s outDB_DT.log ) then
0219     echo "DT test from Local DB run ok" | tee -a GeometryValidation.log
0220 else
0221     echo "ERROR the output of DT test from Local DB is empty" | tee -a GeometryValidation.log
0222     exit
0223 endif
0224 
0225 cp $CMSSW_BASE/src/Geometry/DTGeometry/test/testDTGeometry_cfg.py .
0226 sed -i "{s/GeometryExtended/${geometry}/}" testDTGeometry_cfg.py >>  GeometryValidation.log
0227 sed -i "{/process.GlobalTag.globaltag/d}" testDTGeometry_cfg.py >> GeometryValidation.log
0228 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testDTGeometry_cfg.py >> GeometryValidation.log 
0229 cmsRun testDTGeometry_cfg.py > outDDD_DT.log
0230 if ( -s outDDD_DT.log ) then
0231     echo "DT test from DDD run ok" | tee -a GeometryValidation.log
0232 else
0233     echo "ERROR the output of DT test from DDD is empty" | tee -a GeometryValidation.log
0234     exit
0235 endif
0236 
0237 diff --ignore-matching-lines='Geometry node for DTGeom' outDB_DT.log outDDD_DT.log > logDTDiffGTvsDDD.log
0238 if ( -s logDTDiffGTvsDDD.log ) then
0239     echo "WARNING THE DT RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND GT DB" | tee -a GeometryValidation.log
0240 endif
0241 
0242 diff --ignore-matching-lines='Geometry node for DTGeom' outLocalDB_DT.log outDDD_DT.log > logDTDiffLocalvsDDD.log
0243 if ( -s logDTDiffLocalvsDDD.log ) then
0244     echo "WARNING THE DT RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND LOCAL DB" | tee -a GeometryValidation.log
0245 endif
0246 
0247 diff --ignore-matching-lines='Geometry node for DTGeom' outDB_DT.log outLocalDB_DT.log > logDTDiffGTvsLocal.log
0248 if ( -s logDTDiffGTvsLocal.log ) then
0249     echo "WARNING THE DT RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND  LOCAL DB" | tee -a GeometryValidation.log
0250 endif
0251 
0252 echo "End DT RECO geometry validation" | tee -a GeometryValidation.log
0253 
0254 echo "Start CSC RECO geometry validation" | tee -a GeometryValidation.log
0255 
0256 cp $CMSSW_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryFromDB_cfg.py .  
0257 sed -i "{/process.GlobalTag.globaltag/d}" testCSCGeometryFromDB_cfg.py >> GeometryValidation.log
0258 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testCSCGeometryFromDB_cfg.py >> GeometryValidation.log 
0259 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testCSCGeometryFromDB_cfg.py >> GeometryValidation.log 
0260 cmsRun testCSCGeometryFromDB_cfg.py > outDB_CSC.log
0261 if ( -s outDB_CSC.log ) then
0262     echo "CSC test from GT DB run ok" | tee -a GeometryValidation.log
0263 else
0264     echo "ERROR the output of CSC test from GT DB is empty" | tee -a GeometryValidation.log
0265     exit
0266 endif
0267 
0268 cp $CMSSW_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryFromLocalDB_cfg.py .  
0269 sed -i "{/process.GlobalTag.globaltag/d}" testCSCGeometryFromLocalDB_cfg.py >> GeometryValidation.log
0270 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testCSCGeometryFromLocalDB_cfg.py >> GeometryValidation.log 
0271 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testCSCGeometryFromLocalDB_cfg.py >> GeometryValidation.log 
0272 cmsRun testCSCGeometryFromLocalDB_cfg.py > outLocalDB_CSC.log
0273 if ( -s outLocalDB_CSC.log ) then
0274     echo "CSC test from Local DB run ok" | tee -a GeometryValidation.log
0275 else
0276     echo "ERROR the output of CSC test from Local DB is empty" | tee -a GeometryValidation.log
0277     exit
0278 endif
0279 
0280 cp $CMSSW_BASE/src/Geometry/CSCGeometry/test/testCSCGeometry_cfg.py .
0281 sed -i "{s/GeometryExtended/${geometry}/}" testCSCGeometry_cfg.py >>  GeometryValidation.log
0282 sed -i "{/process.GlobalTag.globaltag/d}" testCSCGeometry_cfg.py >> GeometryValidation.log
0283 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testCSCGeometry_cfg.py >> GeometryValidation.log 
0284 cmsRun testCSCGeometry_cfg.py > outDDD_CSC.log
0285 if ( -s outDDD_CSC.log ) then
0286     echo "CSC test from DDD run ok" | tee -a GeometryValidation.log
0287 else
0288     echo "ERROR the output of CSC test from DDD is empty" | tee -a GeometryValidation.log
0289     exit
0290 endif
0291 
0292 diff --ignore-matching-lines='Geometry node for CSCGeom' outDB_CSC.log outDDD_CSC.log > logCSCDiffGTvsDDD.log
0293 if ( -s logCSCDiffGTvsDDD.log ) then
0294     echo "WARNING THE CSC RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND GT DB" | tee -a GeometryValidation.log
0295 endif
0296 
0297 diff --ignore-matching-lines='Geometry node for CSCGeom' outLocalDB_CSC.log outDDD_CSC.log > logCSCDiffLocalvsDDD.log
0298 if ( -s logCSCDiffLocalvsDDD.log ) then
0299     echo "WARNING THE CSC RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND LOCAL DB" | tee -a GeometryValidation.log
0300 endif
0301 
0302 diff --ignore-matching-lines='Geometry node for CSCGeom' outLocalDB_CSC.log outDB_CSC.log > logCSCDiffLocalvsGT.log
0303 if ( -s logCSCDiffLocalvsGT.log ) then
0304     echo "WARNING THE CSC RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0305 endif
0306 
0307 echo "End CSC RECO geometry validation" | tee -a GeometryValidation.log
0308 
0309 echo "Start RPC RECO geometry validation" | tee -a GeometryValidation.log
0310 
0311 cp $CMSSW_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryFromDB_cfg.py .  
0312 sed -i "{/process.GlobalTag.globaltag/d}" testRPCGeometryFromDB_cfg.py >> GeometryValidation.log
0313 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testRPCGeometryFromDB_cfg.py >> GeometryValidation.log 
0314 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testRPCGeometryFromDB_cfg.py >> GeometryValidation.log 
0315 cmsRun testRPCGeometryFromDB_cfg.py > outDB_RPC.log
0316 if ( -s outDB_RPC.log ) then
0317     echo "RPC test from GT DB run ok" | tee -a GeometryValidation.log
0318 else
0319     echo "ERROR the output of RPC test from GT DB is empty" | tee -a GeometryValidation.log
0320     exit
0321 endif
0322 
0323 cp $CMSSW_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryFromLocalDB_cfg.py .  
0324 sed -i "{/process.GlobalTag.globaltag/d}" testRPCGeometryFromLocalDB_cfg.py >> GeometryValidation.log
0325 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testRPCGeometryFromLocalDB_cfg.py >> GeometryValidation.log 
0326 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testRPCGeometryFromLocalDB_cfg.py >> GeometryValidation.log 
0327 cmsRun testRPCGeometryFromLocalDB_cfg.py > outLocalDB_RPC.log
0328 if ( -s outLocalDB_RPC.log ) then
0329     echo "RPC test from Local DB run ok" | tee -a GeometryValidation.log
0330 else
0331     echo "ERROR the output of RPC test from Local DB is empty" | tee -a GeometryValidation.log
0332     exit
0333 endif
0334 
0335 cp $CMSSW_BASE/src/Geometry/RPCGeometry/test/testRPCGeometry_cfg.py .
0336 sed -i "{s/GeometryExtended/${geometry}/}" testRPCGeometry_cfg.py >>  GeometryValidation.log
0337 sed -i "{/process.GlobalTag.globaltag/d}" testRPCGeometry_cfg.py >> GeometryValidation.log
0338 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testRPCGeometry_cfg.py >> GeometryValidation.log 
0339 cmsRun testRPCGeometry_cfg.py > outDDD_RPC.log
0340 if ( -s outDDD_RPC.log ) then
0341     echo "RPC test from DDD run ok" | tee -a GeometryValidation.log
0342 else
0343     echo "ERROR the output of RPC test from DDD is empty" | tee -a GeometryValidation.log
0344     exit
0345 endif
0346 
0347 diff --ignore-matching-lines='Geometry node for RPCGeom' outDB_RPC.log outDDD_RPC.log > logRPCDiffGTvsDDD.log
0348 if ( -s logRPCDiffGTvsDDD.log ) then
0349     echo "WARNING THE RPC RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND GT DB" | tee -a GeometryValidation.log
0350 endif
0351 
0352 diff --ignore-matching-lines='Geometry node for RPCGeom' outLocalDB_RPC.log outDDD_RPC.log > logRPCDiffLocalvsDDD.log
0353 if ( -s logRPCDiffLocalvsDDD.log ) then
0354     echo "WARNING THE RPC RECO GEOMETRY IS DIFFERENT BETWEEN DDD AND LOCAL DB" | tee -a GeometryValidation.log
0355 endif
0356 
0357 diff --ignore-matching-lines='Geometry node for RPCGeom' outLocalDB_RPC.log outDB_RPC.log > logRPCDiffLocalvsDB.log
0358 if ( -s logRPCDiffLocalvsDB.log ) then
0359     echo "WARNING THE RPC RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0360 endif
0361 
0362 echo "End RPC RECO geometry validation" | tee -a GeometryValidation.log
0363 
0364 echo "Start CALO RECO geometry validation" | tee -a GeometryValidation.log
0365 
0366 cp myfile.db $CMSSW_BASE/src/Geometry/CaloEventSetup/test/
0367 cd $CMSSW_BASE/src/Geometry/CaloEventSetup/
0368 cd data
0369 wget -i download.url
0370 cd ../test
0371 source setup.scr >> ${myDir}/GeometryValidation.log
0372 sed -i "{s/GeometryExtended/${geometry}/}" runTestCaloGeometryDDD_cfg.py >> ${myDir}/GeometryValidation.log
0373 sed -i "{/process.GlobalTag.globaltag/d}" runTestCaloGeometryDDD_cfg.py >> ${myDir}/GeometryValidation.log
0374 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" runTestCaloGeometryDDD_cfg.py >> ${myDir}/GeometryValidation.log 
0375 cmsRun runTestCaloGeometryDDD_cfg.py > GeometryCaloValidationDDD.log
0376 if ( -s GeometryCaloValidationDDD.log ) then
0377     echo "CALO test from DDD run ok" | tee -a ${myDir}/GeometryValidation.log
0378 else
0379     echo "ERROR the output of CALO test from DDD is empty" | tee -a ${myDir}/GeometryValidation.log
0380     exit
0381 endif
0382 
0383 sed -i "{/process.GlobalTag.globaltag/d}" runTestCaloGeometryDB_cfg.py >> ${myDir}/GeometryValidation.log
0384 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" runTestCaloGeometryDB_cfg.py >> ${myDir}/GeometryValidation.log 
0385 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" runTestCaloGeometryDB_cfg.py >> ${myDir}/GeometryValidation.log 
0386 cmsRun runTestCaloGeometryDB_cfg.py > GeometryCaloValidationDB.log
0387 if ( -s GeometryCaloValidationDB.log ) then
0388     echo "CALO test from GT DB run ok" | tee -a ${myDir}/GeometryValidation.log
0389 else
0390     echo "ERROR the output of CALO test from GT DB is empty" | tee -a ${myDir}/GeometryValidation.log
0391     exit
0392 endif
0393 
0394 sed -i "{/process.GlobalTag.globaltag/d}" runTestCaloGeometryLocalDB_cfg.py >> ${myDir}/GeometryValidation.log
0395 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" runTestCaloGeometryLocalDB_cfg.py >> ${myDir}/GeometryValidation.log 
0396 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" runTestCaloGeometryLocalDB_cfg.py >> ${myDir}/GeometryValidation.log 
0397 cmsRun runTestCaloGeometryLocalDB_cfg.py > GeometryCaloValidationLocal.log
0398 if ( -s GeometryCaloValidationLocal.log ) then
0399     echo "CALO Local test from Local DB run ok" | tee -a ${myDir}/GeometryValidation.log
0400 else
0401     echo "ERROR the output of CALO test from Local DB is empty" | tee -a ${myDir}/GeometryValidation.log
0402     exit
0403 endif
0404 cd ${myDir}
0405 
0406 less $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDDD.log | tee -a GeometryValidation.log
0407 less $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log | tee -a GeometryValidation.log
0408 less $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log | tee -a GeometryValidation.log
0409 
0410 grep 'BIG DISAGREEMENT FOUND' $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDDD.log > CALODDDError.log 
0411 grep 'BIG DISAGREEMENT FOUND' $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log > CALODBError.log 
0412 grep 'BIG DISAGREEMENT FOUND' $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log > CALOLocalError.log 
0413 
0414 rm -f $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDDD.log
0415 rm -f $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log
0416 rm -f $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log
0417 source $CMSSW_BASE/src/Geometry/CaloEventSetup/test/clean.scr
0418 
0419 if ( -s CALODDDError.log ) then                                                               
0420     echo "WARNING THE CALO GEOMETRY IS DIFFERENT BETWEEN DDD AND REF" | tee -a GeometryValidation.log                                                                                  
0421 endif                                                                                                      
0422 
0423 if ( -s CALODBError.log ) then                                                               
0424     echo "WARNING THE CALO GEOMETRY IS DIFFERENT BETWEEN GT DB AND REF" | tee -a GeometryValidation.log                                                                                  
0425 endif                                                                                                      
0426 
0427 if ( -s CALOLocalError.log ) then                                                               
0428     echo "WARNING THE CALO GEOMETRY IS DIFFERENT BETWEEN LOCAL DB AND REF" | tee -a GeometryValidation.log                                                                                  
0429 endif                                                                                                      
0430                                                                                               
0431 echo "End CALO RECO geometry validation" | tee -a GeometryValidation.log
0432 
0433 echo "Start Simulation geometry validation" | tee -a GeometryValidation.log
0434 
0435 # (MEC:2) see (MEC:1) Since the global tag versus the local database
0436 # blobs have been verified, it is possible to argue that 
0437 # there is really no reason to check those two blobs using this method.
0438 # However, in this test, the actual DDD is built and dumped for each 
0439 # of standard (STD, i.e. the list of smaller xml files), the "BIG" XML
0440 # File (BDB, i.e. the one prepped to become a blob), the local database
0441 # file blob (LocDB, after Big is loaded into the local database), and
0442 # the file blob that comes from the global tag that was provided to the 
0443 # script (GTDB, could be same or older version).
0444 
0445 if ( $geometry == "GeometryIdeal" ) then
0446     echo "Here I am " > readXML.expected
0447     echo "Top Most LogicalPart =cms:OCMS " >> readXML.expected
0448     echo " mat=materials:Air" >> readXML.expected
0449     echo " solid=cms:OCMS   Polycone_rrz: 0 6.28319 -27100 0 1000 -27000 0 1000 -27000 0 13000 27000 0 13000 27000 0 1000 27100 0 1000 " >> readXML.expected
0450     echo "After the GeoHistory in the output file dumpGeoHistoryOnRead you will see x, y, z, r11, r12, r13, r21, r22, r23, r31, r32, r33" >> readXML.expected
0451     echo "finished" >> readXML.expected
0452 else
0453     echo "Here I am " > readXML.expected
0454     echo "Top Most LogicalPart =cms:OCMS " >> readXML.expected
0455     echo " mat=materials:Air" >> readXML.expected
0456     echo " solid=cms:OCMS   Polycone_rrz: 0 6.28319 -450000 0 1000 -27000 0 1000 -27000 0 13000 27000 0 13000 27000 0 1000 450000 0 1000 " >> readXML.expected
0457     echo "After the GeoHistory in the output file dumpGeoHistoryOnRead you will see x, y, z, r11, r12, r13, r21, r22, r23, r31, r32, r33" >> readXML.expected
0458     echo "finished" >> readXML.expected
0459 endif
0460 
0461 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/readIdealAndDump.py .
0462 sed -i "{s/GeometryExtended/${geometry}/}" readIdealAndDump.py >>  GeometryValidation.log
0463 cmsRun readIdealAndDump.py > readXMLAndDump.log
0464 
0465 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testReadXMLFromGTDB.py .
0466 sed -i "{/process.GlobalTag.globaltag/d}" testReadXMLFromGTDB.py >> GeometryValidation.log
0467 sed -i "{/process.XMLFromDBSource.label/d}" testReadXMLFromGTDB.py >> GeometryValidation.log
0468 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testReadXMLFromGTDB.py >> GeometryValidation.log
0469 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testReadXMLFromGTDB.py >> GeometryValidation.log
0470 cmsRun testReadXMLFromGTDB.py > readXMLfromGTDB.log
0471 
0472 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testReadXMLFromDB.py .
0473 sed -i "{/process.GlobalTag.globaltag/d}" testReadXMLFromDB.py >> GeometryValidation.log
0474 sed -i "{/process.XMLFromDBSource.label/d}" testReadXMLFromDB.py >> GeometryValidation.log
0475 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.GlobalTag.globaltag = '${gtag}'" testReadXMLFromDB.py >> GeometryValidation.log
0476 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.XMLFromDBSource.label = cms.string('${condlabel}')" testReadXMLFromDB.py >> GeometryValidation.log
0477 cmsRun testReadXMLFromDB.py > readXMLfromLocDB.log
0478 
0479 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/readBigXMLAndDump.py .
0480 sed -i "{/,geomXMLFiles = cms.vstring('GeometryReaders\/XMLIdealGeometryESSource\/test\/fred.xml')/d}" readBigXMLAndDump.py >> GeometryValidation.log
0481 sed -i "/XMLIdealGeometryESSource/ a\\t\t,geomXMLFiles=cms.vstring('workArea\/fred.xml')" readBigXMLAndDump.py >>  GeometryValidation.log
0482 cmsRun readBigXMLAndDump.py > readBigXMLAndDump.log
0483 
0484 diff readXMLAndDump.log readXML.expected > diffreadXMLSTD.log
0485 diff readXMLfromGTDB.log readXML.expected > diffreadXMLGTDB.log
0486 diff readXMLfromLocDB.log readXML.expected > diffreadXMLLocDB.log
0487 diff readBigXMLAndDump.log readXML.expected > diffreadXMLBDB.log
0488 
0489 if ( -s diffreadXMLSTD.log ) then
0490     echo "ERROR THE MULTI-XML FILE GEOMETRY WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0491     exit
0492 else
0493     echo "GeometryFile dump from multiple XML files done."
0494 endif
0495 
0496 if ( -s diffreadXMLGTDB.log ) then
0497     echo "ERROR THE GLOBAL TAG DATABASE GEOMETRY WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0498     exit
0499 else
0500     echo "GeometryFile dump from global tag database done."
0501 endif
0502 
0503 if ( -s diffreadXMLLocDB.log ) then
0504     echo "ERROR THE LOCAL DATABASE GEOMETRY WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0505     exit
0506 else
0507     echo "GeometryFile dump from local database done."
0508 endif
0509 
0510 if ( -s diffreadXMLBDB.log ) then
0511     echo "ERROR THE BIG SINGLE XML FILE WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0512     exit
0513 else
0514     echo "GeometryFile dump from big single XML file done."
0515 endif
0516 
0517 #    ,dumpFile1 = cms.string("workarea/xml/dumpSTD")
0518 #    ,dumpFile2 = cms.string("workarea/db/dumpBDB")
0519 #dumpBDB                            dumpGTDB
0520 #dumpLocDB                          dumpSTD
0521 #>>> processing event # run: 1 lumi: 1 event: 1 time 1
0522 #>>> processed 1 events
0523 
0524 echo ">>> processing event # run: 1 lumi: 1 event: 1 time 1" >compDDdumperrors.expected
0525 echo ">>> processed 1 events" >>compDDdumperrors.expected
0526 
0527 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testCompareDumpFiles.py .
0528 sed -i "{/,dumpFile1 /d}" testCompareDumpFiles.py
0529 sed -i "{/,dumpFile2 /d}" testCompareDumpFiles.py
0530 sed -i "/TestCompareDDDumpFiles/ a\,dumpFile1=cms.string\('./dumpSTD'\)\,dumpFile2=cms.string\('./dumpBDB'\)" testCompareDumpFiles.py
0531 cmsRun testCompareDumpFiles.py > tcdfSTDvsBDB.log
0532 
0533 
0534 if (-s tcdfSTDvsBDB.log || -s diffcompSTDvsBDB.log ) then
0535     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN STD XML AND BIG SINGLE XML." | tee -a GeometryValidation.log
0536 endif
0537 
0538 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testCompareDumpFiles.py .
0539 sed -i "{/,dumpFile1 /d}" testCompareDumpFiles.py
0540 sed -i "{/,dumpFile2 /d}" testCompareDumpFiles.py
0541 sed -i "/TestCompareDDDumpFiles/ a\,dumpFile1=cms.string\('./dumpSTD'\)\,dumpFile2=cms.string\('./dumpLocDB'\)" testCompareDumpFiles.py
0542 cmsRun testCompareDumpFiles.py > tcdfSTDvsLocDB.log
0543 
0544 diff compDDdumperrors.log compDDdumperrors.expected > diffcompSTDvsLocDB.log
0545 if (-s tcdfSTDvsLocDB.log || -s diffcompSTDvsLocDB.log ) then
0546     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN STD XML AND LOCAL DATABASE BLOB." | tee -a GeometryValidation.log
0547 endif
0548 
0549 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testCompareDumpFiles.py .
0550 sed -i "{/,dumpFile1 /d}" testCompareDumpFiles.py
0551 sed -i "{/,dumpFile2 /d}" testCompareDumpFiles.py
0552 sed -i "/TestCompareDDDumpFiles/ a\,dumpFile1=cms.string\('./dumpSTD'\)\,dumpFile2=cms.string\('./dumpGTDB'\)" testCompareDumpFiles.py
0553 cmsRun testCompareDumpFiles.py > tcdfSTDvsGTDB.log
0554 
0555 diff compDDdumperrors.log compDDdumperrors.expected > diffcompSTDvsGTDB.log
0556 if (-s tcdfSTDvsGTDB.log || -s diffcompSTDvsGTDB.log ) then
0557     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN STD AND GLOBALTAG DATABASE BLOB." | tee -a GeometryValidation.log
0558 endif
0559 
0560 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testCompareDumpFiles.py .
0561 sed -i "{/,dumpFile1 /d}" testCompareDumpFiles.py
0562 sed -i "{/,dumpFile2 /d}" testCompareDumpFiles.py
0563 sed -i "/TestCompareDDDumpFiles/ a\,dumpFile1=cms.string\('./dumpBDB'\)\,dumpFile2=cms.string\('./dumpLocDB'\)" testCompareDumpFiles.py
0564 cmsRun testCompareDumpFiles.py > tcdfBDBvsLocDB.log
0565 
0566 diff compDDdumperrors.log compDDdumperrors.expected > diffcompBDBvsLocDB.log
0567 if (-s tcdfBDBvsLocDB.log || -s diffcompBDBvsLocDB.log ) then
0568     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN SINGLE BIG XML FILE AND LOCAL DATABASE BLOB." | tee -a GeometryValidation.log
0569 endif
0570 
0571 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testCompareDumpFiles.py .
0572 sed -i "{/,dumpFile1 /d}" testCompareDumpFiles.py
0573 sed -i "{/,dumpFile2 /d}" testCompareDumpFiles.py
0574 sed -i "/TestCompareDDDumpFiles/ a\,dumpFile1=cms.string\('./dumpBDB'\)\,dumpFile2=cms.string\('./dumpGTDB'\)" testCompareDumpFiles.py
0575 cmsRun testCompareDumpFiles.py > tcdfBDBvsGTDB.log
0576 
0577 diff compDDdumperrors.log compDDdumperrors.expected > diffcompBDBvsGTDB.log
0578 if (-s tcdfBDBvsGTDB.log || -s diffcompBDBvsGTDB.log ) then
0579     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN SINGLE BIG XML FILE AND GLOBALTAG DATABASE BLOB."  | tee -a GeometryValidation.log
0580 endif
0581 
0582 cp $CMSSW_BASE/src/GeometryReaders/XMLIdealGeometryESSource/test/testCompareDumpFiles.py .
0583 sed -i "{/,dumpFile1 /d}" testCompareDumpFiles.py
0584 sed -i "{/,dumpFile2 /d}" testCompareDumpFiles.py
0585 sed -i "/TestCompareDDDumpFiles/ a\,dumpFile1=cms.string\('./dumpLocDB'\)\,dumpFile2=cms.string\('./dumpGTDB'\)" testCompareDumpFiles.py
0586 cmsRun testCompareDumpFiles.py > tcdfLocDBvsGTDB.log
0587 
0588 diff compDDdumperrors.log compDDdumperrors.expected > diffcompLocDBvsGTDB.log
0589 if (-s tcdfBDBvsLocDB.log || -s diffcompLocDBvsGTDB.log ) then
0590     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN LOCAL AND GLOBALTAG DATABASE BLOBS."  | tee -a GeometryValidation.log
0591 endif
0592 
0593 echo "End Simulation geometry validation" | tee -a GeometryValidation.log