/DetectorDescription/RegressionTest/test/testdddreport.sh

https://github.com/aivanov-cern/cmssw · Shell · 26 lines · 24 code · 0 blank · 2 comment · 3 complexity · feb13e2e1fb2d50980f9d2a488e1c7c6 MD5 · raw file

  1. #! /bin/tcsh -f
  2. #cmsenv
  3. if ($#argv == 0) then
  4. setenv geomxml "${LOCAL_TOP_DIR}/src/Geometry/CMSCommonData/python/cmsIdealGeometryXML_cfi.py"
  5. else
  6. if ($#argv == 1) then
  7. setenv geomxml `echo ${LOCAL_TOP_DIR}/src/Geometry/CMSCommonData/python/${1}`
  8. endif
  9. endif
  10. if ( ! -e ${geomxml} ) then
  11. echo "ERROR- ${geomxml} file not found"
  12. endif
  13. echo "START - All messages in this script pertain to geometry data described in xml files in: ${geomxml}"
  14. echo '<?xml version="1.0"?>' > $LOCAL_TMP_DIR/src/dddreportconfig.xml
  15. echo '<Configuration xmlns="http://www.cern.ch/cms/CDL"' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  16. echo ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  17. echo ' xsi:schemaLocation= "http://www.cern.ch/cms/CDL ../../../Schema/CDLSchema.xsd"' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  18. echo ' name="CMSConfiguration" version="0">' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  19. grep ".xml" $geomxml | sed "{s/'//g}" | sed '{s/,//g}' | sed '{s/ //g}' | sed '{s/\t//g}' | sed '{s/geomXMLFiles=cms.vstring(//g}' | sed '{s/+cms.vstring(//g}' | sed '{s/)//g}' | grep -v "#" | awk '{print " <File name=\"" $1 "\" url=\".\"/>"}' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  20. echo '<Root fileName="cms.xml" logicalPartName="OCMS"/>' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  21. echo '<Schema schemaLocation="http://www.cern.ch/cms/DDL ../../Schema/DDLSchema.xsd" validation="false"/>' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  22. echo '</Configuration>' >> $LOCAL_TMP_DIR/src/dddreportconfig.xml
  23. DDErrorReport dddreportconfig.xml