13from basf2
import create_path, set_random_seed
14from b2test_utils
import configure_logging_for_tests
15from modularAnalysis
import variablesToNtuple
17set_random_seed(
"1337")
19configure_logging_for_tests()
23testpath = create_path()
24testpath.add_module(
'EventInfoSetter', evtNumList=[10], runList=[0], expList=[0])
25testpath.add_module(
'ParticleLoader', decayStrings=[
'e+'])
33testpath = create_path()
34testpath.add_module(
'EventInfoSetter', evtNumList=[10], runList=[0], expList=[0])
41testpath = create_path()
42testpath.add_module(
'EventInfoSetter', evtNumList=[10], runList=[0], expList=[0])
43testpath.add_module(
'ParticleLoader', decayStrings=[
'e+'])
44testpath.add_module(
'ParticleLoader', decayStrings=[
'pi+'])
46 filename=
"firstfile.root", path=testpath)
49 filename=
"secondfile.root", path=testpath)
51variablesToNtuple(
"pi+:all", [
'electronID',
'p',
'isSignal'], treename=
'secondtree',
52 filename=
"firstfile.root", path=testpath)
56 f1 = ROOT.TFile(
'firstfile.root')
57 t1 = f1.Get(
'firsttree')
58 t2 = f1.Get(
'secondtree')
59 assert bool(t1),
"firsttree isn't contained in file"
60 assert bool(t2),
"secondtree isn't contained in file"
62 f2 = ROOT.TFile(
'secondfile.root')
63 t = f2.Get(
'intermediate')
64 assert bool(t),
"intermediate isn't contained in file"
def clean_working_directory()
def safe_process(*args, **kwargs)