Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:59

0001 #!/bin/bash
0002 
0003 n_events="1E4"
0004 if [ -n "$1" ]
0005 then
0006         n_events="$1"
0007 fi
0008 
0009 inputDir="."
0010 if [ -n "$SCRAM_TEST_PATH" ]
0011 then
0012         inputDir="$SCRAM_TEST_PATH/simu"
0013         n_events="1E2"
0014 fi
0015 
0016 #----------------------------------------------------------------------------------------------------
0017 
0018 pids=""
0019 
0020 function RunOne()
0021 {
0022         local config="$1"
0023         local era_mod_path="$2"
0024         local era="$3"
0025 
0026         local cfg="simu_${config}_cfg.py"
0027         local log="simu_${config}.log"
0028         local out_lhcInfo="simu_${config}_lhcInfo.root"
0029         local out_tracks="simu_${config}_tracks.root"
0030         local out_protons="simu_${config}_protons.root"
0031 
0032         cat "$inputDir/template_cfg.py" | sed "\
0033                         s|\$ERA_MOD_PATH|$era_mod_path|;\
0034                         s|\$ERA|$era|;\
0035                         s|\$CONFIG|$config|;\
0036                         s|\$N_EVENTS|$n_events|;\
0037                         s|\$OUT_LHCINFO|$out_lhcInfo|;\
0038                         s|\$OUT_TRACKS|$out_tracks|;\
0039                         s|\$OUT_PROTONS|$out_protons|;\
0040                 " > "$cfg"
0041 
0042         cmsRun "$cfg" &> "$log" &
0043         pids="$pids $!"
0044 }
0045 
0046 #----------------------------------------------------------------------------------------------------
0047 
0048 RunOne "2016" "Configuration.Eras" "Run2_2016"
0049 
0050 RunOne "2017" "Configuration.Eras" "Run2_2017"
0051 
0052 RunOne "2018" "Configuration.Eras" "Run2_2018"
0053 
0054 RunOne "2022" "Configuration.ProcessModifiers" "Run3_CTPPS_directSim"
0055 
0056 rc=0
0057 for pid in $pids
0058 do
0059         wait $pid
0060         if [ $? -ne 0 ]
0061         then
0062                 rc=1
0063         fi
0064 done
0065 
0066 exit $rc