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