Skip to content

Commit

Permalink
Ensure ROOT is in batch mode (#207)
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Miguel Carceller <[email protected]>
  • Loading branch information
Zehvogel and jmcarcell authored Sep 29, 2024
1 parent dcb8dff commit 20b341f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions k4FWCore/scripts/k4run
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ def main():
help="Print all the configurable components available in the framework and exit",
)
parser.add_argument("--gdb", action="store_true", help="Attach gdb debugger")
parser.add_argument(
"--interactive-root",
action="store_true",
help="Run with ROOT in interactive mode (e.g. to see plots)",
default=False,
)

# Once to parse the files and another time below to have the new parameters
# in the namespace since parsing of the file happens when the namespace
Expand Down Expand Up @@ -229,6 +235,11 @@ def main():

c = gaudimain()
if not opts.dry_run:
if not opts.interactive_root:
from ROOT import gROOT

gROOT.SetBatch(True)

# Do the real processing
retcode = c.run(opts.gdb)
# User requested stop returns non-zero exit code see: https://github.com/key4hep/k4FWCore/issues/125
Expand Down

0 comments on commit 20b341f

Please sign in to comment.