Belle II Software  release-05-02-19
TestModule Class Reference
Inheritance diagram for TestModule:
Collaboration diagram for TestModule:

Public Member Functions

def event (self)
 

Static Public Attributes

int iEvent = 0
 event counter
 

Detailed Description

Test to read relations in the input files.

Definition at line 17 of file chain_input.py.

Member Function Documentation

◆ event()

def event (   self)
reimplementation of Module::event().

prints PXD true and simhit indices, using relations

Definition at line 23 of file chain_input.py.

23  def event(self):
24  """reimplementation of Module::event().
25 
26  prints PXD true and simhit indices, using relations
27  """
28  filemetadata = Belle2.PyStoreObj('FileMetaData', 1)
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!")
34 
35  simhits = Belle2.PyStoreArray('PXDSimHits')
36  for hit in simhits:
37  relations = hit.getRelationsFrom("PXDTrueHits")
38  for truehit in relations:
39  print('truehit %d => hit %d' % (truehit.getArrayIndex(), hit.getArrayIndex()))
40 
41  self.iEvent += 1
42 
43 

The documentation for this class was generated from the following file:
Belle2::PyStoreObj
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:69
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146
Belle2::PyStoreArray
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:58