Belle II Software  release-05-01-25
conditions_process2.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 Check that running process twice actually reinitializes the database correctly
6 """
7 
8 import basf2
9 import b2test_utils
10 
11 basf2.set_random_seed("something important")
13 
14 # run once and print the beam parameters after we modified the database
15 # settings to add an additional globaltag just to check if the settings are
16 # kept
17 basf2.conditions.globaltags += ["Legacy_MagneticField_MC8_MC9_MC10"]
18 p = basf2.Path()
19 p.add_module("EventInfoSetter")
20 p.add_module("PrintBeamParameters")
22 # run again to make sure we get the same globaltags
24 # run again but with empty globaltag. This should fail horribly
25 basf2.conditions.reset()
26 basf2.conditions.override_globaltags([])
b2test_utils.configure_logging_for_tests
def configure_logging_for_tests(user_replacements=None)
Definition: __init__.py:99
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25
b2test_utils.safe_process
def safe_process(*args, **kwargs)
Definition: __init__.py:224