Skip to content

Commit

Permalink
[FullSim] Do not load key4hep if already present in the env (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrieucF authored Aug 20, 2024
1 parent f246451 commit d2de5ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

# set-up the environment
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh || true # if the key4hep env is loaded twice, it returns a non zero exit code, '|| true' ensures it returns 0 to avoid stopping pipelines
# set-up the Key4hep environment if not already set
if [[ -z "${KEY4HEP_STACK}" ]]; then
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
else
echo "The Key4hep stack was already loaded in this environment."
fi

# run the SIM step
ddsim --enableGun --gun.distribution uniform --gun.energy "10*GeV" --gun.particle e- --numberOfEvents 10 --outputFile ALLEGRO_sim.root --random.enableEventSeed --random.seed 42 --compactFile $K4GEO/FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/ALLEGRO_o1_v03.xml
Expand Down
8 changes: 6 additions & 2 deletions FCCee/FullSim/IDEA/IDEA_o1_v03/ctest_sim_digi_reco.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

# set-up the environment
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh || true # if the key4hep env is loaded twice, it returns a non zero exit code, '|| true' ensures it returns 0 to avoid stopping pipelines
# set-up the Key4hep environment if not already set
if [[ -z "${KEY4HEP_STACK}" ]]; then
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
else
echo "The Key4hep stack was already loaded in this environment."
fi

# run the SIM step
ddsim --enableGun --gun.distribution uniform --gun.energy "10*GeV" --gun.particle e- --numberOfEvents 10 --outputFile IDEA_sim.root --random.enableEventSeed --random.seed 42 --compactFile $K4GEO/FCCee/IDEA/compact/IDEA_o1_v03/IDEA_o1_v03.xml
Expand Down

0 comments on commit d2de5ab

Please sign in to comment.