Skip to content

Instantly share code, notes, and snippets.

@cshimmin
cshimmin / rootcore.py
Last active October 14, 2015 15:54
Example of loading RootCore packages from python.
import sys, os
import ROOT as r
# prohibit root from hijacking command-line args
r.PyConfig.IgnoreCommandLineOptions = True
try:
ROOTCORE_PATH = os.environ['ROOTCOREDIR']
except KeyError:
print >>sys.stderr, "Warning! $ROOTCOREDIR env. variable is not set. Did you configure RootCore?"
ROOTCORE_PATH = None