Belle II Software  release-08-01-10
conditions_process2.py
1 #!/usr/bin/env python3
2 
3 
10 
11 # this is a test executable, not a module so we don't need doxygen warnings
12 # @cond SUPPRESS_DOXYGEN
13 
14 """
15 Check that running process twice actually reinitializes the database correctly
16 """
17 
18 import basf2
19 import b2test_utils
20 
21 basf2.set_random_seed("something important")
23 
24 # run once and print the beam parameters after we modified the database
25 # settings to add an additional globaltag just to check if the settings are
26 # kept
27 basf2.conditions.globaltags += ["Legacy_MagneticField_MC8_MC9_MC10"]
28 p = basf2.Path()
29 p.add_module("EventInfoSetter")
30 p.add_module("PrintBeamParameters")
31 basf2.process(p)
32 # run again to make sure we get the same globaltags
33 basf2.process(p)
34 # run again but with empty globaltag. This should fail horribly
35 basf2.conditions.reset()
36 basf2.conditions.override_globaltags([])
38 
39 # @endcond
def configure_logging_for_tests(user_replacements=None)
Definition: __init__.py:106
def safe_process(*args, **kwargs)
Definition: __init__.py:236