17path = basf2.create_path()
18path.add_module(
'RootInput', inputFileName=inputFile)
21mod = basf2.register_module(
'VariableToReturnValue')
22mod.param(
'variable',
'nTracks')
23high_multiplicity_path = basf2.create_path()
24high_multiplicity_path.add_module(
'VariablesToNtuple', particleList=
'', variables=[
'nTracks'], fileName=
'highMultiplicity.root')
25mod.if_value(
'>= 12', high_multiplicity_path, basf2.AfterConditionPath.CONTINUE)
33 assert os.path.isfile(
'highMultiplicity.root'),
"highMultiplicity.root wasn't created"
34 f = ROOT.TFile(
'highMultiplicity.root')
36 assert bool(t),
"ntuple isn't contained in file"
37 assert t.GetListOfBranches().Contains(
'nTracks'),
"nTracks branch is missing"
38 assert t.GetListOfBranches().Contains(
'__weight__'),
"weight branch is missing"
41 assert event.nTracks >= 12,
"Expected >= 12 tracks in selected high multiplicity events"
def require_file(filename, data_type="", py_case=None)
def clean_working_directory()