Belle II Software development
test_analysisdqm_path.py
1
8
9"""
10Simple test script to check `analysisDQM.add_analysis_dqm` adds the modules it
11should, and runs without errors (or problematic database accesses).
12
13"""
14
15import basf2 as b2
16import b2test_utils
17from analysisDQM import add_analysis_dqm, add_mirabelle_dqm
18from IPDQM import add_IP_dqm
19from V0DQM import add_V0_dqm
20
21
23 # test logging and seeds just in case we fall back to output comparison
25 b2.set_random_seed("")
26
27 # require_file skips the test if can't be found
28 inputfile = b2test_utils.require_file("mdst16.root", "validation")
29
30 # just run over an mdst to check the modules execute
31 testpath = b2.Path()
32 testpath.add_module("RootInput", inputFileName=inputfile)
33
34 # need this guy for PhysicsObjectsDQM 🐐
35 testpath.add_module("HistoManager")
36
37 # analysis DQM modules to be tested
38 add_analysis_dqm(testpath)
39 add_mirabelle_dqm(testpath)
40 add_IP_dqm(testpath, dqm_environment='expressreco')
41 add_V0_dqm(testpath)
42
43 b2.print_path(testpath)
44
45 # fallback to GT replay on the file
46 b2.conditions.override_globaltags()
47 b2.conditions.reset()
48
49 b2.process(testpath, 1)
def require_file(filename, data_type="", py_case=None)
Definition: __init__.py:54
def clean_working_directory()
Definition: __init__.py:189
def configure_logging_for_tests(user_replacements=None)
Definition: __init__.py:106