6 from basf2
import set_random_seed, create_path, process
7 from b2test_utils
import configure_logging_for_tests
8 from modularAnalysis
import variablesToNtuple
10 set_random_seed(
"1337")
12 configure_logging_for_tests()
16 testpath = create_path()
17 testpath.add_module(
'EventInfoSetter', evtNumList=[10], runList=[0], expList=[0])
18 testpath.add_module(
'ParticleLoader', decayStringsWithCuts=[(
'e+',
'')])
26 testpath = create_path()
27 testpath.add_module(
'EventInfoSetter', evtNumList=[10], runList=[0], expList=[0])
34 testpath = create_path()
35 testpath.add_module(
'EventInfoSetter', evtNumList=[10], runList=[0], expList=[0])
36 testpath.add_module(
'ParticleLoader', decayStringsWithCuts=[(
'e+',
'')])
37 testpath.add_module(
'ParticleLoader', decayStringsWithCuts=[(
'pi+',
'')])
39 filename=
"firstfile.root", path=testpath)
42 filename=
"secondfile.root", path=testpath)
45 filename=
"firstfile.root", path=testpath)
49 f1 = ROOT.TFile(
'firstfile.root')
50 t1 = f1.Get(
'firsttree')
51 t2 = f1.Get(
'secondtree')
52 assert bool(t1),
"firsttree isn't contained in file"
53 assert bool(t2),
"secondtree isn't contained in file"
55 f2 = ROOT.TFile(
'secondfile.root')
56 t = f2.Get(
'intermediate')
57 assert bool(t),
"intermediate isn't contained in file"