Belle II Software  release-05-01-25
basf2_rootinit.py
1 #!/usr/bin/env python3
2 
3 import sys
4 # By default "import ROOT" parses the arguments *sigh* so the most convenient
5 # way to make sure that basf2 does not import ROOT is to add a --help and make
6 # sure the program does not stop there
7 sys.argv.append("--help")
8 import basf2 # noqa
9 from basf2 import _constwrapper
10 
11 # if the program is still alive make sure that the constants we use in basf2.py
12 # are still the same
13 from ROOT import PyConfig
14 PyConfig.IgnoreCommandLineOptions = True
15 import ROOT
16 assert ROOT.kIsStatic == _constwrapper._ROOT_kIsStatic, "kIsStatic has changed its value"
17 assert ROOT.kIsConstMethod == _constwrapper._ROOT_kIsConstMethod, "kIsConstMethod has changed its value"