Skip to content

Commit 177691d

Browse files
committed
Add DPL-eventgen testing
1 parent 35d151b commit 177691d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/run_generator_tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ exec_test()
113113
local generator_lower=$(echo "${generator}" | tr '[:upper:]' '[:lower:]')
114114
# TODO Potentially, one could run an external generator that derives from GeneratorPythia8 and so could probably use configuration for TriggerPythia8
115115
local trigger=${3:+-t ${generator_lower}}
116+
local trigger_dpl=${3:+--trigger ${generator_lower}}
116117
local RET=0
117118
# this is how our test script is expected to be called
118119
local test_script=$(get_test_script_path_for_ini ${ini_path})
@@ -122,7 +123,15 @@ exec_test()
122123
echo "### Testing ${ini_path} with generator ${generator} ###" > ${LOG_FILE_KINE}
123124
echo "### Testing ${ini_path} with generator ${generator} ###" > ${LOG_FILE_GENERIC_KINE}
124125
echo "### Testing ${ini_path} with generator ${generator} ###" > ${LOG_FILE_SIM}
126+
echo "### Testing DPL-eventgen ###" >> ${LOG_FILE_SIM}
127+
# run the event generation using the dpl-eventgen executable.
128+
# This is a basic running test, however it's important because the system running on Hyperloop
129+
# is largely used for MCGEN productions and is currently tested only locally
130+
o2-sim-dpl-eventgen --generator ${generator_lower} ${trigger_dpl} --nEvents ${nev} --configFile ${ini_path} --configKeyValues "GeneratorPythia8.includePartonEvent=true" -b >> ${LOG_FILE_SIM} 2>&1
131+
RET=${?}
132+
[[ "${RET}" != "0" ]] && { remove_artifacts ; return ${RET} ; }
125133
# run the simulation, fail if not successful
134+
echo "### Testing base o2-sim executable ###" >> ${LOG_FILE_SIM}
126135
o2-sim -g ${generator_lower} ${trigger} --noGeant -n ${nev} -j 4 --configFile ${ini_path} --configKeyValues "GeneratorPythia8.includePartonEvent=true" >> ${LOG_FILE_SIM} 2>&1
127136
RET=${?}
128137
[[ "${RET}" != "0" ]] && { remove_artifacts ; return ${RET} ; }

0 commit comments

Comments
 (0)