Test to read relations in the input files.
Definition at line 24 of file chain_input.py.
◆ event()
reimplementation of Module::event().
prints PXD true and simhit indices, using relations
Definition at line 30 of file chain_input.py.
30 def event(self):
31 """reimplementation of Module::event().
32
33 prints PXD true and simhit indices, using relations
34 """
36 nevents = filemetadata.obj().getNEvents()
37 if self.iEvent < 12 and not nevents == 12:
38 basf2.B2FATAL("FileMetaData from file 1 not loaded!")
39 elif self.iEvent >= 12 and not nevents == 15:
40 basf2.B2FATAL("FileMetaData from file 2 not loaded!")
41
43 for hit in simhits:
44 relations = hit.getRelationsFrom("PXDTrueHits")
45 for truehit in relations:
46 print(f'truehit {truehit.getArrayIndex()} => hit {hit.getArrayIndex()}')
47
48 self.iEvent += 1
49
50
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
◆ iEvent
The documentation for this class was generated from the following file: