Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:08

0001 #!/bin/sh
0002 
0003 
0004 if [ $# -ne 1 ]
0005 then
0006   echo Error: createExtended2017Plan1Payloads.sh requires exactly one argument which is the tag
0007   exit 1
0008 fi
0009 mytag=$1
0010 echo ${mytag}
0011 
0012 # Set the tag in all the scripts and the metadata text files
0013 sed -i {s/TagXX/${mytag}/g} *.py
0014 compgen -G "*.txt" > /dev/null && sed -i {s/TagXX/${mytag}/g} *.txt
0015 sed -i {s/TagXX/${mytag}/g} splitExtended2017Plan1Database.sh
0016 
0017 # First read in the little XML files and create the
0018 # large XML file for the Phase1_R30F12_HCal Ideal scenario.
0019 # Input cff                                             Output file
0020 # GeometryExtended2017Plan1_cff                       geSingleBigFile.xml
0021 cmsRun geometryExtended2017Plan1_xmlwriter.py
0022 
0023 # Now convert the content of the large XML file into
0024 # a "blob" and write it to the database.
0025 # Also reads in the little XML files again and fills
0026 # the DDCompactView. From the DDCompactView the
0027 # reco parts of the database are also filled.
0028 cmsRun geometryExtended2017Plan1_writer.py
0029 
0030 # Now put the other scenarios into the database.
0031 # Input the many XML files referenced by the cff file and
0032 # output a single big XML file.
0033 # This is repeated several times below.  The sed commands
0034 # serve to give the following sequence of input and output
0035 # files
0036 #
0037 # Input cff                    Output file
0038 # GeometryIdeal_cff            giSingleBigFile.xml
0039 #
0040 sed -i '{s/Extended2017Plan1/Extended2017Plan1ZeroMaterial/g}' geometryExtended2017Plan1_xmlwriter.py
0041 sed -i '{s/\/ge/\/gez/g}' geometryExtended2017Plan1_xmlwriter.py
0042 cmsRun geometryExtended2017Plan1_xmlwriter.py
0043 
0044 sed -i '{s/Extended2017Plan1ZeroMaterial/Extended2017Plan1FlatMinus05Percent/g}' geometryExtended2017Plan1_xmlwriter.py
0045 sed -i '{s/\/gez/\/geFM05/g}' geometryExtended2017Plan1_xmlwriter.py
0046 cmsRun geometryExtended2017Plan1_xmlwriter.py
0047 
0048 sed -i '{s/Extended2017Plan1FlatMinus10Percent/Extended2017Plan1FlatPlus05Percent/g}' geometryExtended2017Plan1_xmlwriter.py
0049 sed -i '{s/\/geFM10/\/geFP05/g}' geometryExtended2017Plan1_xmlwriter.py
0050 cmsRun geometryExtended2017Plan1_xmlwriter.py
0051 
0052 sed -i '{s/Extended2017Plan1FlatPlus05Percent/Extended2017Plan1FlatPlus10Percent/g}' geometryExtended2017Plan1_xmlwriter.py
0053 sed -i '{s/\/geFP05/\/geFP10/g}' geometryExtended2017Plan1_xmlwriter.py
0054 cmsRun geometryExtended2017Plan1_xmlwriter.py
0055 
0056 # Read the one big XML file and output a record to the
0057 # database with the an identifying tag
0058 # This is repeated several times below.  The sed commands
0059 # serve to give the following sequence of input file and output
0060 # tag
0061 #
0062 # Input file                Output tag
0063 # gezSingleBigFile.xml      XMLFILE_Geometry_${mytag}_Extended2017Plan1ZeroMaterial_mc
0064 #
0065 sed -i '{s/Extended/Extended2017Plan1ZeroMaterial/g}' xmlgeometrywriter.py
0066 sed -i '{s/\/ge/\/gez/g}' xmlgeometrywriter.py
0067 cmsRun xmlgeometrywriter.py
0068 
0069 sed -i '{s/Extended2017Plan1ZeroMaterial/Extended2017Plan1FlatMinus05Percent/g}' xmlgeometrywriter.py
0070 sed -i '{s/\/gez/\/geFM05/g}' xmlgeometrywriter.py
0071 cmsRun xmlgeometrywriter.py
0072 
0073 sed -i '{s/Extended2017Plan1FlatMinus05Percent/Extended2017Plan1FlatMinus10Percent/g}' xmlgeometrywriter.py
0074 sed -i '{s/\/geFM05/\/geFM10/g}' xmlgeometrywriter.py
0075 cmsRun xmlgeometrywriter.py
0076 
0077 sed -i '{s/Extended2017Plan1FlatMinus10Percent/Extended2017Plan1FlatPlus05Percent/g}' xmlgeometrywriter.py
0078 sed -i '{s/\/geFM10/\/geFP05/g}' xmlgeometrywriter.py
0079 cmsRun xmlgeometrywriter.py
0080 
0081 sed -i '{s/Extended2017Plan1FlatPlus05Percent/Extended2017Plan1FlatPlus10Percent/g}' xmlgeometrywriter.py
0082 sed -i '{s/\/geFP05/\/geFP10/g}' xmlgeometrywriter.py
0083 cmsRun xmlgeometrywriter.py
0084 
0085 # All the database objects were written into one database
0086 # (myfile.db) in the steps above.  Extract the different
0087 # pieces into separate database files.  These are the payloads
0088 # that get uploaded to the dropbox.  There is one for each tag
0089 ./splitExtended2017Plan1Database.sh