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