PageRenderTime 26ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

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