Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-23 02:29:36

0001 #!/bin/sh
0002 
0003 
0004 if [ $# -ne 1 ]
0005 then
0006   echo Error: createExtended2021Payloads.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} splitExtended2021Database.sh
0016 
0017 # First read in the little XML files and create the
0018 # big XML file for the Extended2021DD4hep scenario.
0019 cmsRun geometryExtended2021DD4hep_xmlwriter.py
0020 
0021 # Now convert the content of the large XML file into
0022 # a "blob" and write it to the database.
0023 # Also reads in the little XML files again and fills
0024 # the DDCompactView. From the DDCompactView the
0025 # reco parts of the database are also filled.
0026 cmsRun geometryExtended2021DD4hep_writer.py
0027 
0028 # Now put the other scenarios into the database.
0029 # Input the many XML files referenced by the cff file and
0030 # output a single big XML file.
0031 # This is repeated several times below.  The sed commands
0032 # serve to give the correct sequence of input and output
0033 # files
0034 
0035 sed -i '{s/ExtendedGeometry2021/ExtendedGeometry2021ZeroMaterial/g}' geometryExtended2021DD4hep_xmlwriter.py
0036 sed -i '{s/\/ge/\/gez/g}' geometryExtended2021DD4hep_xmlwriter.py
0037 cmsRun geometryExtended2021DD4hep_xmlwriter.py
0038 
0039 sed -i '{s/ExtendedGeometry2021ZeroMaterial/ExtendedGeometry2021FlatMinus05Percent/g}' geometryExtended2021DD4hep_xmlwriter.py
0040 sed -i '{s/\/gez/\/geFM05/g}' geometryExtended2021DD4hep_xmlwriter.py
0041 cmsRun geometryExtended2021DD4hep_xmlwriter.py
0042 
0043 sed -i '{s/ExtendedGeometry2021FlatMinus05Percent/ExtendedGeometry2021FlatMinus10Percent/g}' geometryExtended2021DD4hep_xmlwriter.py
0044 sed -i '{s/\/geFM05/\/geFM10/g}' geometryExtended2021DD4hep_xmlwriter.py
0045 cmsRun geometryExtended2021DD4hep_xmlwriter.py
0046 
0047 sed -i '{s/ExtendedGeometry2021FlatMinus10Percent/ExtendedGeometry2021FlatPlus05Percent/g}' geometryExtended2021DD4hep_xmlwriter.py
0048 sed -i '{s/\/geFM10/\/geFP05/g}' geometryExtended2021DD4hep_xmlwriter.py
0049 cmsRun geometryExtended2021DD4hep_xmlwriter.py
0050 
0051 sed -i '{s/ExtendedGeometry2021FlatPlus05Percent/ExtendedGeometry2021FlatPlus10Percent/g}' geometryExtended2021DD4hep_xmlwriter.py
0052 sed -i '{s/\/geFP05/\/geFP10/g}' geometryExtended2021DD4hep_xmlwriter.py
0053 cmsRun geometryExtended2021DD4hep_xmlwriter.py
0054 
0055 # Read the one big XML file and output a record to the
0056 # database with the an identifying tag
0057 # This is repeated several times below.  The sed commands
0058 # serve to give the correct sequence of input file and output
0059 # tag
0060 # To start:
0061 # Input file                Output tag
0062 # gezSingleBigFile.xml      XMLFILE_Geometry_${mytag}_Extended2021ZeroMaterial_mc
0063 
0064 sed -i '{s/Extended/Extended2021ZeroMaterial/g}' xmlgeometrywriter.py
0065 sed -i '{s/\/ge/\/gez/g}' xmlgeometrywriter.py
0066 cmsRun xmlgeometrywriter.py
0067 
0068 sed -i '{s/Extended2021ZeroMaterial/Extended2021FlatMinus05Percent/g}' xmlgeometrywriter.py
0069 sed -i '{s/\/gez/\/geFM05/g}' xmlgeometrywriter.py
0070 cmsRun xmlgeometrywriter.py
0071 
0072 sed -i '{s/Extended2021FlatMinus05Percent/Extended2021FlatMinus10Percent/g}' xmlgeometrywriter.py
0073 sed -i '{s/\/geFM05/\/geFM10/g}' xmlgeometrywriter.py
0074 cmsRun xmlgeometrywriter.py
0075 
0076 sed -i '{s/Extended2021FlatMinus10Percent/Extended2021FlatPlus05Percent/g}' xmlgeometrywriter.py
0077 sed -i '{s/\/geFM10/\/geFP05/g}' xmlgeometrywriter.py
0078 cmsRun xmlgeometrywriter.py
0079 
0080 sed -i '{s/Extended2021FlatPlus05Percent/Extended2021FlatPlus10Percent/g}' xmlgeometrywriter.py
0081 sed -i '{s/\/geFP05/\/geFP10/g}' xmlgeometrywriter.py
0082 cmsRun xmlgeometrywriter.py
0083 
0084 # All the database objects were written into one database
0085 # (myfile.db) in the steps above.  Extract the different
0086 # pieces into separate database files.  These are the payloads
0087 # that get uploaded to the DB.  There is one for each tag
0088 ./splitExtended2021Database.sh