Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure ROOT is in batch mode #207

Merged
merged 6 commits into from
Sep 29, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 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(
"--disableROOTBatchMode",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the options use dashes, maybe this could be changed to something like --enable-root-interactive? Or simply --root-interactive. I think the option in positive is easier to find in case someone wants to look at some plots.

jmcarcell marked this conversation as resolved.
Show resolved Hide resolved
action="store_true",
help="Do not enforce ROOT batch mode",
jmcarcell marked this conversation as resolved.
Show resolved Hide resolved
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,10 @@ def main():

c = gaudimain()
if not opts.dry_run:
if not opts.disableROOTBatchMode:
from ROOT import gROOT
gROOT.SetBatch(True)

jmcarcell marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading