Skip to content
Snippets Groups Projects
Commit 598764d3 authored by Walter Lampl's avatar Walter Lampl
Browse files

switch ROOT to batch mode in athena-scripts

parent eaee52c2
No related branches found
No related tags found
No related merge requests found
......@@ -165,6 +165,7 @@ else:
# Otherwise, ROOT can get shut down before Gaudi, leading to crashes
# when Athena components dereference ROOT objects that have been deleted.
import ROOT
ROOT.gROOT.SetBatch(True)
# readline support
import rlcompleter, readline
......
......@@ -156,6 +156,7 @@ else:
# Otherwise, ROOT can get shut down before Gaudi, leading to crashes
# when Athena components dereference ROOT objects that have been deleted.
import ROOT
ROOT.gROOT.SetBatch(True)
# readline support
import rlcompleter, readline
......
......@@ -608,6 +608,7 @@ class ComponentAccumulator(object):
# Without this here, pyroot can sometimes get confused
# and report spurious type mismatch errors about this object.
import ROOT
ROOT.gROOT.SetBatch(True)
ROOT.Gaudi
appPropsToSet, mspPropsToSet, bshPropsToSet = self.gatherProps(OutputLevel)
......
......@@ -25,15 +25,8 @@ def _load_dict(lib):
@memoize
def _import_ROOT():
# FIXME: work-around ROOT's silly behaviour wrt graphics libraries
# see: https://savannah.cern.ch/bugs/?35461
import os
orig_display=os.environ.get('DISPLAY',None)
import ROOT
if orig_display:
os.environ['DISPLAY'] = orig_display
del orig_display
ROOT.gROOT.SetBatch(True)
return ROOT
### data ----------------------------------------------------------------------
......
......@@ -20,10 +20,8 @@ import six
### helper functions ----------------------------------------------------------
def _import_ROOT():
import sys
sys.argv.insert(1, '-b')
import ROOT
del sys.argv[1]
ROOT.gROOT.SetBatch(True)
return ROOT
### ---
......
......@@ -18,6 +18,7 @@ from AthenaPython.PyAthenaComps import Alg, StatusCode
class LoadReadDicts (Alg):
def initialize (self):
import ROOT
ROOT.gROOT.SetBatch(True)
import cppyy
cppyy.load_library("libDataModelTestDataCommonDict")
cppyy.load_library("libDataModelTestDataReadDict")
......
......@@ -18,6 +18,7 @@ from AthenaPython.PyAthenaComps import Alg, StatusCode
class LoadWriteDicts (Alg):
def initialize (self):
import ROOT
ROOT.gROOT.SetBatch(True)
import cppyy
cppyy.load_library("libDataModelTestDataCommonDict")
cppyy.load_library("libDataModelTestDataWriteDict")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment