Belle II Software light-2406-ragdoll
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"""
15Check that running process twice actually reinitializes the database correctly
16"""
17
18import basf2
19import b2test_utils
20
21basf2.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
27basf2.conditions.globaltags += ["Legacy_MagneticField_MC8_MC9_MC10"]
28p = basf2.Path()
29p.add_module("EventInfoSetter")
30p.add_module("PrintBeamParameters")
31basf2.process(p)
32# run again to make sure we get the same globaltags
33basf2.process(p)
34# run again but with empty globaltag. This should fail horribly
35basf2.conditions.reset()
36basf2.conditions.override_globaltags([])
38
39# @endcond
def safe_process(*args, **kwargs)
Definition: __init__.py:236
def configure_logging_for_tests(user_replacements=None)
Definition: __init__.py:106