5 from b2test_utils
import configure_logging_for_tests, skip_test_if_light
6 from ROOT
import Belle2
9 configure_logging_for_tests()
10 basf2.set_random_seed(
"something important")
14 """Doesn't do anything."""
18 """Test to read relations in the input files."""
24 """reimplementation of Module::event().
26 prints PXD true and simhit indices, using relations
29 nevents = filemetadata.obj().getNEvents()
30 if self.
iEvent < 12
and not nevents == 12:
31 basf2.B2FATAL(
"FileMetaData from file 1 not loaded!")
32 elif self.
iEvent >= 12
and not nevents == 15:
33 basf2.B2FATAL(
"FileMetaData from file 2 not loaded!")
37 relations = hit.getRelationsFrom(
"PXDTrueHits")
38 for truehit
in relations:
39 print(
'truehit %d => hit %d' % (truehit.getArrayIndex(), hit.getArrayIndex()))
45 basf2.find_file(
'framework/tests/chaintest_1.root'),
46 basf2.find_file(
'framework/tests/chaintest_2.root')
49 basf2.conditions.disable_globaltag_replay()
56 main.add_module(
'RootInput', logLevel=basf2.LogLevel.WARNING, inputFileNames=inputfiles)
57 main.add_module(
'EventInfoPrinter')
58 main.add_module(
'PrintCollections', printForEvent=0)