|
def | _check_list (self, listtype=None, std_function=stdPi0s.stdPi0s, expected_lists=["all"]) |
|
Test case for standard pi0 lists
Definition at line 9 of file test_std_pi0s.py.
◆ _check_list()
def _check_list |
( |
|
self, |
|
|
|
listtype = None , |
|
|
|
std_function = stdPi0s.stdPi0s , |
|
|
|
expected_lists = ["all"] |
|
) |
| |
|
private |
check that a given listtype function works
Definition at line 12 of file test_std_pi0s.py.
12 def _check_list(self, listtype=None, std_function=stdPi0s.stdPi0s, expected_lists=["all"]):
13 """check that a given listtype function works"""
14 testpath = create_path()
15 if (std_function
is stdPi0s.stdPi0s)
and (listtype
is not None):
16 std_function(listtype, path=testpath)
18 std_function(path=testpath)
21 for module
in testpath.modules():
22 for param
in module.available_params():
23 if module.type() ==
'ParticleLoader' and param.name ==
'decayStringsWithCuts':
24 name = param.values[0][0].split(
':')[1]
25 built_lists.append(name)
26 if module.type() ==
'ParticleListManipulator' and param.name ==
'outputListName':
27 name = str(param.values).split(
':')[1]
28 built_lists.append(name)
29 if module.type() ==
'ParticleCombiner' and param.name ==
'decayString':
30 name = param.values.split(
':')[1].split(
' -> ')[0]
31 built_lists.append(name)
34 for a, b
in zip(built_lists, expected_lists):
35 self.assertEqual(a, b,
"Loaded list \'%s\' instead of \'%s\' with function %s" % (a, b, std_function.__name__))
37 print(list(built_lists))
38 result = map(
lambda w1, w2: w1 == w2, built_lists, expected_lists)
◆ test_all_list()
def test_all_list |
( |
|
self | ) |
|
check that the builder function works with the all list
Definition at line 45 of file test_std_pi0s.py.
◆ test_allfit_list()
def test_allfit_list |
( |
|
self | ) |
|
check that the builder function works with the allFit list
Definition at line 77 of file test_std_pi0s.py.
◆ test_eff10_Jan2020_list()
def test_eff10_Jan2020_list |
( |
|
self | ) |
|
check that the builder function works with the eff10_Jan2020 list
Definition at line 49 of file test_std_pi0s.py.
◆ test_eff10_Jan2020fit_list()
def test_eff10_Jan2020fit_list |
( |
|
self | ) |
|
check that the builder function works with the eff10_Jan2020Fit list
Definition at line 81 of file test_std_pi0s.py.
◆ test_eff20_Jan2020_list()
def test_eff20_Jan2020_list |
( |
|
self | ) |
|
check that the builder function works with the eff20_Jan2020 list
Definition at line 53 of file test_std_pi0s.py.
◆ test_eff20_Jan2020fit_list()
def test_eff20_Jan2020fit_list |
( |
|
self | ) |
|
check that the builder function works with the eff20_Jan2020Fit list
Definition at line 85 of file test_std_pi0s.py.
◆ test_eff30_Jan2020_list()
def test_eff30_Jan2020_list |
( |
|
self | ) |
|
check that the builder function works with the eff30_Jan2020 list
Definition at line 57 of file test_std_pi0s.py.
◆ test_eff30_Jan2020fit_list()
def test_eff30_Jan2020fit_list |
( |
|
self | ) |
|
check that the builder function works with the eff30_Jan2020Fit list
Definition at line 89 of file test_std_pi0s.py.
◆ test_eff40_Jan2020_list()
def test_eff40_Jan2020_list |
( |
|
self | ) |
|
check that the builder function works with the eff40_Jan2020 list
Definition at line 61 of file test_std_pi0s.py.
◆ test_eff40_Jan2020fit_list()
def test_eff40_Jan2020fit_list |
( |
|
self | ) |
|
check that the builder function works with the eff40_Jan2020Fit list
Definition at line 93 of file test_std_pi0s.py.
◆ test_eff50_Jan2020_list()
def test_eff50_Jan2020_list |
( |
|
self | ) |
|
check that the builder function works with the eff50_Jan2020 list
Definition at line 69 of file test_std_pi0s.py.
◆ test_eff50_Jan2020_nomcmatch_list()
def test_eff50_Jan2020_nomcmatch_list |
( |
|
self | ) |
|
check that the builder function works with the eff50_Jan2020_nomcmatch list
Definition at line 65 of file test_std_pi0s.py.
◆ test_eff50_Jan2020fit_list()
def test_eff50_Jan2020fit_list |
( |
|
self | ) |
|
check that the builder function works with the eff50_Jan2020Fit list
Definition at line 97 of file test_std_pi0s.py.
◆ test_eff60_Jan2020_list()
def test_eff60_Jan2020_list |
( |
|
self | ) |
|
check that the builder function works with the eff60_Jan2020 list
Definition at line 73 of file test_std_pi0s.py.
◆ test_eff60_Jan2020fit_list()
def test_eff60_Jan2020fit_list |
( |
|
self | ) |
|
check that the builder function works with the eff60_Jan2020Fit list
Definition at line 107 of file test_std_pi0s.py.
◆ test_nonsense_list()
def test_nonsense_list |
( |
|
self | ) |
|
check that the builder function raises a ValueError for a non-existing list name
Definition at line 41 of file test_std_pi0s.py.
◆ test_skim()
check that the builder function works with the skim list
Definition at line 111 of file test_std_pi0s.py.
The documentation for this class was generated from the following file: