Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-14 22:36:28

0001 #! /bin/tcsh
0002 
0003 cmsenv
0004 
0005 echo " START Geometry Validation"
0006 
0007 # $1 is the Global Tag
0008 # $2 is the scenario, like "ExtendedGeometry2021". Omit "DD4hep".
0009 # $3 is "round" to round values in comparisons  to 0 if < |1.e7|.
0010 # Omit this option to show differences down to |1.e-23|.
0011 
0012 # Note this script only currently supports Run 3.
0013 # In future, it should be enhanced to support Runs 1-2 and Phase 2.
0014 
0015 set roundFlag = ''
0016 if ($#argv == 0) then
0017     set gtag="auto:upgrade2021"
0018     set geometry="ExtendedGeometry2021"
0019 else if($#argv == 1) then
0020     set gtag=`echo ${1}`
0021     set geometry="ExtendedGeometry2021"
0022 else if ($#argv == 2) then
0023     set gtag=`echo ${1}`
0024     set geometry=`echo ${2}`
0025 else if ($#argv == 3) then 
0026     set gtag=`echo ${1}`
0027     set geometry=`echo ${2}`
0028     set roundFlag = `echo ${3}`
0029 endif
0030 echo GlobalTag = ${gtag}
0031 echo geometry = ${geometry}
0032 echo roundFlag = ${roundFlag}
0033 
0034 set tolerance = '1.0e-7'
0035 # If rounding enabled, tolerance for numerical comparisons. Absolute values less than this are set to 0.
0036 
0037 #global tag gtag is assumed to be of the form GeometryWORD such as GeometryExtended or GeometryIdeal
0038 #as of 3.4.X loaded objects in the DB, these correspond to condlabels Extended, Ideal, etc...
0039 # Run 2 Extended condlabel corresponds to GeometryExtended2015 scenario. 
0040 set condlabel = `(echo $geometry | sed -e '{s/Geometry//g}' -e '{s/Plan//g}' -e '{s/[0-9]*//g}')`
0041 echo ${condlabel} " geometry label from db"
0042 
0043 set workArea = `(echo $geometry)`
0044 mkdir ${workArea}
0045 cd ${workArea}
0046 set myDir=`pwd`
0047 echo $myDir
0048 
0049 cp $CMSSW_RELEASE_BASE/src/CondTools/Geometry/test/writehelpers/geometryExtended2021DD4hep_xmlwriter.py geometryExtendedDD4hep_xmlwriter.py
0050 echo $geometry
0051 sed -i "{s/ExtendedGeometry2021/${geometry}/}" geometryExtendedDD4hep_xmlwriter.py >  GeometryValidation.log
0052 cmsRun geometryExtendedDD4hep_xmlwriter.py >>  GeometryValidation.log
0053 
0054 cp $CMSSW_RELEASE_BASE/src/CondTools/Geometry/test/writehelpers/geometryExtended2021DD4hep_writer.py .
0055 # cp $CMSSW_BASE/src/CondTools/Geometry/test/writehelpers/geometryExtended2021DD4hep_writer.py .
0056 # When more Reco writer configs are available, there should be a way to choose the correct version.
0057 # sed -i "{s/GeometryExtended/${geometry}/}" geometrywriter.py >>  GeometryValidation.log
0058 cmsRun geometryExtended2021DD4hep_writer.py >>  GeometryValidation.log
0059 if ( -e myfile.db ) then
0060     echo "The local DB file is present" | tee -a GeometryValidation.log
0061 else
0062     echo "ERROR the local DB file is not present" | tee -a GeometryValidation.log
0063     exit
0064 endif
0065 
0066 echo "Start compare the content of GT and the local DB" | tee -a GeometryValidation.log
0067 
0068 # (MEC:1) The following two tests with the diff below them actually make
0069 # sure that the Global Tag (GT) and Local DB XML file blobs are fine... 
0070 # meaning that the full simulation geometry source is fine (XML blob)
0071 # as well as the reco geometries.
0072 # cp $CMSSW_BASE/src/CondTools/Geometry/test/geometrytest_local.py .
0073 cp $CMSSW_RELEASE_BASE/src/CondTools/Geometry/test/geometrytest_local.py .
0074 sed -i "{/process.GlobalTag.globaltag/d}" geometrytest_local.py >> GeometryValidation.log
0075 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" geometrytest_local.py >> GeometryValidation.log
0076 set geomabbrev = `(echo $geometry | sed -e '{s/Geometry//g}')`
0077 sed -i "{s/Extended_TagXX/TagXX_${geomabbrev}_mc/}" geometrytest_local.py >>  GeometryValidation.log
0078 if ( "${roundFlag}" == round ) then                                                               
0079   sed -i "/roundValues/s/False/True/" geometrytest_local.py >> GeometryValidation.log
0080 endif
0081 
0082 cmsRun geometrytest_local.py > outLocalDB.log
0083 if ( -s outLocalDB.log ) then
0084     echo "Local DB access run ok" | tee -a GeometryValidation.log
0085 else
0086     echo "ERROR the output of Local DB access test is empty" | tee -a GeometryValidation.log
0087     exit
0088 endif
0089 
0090 cp $CMSSW_RELEASE_BASE/src/CondTools/Geometry/test/geometrytestDD4hep_db.py .
0091 # cp $CMSSW_BASE/src/CondTools/Geometry/test/geometrytestDD4hep_db.py .
0092 sed -i "{/process.GlobalTag.globaltag/d}" geometrytestDD4hep_db.py >> GeometryValidation.log 
0093 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" geometrytestDD4hep_db.py >> GeometryValidation.log
0094 sed -i "/FrontierConditions_GlobalTag_cff/ a\process.DDDetectorESProducerFromDB.label = cms.string('${condlabel}')" geometrytestDD4hep_db.py >> GeometryValidation.log 
0095 if ( "${roundFlag}" == round ) then                                                               
0096   sed -i "/roundValues/s/False/True/" geometrytestDD4hep_db.py >> GeometryValidation.log
0097 endif
0098 cmsRun geometrytestDD4hep_db.py > outGTDB.log
0099 if ( -s outGTDB.log ) then
0100     echo "GT DB access run ok" | tee -a GeometryValidation.log
0101 else
0102     echo "ERROR the output of GT DB access test is empty" | tee -a GeometryValidation.log
0103     exit
0104 endif
0105 
0106 diff outLocalDB.log outGTDB.log > logDiffLocalvsGT.log
0107 if ( -s logDiffLocalvsGT.log ) then
0108     echo "WARNING THE CONTENT OF GLOBAL TAG MAY BE DIFFERENT WITH RESPECT TO THE LOCAL DB FILE" | tee -a GeometryValidation.log
0109     cp $CMSSW_BASE/src/Validation/Geometry/test/dddvsdb/sortXML.sh .
0110     cp $CMSSW_BASE/src/Validation/Geometry/test/dddvsdb/sortCompositeMaterials.py .
0111     ./sortXML.sh outLocalDB.log localdb.xml
0112     ./sortXML.sh outGTDB.log gtdb.xml
0113     diff localdb.xml gtdb.xml > logDiffLocXMLvsGTXML.log
0114     sort  localdb.xml > localdb.sort
0115     sort gtdb.xml > gtdb.sort
0116     diff localdb.sort gtdb.sort > logDiffLocvsGTSort.log
0117     echo Examine logDiffLocXMLvsGTXML.log to see the differences in the local and GT XML files. | tee -a GeometryValidation.log
0118     echo Examine logDiffLocvsGTSort.log to see the differences in sorted content of the local and GT XML files. | tee -a GeometryValidation.log
0119     echo The two XML files may have real differences, or they may have identical content that is simply re-arranged. | tee -a GeometryValidation.log
0120     echo Examining these log files can help you determine whether the XML files have significant differences. | tee -a GeometryValidation.log
0121 endif
0122 
0123 echo "End compare the content of GT and the local DB" | tee -a GeometryValidation.log
0124 
0125 echo "Start Tracker RECO geometry validation" | tee -a GeometryValidation.log
0126 
0127 mkdir tkdb
0128 mkdir tkdblocal
0129 mkdir tkxml
0130 
0131 cp myfile.db tkdblocal
0132 
0133 cd tkdb
0134 # cp $CMSSW_BASE/src/Geometry/TrackerGeometryBuilder/test/python/testTrackerModuleInfoDBDD4hep_cfg.py .
0135 cp $CMSSW_RELEASE_BASE/src/Geometry/TrackerGeometryBuilder/test/python/testTrackerModuleInfoDBDD4hep_cfg.py .
0136 sed -i "{/process.GlobalTag.globaltag/d}" testTrackerModuleInfoDBDD4hep_cfg.py >> ../GeometryValidation.log
0137 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testTrackerModuleInfoDBDD4hep_cfg.py >> ../GeometryValidation.log 
0138 if ( "${roundFlag}" == round ) then                                                               
0139   sed -i "/tolerance/s/1.0e-23/${tolerance}/" testTrackerModuleInfoDBDD4hep_cfg.py >> GeometryValidation.log
0140 endif
0141 cmsRun testTrackerModuleInfoDBDD4hep_cfg.py >> ../GeometryValidation.log
0142 mv testTrackerModuleInfoDBDD4hep_cfg.py ../
0143 if ( -s ModuleInfo.log ) then
0144     echo "TK test from DB run ok" | tee -a ../GeometryValidation.log
0145 else
0146     echo "ERROR the output of TK test from DB is empty" | tee -a ../GeometryValidation.log
0147     exit
0148 endif
0149 
0150 cd ../tkdblocal
0151 cp $CMSSW_RELEASE_BASE/src/Geometry/TrackerGeometryBuilder/test/python/trackerModuleInfoLocalDBDD4hep_cfg.py .
0152 # cp $CMSSW_BASE/src/Geometry/TrackerGeometryBuilder/test/python/trackerModuleInfoLocalDBDD4hep_cfg.py .
0153 sed -i "{/process.GlobalTag.globaltag/d}" trackerModuleInfoLocalDBDD4hep_cfg.py >> ../GeometryValidation.log
0154 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" trackerModuleInfoLocalDBDD4hep_cfg.py >> ../GeometryValidation.log 
0155 if ( "${roundFlag}" == round ) then                                                               
0156   sed -i "/tolerance/s/1.0e-23/${tolerance}/" trackerModuleInfoLocalDBDD4hep_cfg.py >> GeometryValidation.log
0157 endif
0158 sed -i "{s/Extended2021/${geomabbrev}/}" trackerModuleInfoLocalDBDD4hep_cfg.py >>  GeometryValidation.log
0159 cmsRun trackerModuleInfoLocalDBDD4hep_cfg.py >> ../GeometryValidation.log
0160 mv trackerModuleInfoLocalDBDD4hep_cfg.py ../
0161 if ( -s ModuleInfo.log ) then
0162     echo "TK test from Local DB run ok" | tee -a ../GeometryValidation.log
0163 else
0164     echo "ERROR the output of TK test from Local DB is empty" | tee -a ../GeometryValidation.log
0165     exit
0166 endif
0167 
0168 cd ../tkxml
0169 # cp $CMSSW_BASE/src/Geometry/TrackerGeometryBuilder/test/python/testTrackerModuleInfoDD4hep_cfg.py .
0170 cp $CMSSW_RELEASE_BASE/src/Geometry/TrackerGeometryBuilder/test/python/testTrackerModuleInfoDD4hep_cfg.py .
0171 sed -i "{s/Extended2021/${geomabbrev}/}" testTrackerModuleInfoDD4hep_cfg.py >>  GeometryValidation.log
0172 sed -i "{/process.GlobalTag.globaltag/d}" testTrackerModuleInfoDD4hep_cfg.py >> ../GeometryValidation.log
0173 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testTrackerModuleInfoDD4hep_cfg.py >> ../GeometryValidation.log 
0174 if ( "${roundFlag}" == round ) then                                                               
0175   sed -i "/tolerance/s/1.0e-23/${tolerance}/" testTrackerModuleInfoDD4hep_cfg.py >> GeometryValidation.log
0176 endif
0177 cmsRun testTrackerModuleInfoDD4hep_cfg.py >> ../GeometryValidation.log
0178 mv testTrackerModuleInfoDD4hep_cfg.py ../
0179 if ( -s ModuleInfo.log ) then
0180     echo "TK test from DD4hep XML run ok" | tee -a ../GeometryValidation.log
0181 else
0182     echo "ERROR the output of TK test from DD4hep XML is empty" | tee -a ../GeometryValidation.log
0183     exit
0184 endif
0185 
0186 cd ../
0187 rm -f tkdblocal/myfile.db
0188 diff -r tkdb/ tkxml/ > logTkDiffGTvsXML.log
0189 if ( -s logTkDiffGTvsXML.log ) then
0190     echo "WARNING THE TRACKER RECO GEOMETRY IS DIFFERENT BETWEEN XML AND GT DB" | tee -a GeometryValidation.log
0191 endif
0192 
0193 diff -r tkdblocal/ tkxml/ > logTkDiffLocalvsXML.log
0194 if ( -s logTkDiffLocalvsXML.log ) then
0195     echo "WARNING THE TRACKER RECO GEOMETRY IS DIFFERENT BETWEEN XML AND LOCAL DB" | tee -a GeometryValidation.log
0196 endif
0197 
0198 diff -r tkdb/ tkdblocal/ > logTkDiffGTvsLocal.log
0199 if ( -s logTkDiffGTvsLocal.log ) then
0200     echo "WARNING THE TRACKER RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0201 endif
0202 
0203 echo "End Tracker RECO geometry validation" | tee -a GeometryValidation.log
0204 
0205 echo "Start DT RECO geometry validation" | tee -a GeometryValidation.log
0206 
0207 # cp $CMSSW_BASE/src/Geometry/DTGeometry/test/testDTGeometryFromDBDD4hep_cfg.py .
0208 cp $CMSSW_RELEASE_BASE/src/Geometry/DTGeometry/test/testDTGeometryFromDBDD4hep_cfg.py .
0209 sed -i "{/process.GlobalTag.globaltag/d}" testDTGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log
0210 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testDTGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log 
0211 if ( "${roundFlag}" == round ) then                                                               
0212   sed -i "/tolerance/s/1.0e-23/${tolerance}/" testDTGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log
0213 endif
0214 cmsRun testDTGeometryFromDBDD4hep_cfg.py > outDB_DT.log
0215 if ( -s outDB_DT.log ) then
0216     echo "DT test from DB run ok" | tee -a GeometryValidation.log
0217 else
0218     echo "ERROR the output of DT test from DB is empty" | tee -a GeometryValidation.log
0219     exit
0220 endif
0221 
0222 # cp $CMSSW_BASE/src/Geometry/DTGeometry/test/testDTGeometryFromLocalDBDD4hep_cfg.py .
0223 cp $CMSSW_RELEASE_BASE/src/Geometry/DTGeometry/test/testDTGeometryFromLocalDBDD4hep_cfg.py .
0224 sed -i "{s/Extended2021/${geomabbrev}/}" testDTGeometryFromLocalDBDD4hep_cfg.py >>  GeometryValidation.log
0225 sed -i "{/process.GlobalTag.globaltag/d}" testDTGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log
0226 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testDTGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log 
0227 if ( "${roundFlag}" == round ) then                                                               
0228   sed -i "/tolerance/s/1.0e-23/${tolerance}/" testDTGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log
0229 endif
0230 cmsRun testDTGeometryFromLocalDBDD4hep_cfg.py > outLocalDB_DT.log
0231 if ( -s outDB_DT.log ) then
0232     echo "DT test from Local DB run ok" | tee -a GeometryValidation.log
0233 else
0234     echo "ERROR the output of DT test from Local DB is empty" | tee -a GeometryValidation.log
0235     exit
0236 endif
0237 
0238 # cp $CMSSW_BASE/src/Geometry/DTGeometry/test/testDTGeometryDD4hep_cfg.py .
0239 cp $CMSSW_RELEASE_BASE/src/Geometry/DTGeometry/test/testDTGeometryDD4hep_cfg.py .
0240 sed -i "{s/Extended2021/${geomabbrev}/}" testDTGeometryDD4hep_cfg.py >>  GeometryValidation.log
0241 sed -i "{/process.GlobalTag.globaltag/d}" testDTGeometryDD4hep_cfg.py >> GeometryValidation.log
0242 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testDTGeometryDD4hep_cfg.py >> GeometryValidation.log 
0243 if ( "${roundFlag}" == round ) then                                                               
0244   sed -i "/tolerance/s/1.0e-23/${tolerance}/" testDTGeometryDD4hep_cfg.py >> GeometryValidation.log
0245 endif
0246 cmsRun testDTGeometryDD4hep_cfg.py > outXML_DT.log
0247 if ( -s outXML_DT.log ) then
0248     echo "DT test from XML run ok" | tee -a GeometryValidation.log
0249 else
0250     echo "ERROR the output of DT test from XML is empty" | tee -a GeometryValidation.log
0251     exit
0252 endif
0253 
0254 diff --ignore-matching-lines='Geometry node for DTGeom' outDB_DT.log outXML_DT.log > logDTDiffGTvsXML.log
0255 if ( -s logDTDiffGTvsXML.log ) then
0256     echo "WARNING THE DT RECO GEOMETRY IS DIFFERENT BETWEEN XML AND GT DB" | tee -a GeometryValidation.log
0257 endif
0258 
0259 diff --ignore-matching-lines='Geometry node for DTGeom' outLocalDB_DT.log outXML_DT.log > logDTDiffLocalvsXML.log
0260 if ( -s logDTDiffLocalvsXML.log ) then
0261     echo "WARNING THE DT RECO GEOMETRY IS DIFFERENT BETWEEN XML AND LOCAL DB" | tee -a GeometryValidation.log
0262 endif
0263 
0264 diff --ignore-matching-lines='Geometry node for DTGeom' outDB_DT.log outLocalDB_DT.log > logDTDiffGTvsLocal.log
0265 if ( -s logDTDiffGTvsLocal.log ) then
0266     echo "WARNING THE DT RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND  LOCAL DB" | tee -a GeometryValidation.log
0267 endif
0268 
0269 echo "End DT RECO geometry validation" | tee -a GeometryValidation.log
0270 
0271 echo "Start CSC RECO geometry validation" | tee -a GeometryValidation.log
0272 
0273 cp $CMSSW_RELEASE_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryFromDBDD4hep_cfg.py .
0274 # cp $CMSSW_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryFromDBDD4hep_cfg.py .
0275 sed -i "{/process.GlobalTag.globaltag/d}" testCSCGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log
0276 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testCSCGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log 
0277 cmsRun testCSCGeometryFromDBDD4hep_cfg.py > outDB_CSC.log
0278 if ( -s outDB_CSC.log ) then
0279     echo "CSC test from GT DB run ok" | tee -a GeometryValidation.log
0280 else
0281     echo "ERROR the output of CSC test from GT DB is empty" | tee -a GeometryValidation.log
0282     exit
0283 endif
0284 
0285 cp $CMSSW_RELEASE_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryFromLocalDBDD4hep_cfg.py .
0286 # cp $CMSSW_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryFromLocalDBDD4hep_cfg.py .
0287 sed -i "{/process.GlobalTag.globaltag/d}" testCSCGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log
0288 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testCSCGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log 
0289 cmsRun testCSCGeometryFromLocalDBDD4hep_cfg.py > outLocalDB_CSC.log
0290 if ( -s outLocalDB_CSC.log ) then
0291     echo "CSC test from Local DB run ok" | tee -a GeometryValidation.log
0292 else
0293     echo "ERROR the output of CSC test from Local DB is empty" | tee -a GeometryValidation.log
0294     exit
0295 endif
0296 
0297 cp $CMSSW_RELEASE_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryDD4hep_cfg.py .
0298 # cp $CMSSW_BASE/src/Geometry/CSCGeometry/test/testCSCGeometryDD4hep_cfg.py .
0299 sed -i "{s/GeometryExtended/${geometry}/}" testCSCGeometryDD4hep_cfg.py >>  GeometryValidation.log
0300 sed -i "{/process.GlobalTag.globaltag/d}" testCSCGeometryDD4hep_cfg.py >> GeometryValidation.log
0301 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testCSCGeometryDD4hep_cfg.py >> GeometryValidation.log 
0302 cmsRun testCSCGeometryDD4hep_cfg.py > outXML_CSC.log
0303 if ( -s outXML_CSC.log ) then
0304     echo "CSC test from XML run ok" | tee -a GeometryValidation.log
0305 else
0306     echo "ERROR the output of CSC test from XML is empty" | tee -a GeometryValidation.log
0307     exit
0308 endif
0309 
0310 diff --ignore-matching-lines='Geometry node for CSCGeom' outDB_CSC.log outXML_CSC.log > logCSCDiffGTvsXML.log
0311 if ( -s logCSCDiffGTvsXML.log ) then
0312     echo "WARNING THE CSC RECO GEOMETRY IS DIFFERENT BETWEEN XML AND GT DB" | tee -a GeometryValidation.log
0313 endif
0314 
0315 diff --ignore-matching-lines='Geometry node for CSCGeom' outLocalDB_CSC.log outXML_CSC.log > logCSCDiffLocalvsXML.log
0316 if ( -s logCSCDiffLocalvsXML.log ) then
0317     echo "WARNING THE CSC RECO GEOMETRY IS DIFFERENT BETWEEN XML AND LOCAL DB" | tee -a GeometryValidation.log
0318 endif
0319 
0320 diff --ignore-matching-lines='Geometry node for CSCGeom' outLocalDB_CSC.log outDB_CSC.log > logCSCDiffLocalvsGT.log
0321 if ( -s logCSCDiffLocalvsGT.log ) then
0322     echo "WARNING THE CSC RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0323 endif
0324 
0325 echo "End CSC RECO geometry validation" | tee -a GeometryValidation.log
0326 
0327 echo "Start RPC RECO geometry validation" | tee -a GeometryValidation.log
0328 
0329 # cp $CMSSW_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryFromDBDD4hep_cfg.py .
0330 cp $CMSSW_RELEASE_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryFromDBDD4hep_cfg.py .
0331 sed -i "{/process.GlobalTag.globaltag/d}" testRPCGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log
0332 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testRPCGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log 
0333 cmsRun testRPCGeometryFromDBDD4hep_cfg.py > outDB_RPC.log
0334 if ( -s outDB_RPC.log ) then
0335     echo "RPC test from GT DB run ok" | tee -a GeometryValidation.log
0336 else
0337     echo "ERROR the output of RPC test from GT DB is empty" | tee -a GeometryValidation.log
0338     exit
0339 endif
0340 
0341 # cp $CMSSW_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryFromLocalDBDD4hep_cfg.py .
0342 cp $CMSSW_RELEASE_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryFromLocalDBDD4hep_cfg.py .
0343 sed -i "{/process.GlobalTag.globaltag/d}" testRPCGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log
0344 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testRPCGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log 
0345 cmsRun testRPCGeometryFromLocalDBDD4hep_cfg.py > outLocalDB_RPC.log
0346 if ( -s outLocalDB_RPC.log ) then
0347     echo "RPC test from Local DB run ok" | tee -a GeometryValidation.log
0348 else
0349     echo "ERROR the output of RPC test from Local DB is empty" | tee -a GeometryValidation.log
0350     exit
0351 endif
0352 
0353 # cp $CMSSW_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryDD4hep_cfg.py .
0354 cp $CMSSW_RELEASE_BASE/src/Geometry/RPCGeometry/test/testRPCGeometryDD4hep_cfg.py .
0355 sed -i "{s/GeometryExtended/${geometry}/}" testRPCGeometryDD4hep_cfg.py >>  GeometryValidation.log
0356 sed -i "{/process.GlobalTag.globaltag/d}" testRPCGeometryDD4hep_cfg.py >> GeometryValidation.log
0357 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testRPCGeometryDD4hep_cfg.py >> GeometryValidation.log 
0358 cmsRun testRPCGeometryDD4hep_cfg.py > outXML_RPC.log
0359 if ( -s outXML_RPC.log ) then
0360     echo "RPC test from XML run ok" | tee -a GeometryValidation.log
0361 else
0362     echo "ERROR the output of RPC test from XML is empty" | tee -a GeometryValidation.log
0363     exit
0364 endif
0365 
0366 diff --ignore-matching-lines='Geometry node for RPCGeom' outDB_RPC.log outXML_RPC.log > logRPCDiffGTvsXML.log
0367 if ( -s logRPCDiffGTvsXML.log ) then
0368     echo "WARNING THE RPC RECO GEOMETRY IS DIFFERENT BETWEEN XML AND GT DB" | tee -a GeometryValidation.log
0369 endif
0370 
0371 diff --ignore-matching-lines='Geometry node for RPCGeom' outLocalDB_RPC.log outXML_RPC.log > logRPCDiffLocalvsXML.log
0372 if ( -s logRPCDiffLocalvsXML.log ) then
0373     echo "WARNING THE RPC RECO GEOMETRY IS DIFFERENT BETWEEN XML AND LOCAL DB" | tee -a GeometryValidation.log
0374 endif
0375 
0376 diff --ignore-matching-lines='Geometry node for RPCGeom' outLocalDB_RPC.log outDB_RPC.log > logRPCDiffLocalvsDB.log
0377 if ( -s logRPCDiffLocalvsDB.log ) then
0378     echo "WARNING THE RPC RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0379 endif
0380 
0381 echo "End RPC RECO geometry validation" | tee -a GeometryValidation.log
0382 
0383 echo "Start GEM RECO geometry validation" | tee -a GeometryValidation.log
0384 
0385 # cp $CMSSW_BASE/src/Geometry/GEMGeometry/test/testGEMGeometryFromDBDD4hep_cfg.py .
0386 cp $CMSSW_RELEASE_BASE/src/Geometry/GEMGeometry/test/testGEMGeometryFromDBDD4hep_cfg.py .
0387 sed -i "{/process.GlobalTag.globaltag/d}" testGEMGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log
0388 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testGEMGeometryFromDBDD4hep_cfg.py >> GeometryValidation.log 
0389 cmsRun testGEMGeometryFromDBDD4hep_cfg.py
0390 mv GEMtestOutput.out outDB_GEM.log
0391 if ( -s outDB_GEM.log ) then
0392     echo "GEM test from GT DB run ok" | tee -a GeometryValidation.log
0393 else
0394     echo "ERROR the output of GEM test from GT DB is empty" | tee -a GeometryValidation.log
0395     exit
0396 endif
0397 
0398 cp $CMSSW_RELEASE_BASE/src/Geometry/GEMGeometry/test/testGEMGeometryFromLocalDBDD4hep_cfg.py .
0399 # cp $CMSSW_BASE/src/Geometry/GEMGeometry/test/testGEMGeometryFromLocalDBDD4hep_cfg.py .
0400 sed -i "{/process.GlobalTag.globaltag/d}" testGEMGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log
0401 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testGEMGeometryFromLocalDBDD4hep_cfg.py >> GeometryValidation.log 
0402 cmsRun testGEMGeometryFromLocalDBDD4hep_cfg.py
0403 mv GEMtestOutput.out outLocalDB_GEM.log
0404 if ( -s outLocalDB_GEM.log ) then
0405     echo "GEM test from Local DB run ok" | tee -a GeometryValidation.log
0406 else
0407     echo "ERROR the output of GEM test from Local DB is empty" | tee -a GeometryValidation.log
0408     exit
0409 endif
0410 
0411 cp $CMSSW_RELEASE_BASE/src/Geometry/GEMGeometry/test/testGEMGeometryDD4hep_cfg.py .
0412 # cp $CMSSW_BASE/src/Geometry/GEMGeometry/test/testGEMGeometryDD4hep_cfg.py .
0413 sed -i "{s/GeometryExtended/${geometry}/}" testGEMGeometryDD4hep_cfg.py >>  GeometryValidation.log
0414 sed -i "{/process.GlobalTag/d}" testGEMGeometryDD4hep_cfg.py >> GeometryValidation.log
0415 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testGEMGeometryDD4hep_cfg.py >> GeometryValidation.log 
0416 cmsRun testGEMGeometryDD4hep_cfg.py
0417 mv GEMtestOutput.out outXML_GEM.log
0418 if ( -s outXML_GEM.log ) then
0419     echo "GEM test from XML run ok" | tee -a GeometryValidation.log
0420 else
0421     echo "ERROR the output of GEM test from XML is empty" | tee -a GeometryValidation.log
0422     exit
0423 endif
0424 
0425 diff --ignore-matching-lines='Geometry node for GEMGeom' outDB_GEM.log outXML_GEM.log > logGEMDiffGTvsXML.log
0426 if ( -s logGEMDiffGTvsXML.log ) then
0427     echo "WARNING THE GEM RECO GEOMETRY IS DIFFERENT BETWEEN XML AND GT DB" | tee -a GeometryValidation.log
0428 endif
0429 
0430 diff --ignore-matching-lines='Geometry node for GEMGeom' outLocalDB_GEM.log outXML_GEM.log > logGEMDiffLocalvsXML.log
0431 if ( -s logGEMDiffLocalvsXML.log ) then
0432     echo "WARNING THE GEM RECO GEOMETRY IS DIFFERENT BETWEEN XML AND LOCAL DB" | tee -a GeometryValidation.log
0433 endif
0434 
0435 diff --ignore-matching-lines='Geometry node for GEMGeom' outLocalDB_GEM.log outDB_GEM.log > logGEMDiffLocalvsDB.log
0436 if ( -s logGEMDiffLocalvsDB.log ) then
0437     echo "WARNING THE GEM RECO GEOMETRY IS DIFFERENT BETWEEN GT DB AND LOCAL DB" | tee -a GeometryValidation.log
0438 endif
0439 
0440 echo "End GEM RECO geometry validation" | tee -a GeometryValidation.log
0441 
0442 echo "Start CALO RECO geometry validation" | tee -a GeometryValidation.log
0443 
0444 cp myfile.db $CMSSW_BASE/src/Geometry/CaloEventSetup/test/
0445 cd $CMSSW_BASE/src/Geometry/CaloEventSetup/
0446 cd data
0447 # wget -i download.url
0448 # wget commented out -- use files in "data" directory instead
0449 cd ../test
0450 source setup.scr >> ${myDir}/GeometryValidation.log
0451 cp runTestCaloGeometryDD4hep_cfg.py ${myDir}/runTestCaloGeometryDD4hep_cfg.py
0452 sed -i "{s/Extended2021/${geomabbrev}/}" ${myDir}/runTestCaloGeometryDD4hep_cfg.py >> ${myDir}/GeometryValidation.log
0453 cmsRun ${myDir}/runTestCaloGeometryDD4hep_cfg.py > GeometryCaloValidationXML.log
0454 if ( -s GeometryCaloValidationXML.log ) then
0455     echo "CALO test from XML run ok" | tee -a ${myDir}/GeometryValidation.log
0456 else
0457     echo "ERROR the output of CALO test from XML is empty" | tee -a ${myDir}/GeometryValidation.log
0458     exit
0459 endif
0460 
0461 cp runTestCaloGeometryDBDD4hep_cfg.py ${myDir}/runTestCaloGeometryDBDD4hep_cfg.py
0462 sed -i "s/auto:upgrade2021/${gtag}/" ${myDir}/runTestCaloGeometryDBDD4hep_cfg.py >> ${myDir}/GeometryValidation.log 
0463 cmsRun ${myDir}/runTestCaloGeometryDBDD4hep_cfg.py > GeometryCaloValidationDB.log
0464 if ( -s GeometryCaloValidationDB.log ) then
0465     echo "CALO test from GT DB run ok" | tee -a ${myDir}/GeometryValidation.log
0466 else
0467     echo "ERROR the output of CALO test from GT DB is empty" | tee -a ${myDir}/GeometryValidation.log
0468     exit
0469 endif
0470 
0471 cp runTestCaloGeometryLocalDBDD4hep_cfg.py ${myDir}/runTestCaloGeometryLocalDBDD4hep_cfg.py
0472 sed -i "s/auto:upgrade2021/${gtag}/" ${myDir}/runTestCaloGeometryLocalDBDD4hep_cfg.py >> ${myDir}/GeometryValidation.log 
0473 cmsRun ${myDir}/runTestCaloGeometryLocalDBDD4hep_cfg.py > GeometryCaloValidationLocal.log
0474 if ( -s GeometryCaloValidationLocal.log ) then
0475     echo "CALO Local test from Local DB run ok" | tee -a ${myDir}/GeometryValidation.log
0476 else
0477     echo "ERROR the output of CALO test from Local DB is empty" | tee -a ${myDir}/GeometryValidation.log
0478     exit
0479 endif
0480 source clean.scr >> ${myDir}/GeometryValidation.log
0481 rm myfile.db
0482 cd ${myDir}
0483 
0484 grep SUCCEED $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationXML.log >> GeometryValidation.log
0485 grep SUCCEED $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log >> GeometryValidation.log
0486 grep SUCCEED $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log >> GeometryValidation.log
0487 cp $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationXML.log .
0488 cp $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log .
0489 cp $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log .
0490 
0491 grep 'BIG DISAGREEMENT FOUND' $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationXML.log > CALOXMLError.log 
0492 grep 'BIG DISAGREEMENT FOUND' $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log > CALODBError.log 
0493 grep 'BIG DISAGREEMENT FOUND' $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log > CALOLocalError.log 
0494 
0495 rm -f $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationXML.log
0496 rm -f $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationDB.log
0497 rm -f $CMSSW_BASE/src/Geometry/CaloEventSetup/test/GeometryCaloValidationLocal.log
0498 
0499 if ( -s CALOXMLError.log ) then                                                               
0500     echo "WARNING THE CALO GEOMETRY IS DIFFERENT BETWEEN XML AND REF" | tee -a GeometryValidation.log                                                                                  
0501 endif                                                                                                      
0502 
0503 if ( -s CALODBError.log ) then                                                               
0504     echo "WARNING THE CALO GEOMETRY IS DIFFERENT BETWEEN GT DB AND REF" | tee -a GeometryValidation.log                                                                                  
0505 endif                                                                                                      
0506 
0507 if ( -s CALOLocalError.log ) then                                                               
0508     echo "WARNING THE CALO GEOMETRY IS DIFFERENT BETWEEN LOCAL DB AND REF" | tee -a GeometryValidation.log                                                                                  
0509 endif                                                                                                      
0510                                                                                               
0511 echo "End CALO RECO geometry validation" | tee -a GeometryValidation.log
0512 
0513 echo "Start Simulation geometry validation" | tee -a GeometryValidation.log
0514 
0515 cp $CMSSW_RELEASE_BASE/src/SimG4Core/PrintGeomInfo/test/python/runDD4hepXML_cfg.py .
0516 # cp $CMSSW_BASE/src/SimG4Core/PrintGeomInfo/test/python/runDD4hepXML_cfg.py .
0517 sed -i "{s/Extended2021/${geomabbrev}/}" runDD4hepXML_cfg.py >>  GeometryValidation.log
0518 sed -i "{s/DumpSummary      = cms.untracked.bool(True/DumpSummary      = cms.untracked.bool(False/}" runDD4hepXML_cfg.py >>  GeometryValidation.log
0519 sed -i "{s/DumpSense      = cms.untracked.bool(False/DumpSense      = cms.untracked.bool(True/}" runDD4hepXML_cfg.py >>  GeometryValidation.log
0520 sed -i "{s/DumpParams      = cms.untracked.bool(False/DumpParams      = cms.untracked.bool(True/}" runDD4hepXML_cfg.py >>  GeometryValidation.log
0521 sed -i "{/MaterialFileName/d}" runDD4hepXML_cfg.py >> GeometryValidation.log
0522 sed -i "{/SolidFileName/d}" runDD4hepXML_cfg.py >> GeometryValidation.log
0523 sed -i "{/LVFileName/d}" runDD4hepXML_cfg.py >> GeometryValidation.log
0524 sed -i "{/PVFileName/d}" runDD4hepXML_cfg.py >> GeometryValidation.log
0525 sed -i "{/TouchFileName/d}" runDD4hepXML_cfg.py >> GeometryValidation.log
0526 ( cmsRun runDD4hepXML_cfg.py > readXMLAndDump.log ) >>& GeometryValidation.log
0527 
0528 cp $CMSSW_RELEASE_BASE/src/SimG4Core/PrintGeomInfo/test/python/runDD4hepDB_cfg.py .
0529 # cp $CMSSW_BASE/src/SimG4Core/PrintGeomInfo/test/python/runDD4hepDB_cfg.py .
0530 sed -i "{s/Extended2021/${geomabbrev}/}" runDD4hepDB_cfg.py >>  GeometryValidation.log
0531 sed -i "{s/DumpSummary      = cms.untracked.bool(True/DumpSummary      = cms.untracked.bool(False/}" runDD4hepDB_cfg.py >>  GeometryValidation.log
0532 sed -i "{s/DumpSense      = cms.untracked.bool(False/DumpSense      = cms.untracked.bool(True/}" runDD4hepDB_cfg.py >>  GeometryValidation.log
0533 sed -i "{s/DumpParams      = cms.untracked.bool(False/DumpParams      = cms.untracked.bool(True/}" runDD4hepDB_cfg.py >>  GeometryValidation.log
0534 sed -i "{/MaterialFileName/d}" runDD4hepDB_cfg.py >> GeometryValidation.log
0535 sed -i "{/SolidFileName/d}" runDD4hepDB_cfg.py >> GeometryValidation.log
0536 sed -i "{/LVFileName/d}" runDD4hepDB_cfg.py >> GeometryValidation.log
0537 sed -i "{/PVFileName/d}" runDD4hepDB_cfg.py >> GeometryValidation.log
0538 sed -i "{/TouchFileName/d}" runDD4hepDB_cfg.py >> GeometryValidation.log
0539 sed -i "{/process.GlobalTag.globaltag/d}" runDD4hepDB_cfg.py >> GeometryValidation.log
0540 sed -i "/from Configuration.AlCa.GlobalTag/ a\process.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" runDD4hepDB_cfg.py >> GeometryValidation.log
0541 ( cmsRun runDD4hepDB_cfg.py > readXMLfromGTDB.log) >& /dev/null
0542 
0543 cp $CMSSW_RELEASE_BASE/src/SimG4Core/PrintGeomInfo/test/python/runDD4hepLocalDB_cfg.py .
0544 # cp $CMSSW_BASE/src/SimG4Core/PrintGeomInfo/test/python/runDD4hepLocalDB_cfg.py .
0545 ( cmsRun runDD4hepLocalDB_cfg.py > readXMLfromLocDB.log ) >>& GeometryValidation.log
0546 
0547 if ( ! -s readXMLAndDump.log ) then
0548     echo "ERROR THE MULTI-XML FILE GEOMETRY WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0549     exit 1
0550 else
0551     echo "Geometry dump from multiple XML files done."
0552 endif
0553 
0554 if ( ! -s readXMLfromGTDB.log ) then
0555     echo "ERROR THE GLOBAL TAG DATABASE GEOMETRY WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0556     exit 1
0557 else
0558     echo "Geometry dump from global tag database done."
0559 endif
0560 
0561 if ( ! -s readXMLfromLocDB.log ) then
0562     echo "ERROR THE LOCAL DATABASE GEOMETRY WAS NOT DUMPED PROPERLY." | tee -a GeometryValidation.log
0563     exit 1
0564 else
0565     echo "Geometry dump from local database done."
0566 endif
0567 
0568 diff readXMLAndDump.log readXMLfromGTDB.log > tcdfXMLvsDB.log
0569 diff readXMLAndDump.log readXMLfromLocDB.log > tcdfXMLvsLocDB.log
0570 diff readXMLfromLocDB.log readXMLfromGTDB.log > tcdfLocDbvsDB.log
0571 
0572 
0573 if ( -s tcdfXMLvsDB.log ) then
0574     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN XML FILES AND DB." | tee -a GeometryValidation.log
0575     echo See tcdfXMLvsDB.log  for differences | tee -a GeometryValidation.log
0576 endif
0577 
0578 if ( -s tcdfXMLvsLocDB.log ) then
0579     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN XML FILES AND LOCAL DATABASE BLOB." | tee -a GeometryValidation.log
0580     echo See tcdfXMLvsLocDB.log  for differences | tee -a GeometryValidation.log
0581 endif
0582 
0583 if ( -s tcdfLocDBvsDB.log ) then
0584     echo "WARNING THE GEOMETRYFILE IS DIFFERENT BETWEEN LOCAL AND GLOBALTAG DATABASE BLOBS."  | tee -a GeometryValidation.log
0585     echo See tcdfLocDBvsDB.log  for differences | tee -a GeometryValidation.log
0586 endif
0587 
0588 cp $CMSSW_RELEASE_BASE/src/DetectorDescription/DDCMS/test/python/testTGeoIterator.py .
0589 # cp $CMSSW_BASE/src/DetectorDescription/DDCMS/test/python/testTGeoIterator.py .
0590 sed -i "{s/ExtendedGeometry2021/${geometry}/}" testTGeoIterator.py >> GeometryValidation.log
0591 cmsRun testTGeoIterator.py
0592 if ( -s navGeometry.log ) then
0593   mv navGeometry.log navGeoXML.log
0594 else
0595   echo Failed to dump paths from XML files | tee -a GeometryValidation.log
0596 endif
0597 
0598 cp $CMSSW_RELEASE_BASE/src/DetectorDescription/DDCMS/test/python/testTGeoIteratorDB.py .
0599 # cp $CMSSW_BASE/src/DetectorDescription/DDCMS/test/python/testTGeoIteratorDB.py .
0600 sed -i "{/process.GlobalTag.globaltag/d}" testTGeoIteratorDB.py >> GeometryValidation.log
0601 sed -i "{/from Configuration.AlCa.autoCond/d}" testTGeoIteratorDB.py >> GeometryValidation.log
0602 sed -i "/FrontierConditions_GlobalTag_cff/ a\from Configuration.AlCa.GlobalTag import GlobalTag\nprocess.GlobalTag = GlobalTag(process.GlobalTag, '${gtag}', '')" testTGeoIteratorDB.py >> GeometryValidation.log 
0603 cmsRun testTGeoIteratorDB.py
0604 if ( -s navGeometry.log ) then
0605   mv navGeometry.log navGeoDB.log
0606 else
0607   echo Failed to dump paths from DB | tee -a GeometryValidation.log
0608 endif
0609 
0610 cp $CMSSW_RELEASE_BASE/src/DetectorDescription/DDCMS/test/python/testTGeoIteratorLocalDB.py .
0611 # cp $CMSSW_BASE/src/DetectorDescription/DDCMS/test/python/testTGeoIteratorLocalDB.py .
0612 sed -i "{s/Extended2021/${geomabbrev}/g}" testTGeoIteratorLocalDB.py >> GeometryValidation.log
0613 cmsRun testTGeoIteratorLocalDB.py
0614 if ( -s navGeometry.log ) then
0615   mv navGeometry.log navGeoLocDB.log
0616 else
0617   echo Failed to dump paths from local DB | tee -a GeometryValidation.log
0618 endif
0619 
0620 diff --ignore-matching-lines='Begin processing' navGeoXML.log navGeoDB.log > pathsXMLvsDB.log
0621 diff --ignore-matching-lines='Begin processing' navGeoXML.log navGeoLocDB.log > pathsXMLvsLocDB.log
0622 diff --ignore-matching-lines='Begin processing' navGeoLocDB.log navGeoDB.log > pathsLocDBvsDB.log
0623 
0624 if ( -s pathsXMLvsDB.log ) then
0625     echo "WARNING PATHS ARE DIFFERENT BETWEEN XML FILES AND DB." | tee -a GeometryValidation.log
0626     echo See pathsXMLvsDB.log for differences | tee -a GeometryValidation.log
0627 endif
0628 if ( -s pathsXMLvsLocDB.log ) then
0629     echo "WARNING PATHS ARE DIFFERENT BETWEEN XML FILES AND LOCAL DATABASE BLOB." | tee -a GeometryValidation.log
0630     echo See pathsXMLvsLocDB.log  for differences | tee -a GeometryValidation.log
0631 endif
0632 if ( -s pathsLocDBvsDB.log ) then
0633     echo "WARNING PATHS ARE DIFFERENT BETWEEN LOCAL AND GLOBALTAG DATABASE BLOBS."  | tee -a GeometryValidation.log
0634     echo See pathsLocDBvsDB.log for differences | tee -a GeometryValidation.log
0635 endif
0636 
0637 echo "End Simulation geometry validation" | tee -a GeometryValidation.log