Belle II Software development
TestModule Class Reference
Inheritance diagram for TestModule:

Public Member Functions

def __init__ (self, is_inverted)
 
def event (self)
 

Protected Attributes

 _is_inverted
 variable to remember if we test for existence or absence
 

Detailed Description

Test if the DataStore contains the expected content.

Definition at line 16 of file prune_datastore.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  is_inverted 
)
Create a new instance. If is_inverted is True we check of absence of content

Definition at line 19 of file prune_datastore.py.

19 def __init__(self, is_inverted):
20 """Create a new instance. If is_inverted is True we check of absence of content"""
21 super().__init__()
22
23 self._is_inverted = is_inverted
24

Member Function Documentation

◆ event()

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

Checks for the amount of PXD Clusters and PXD Digits after
the prune module was run

Definition at line 25 of file prune_datastore.py.

25 def event(self):
26 """reimplementation of Module::event().
27
28 Checks for the amount of PXD Clusters and PXD Digits after
29 the prune module was run
30 """
31
32 PXDClusters = Belle2.PyStoreArray('PXDClusters')
33 PXDDigits = Belle2.PyStoreArray('PXDDigits')
34
35 # PXDClusters are in our keep list, should still be there
36 if self._is_inverted:
37 assert PXDClusters.getEntries() == 0
38 # while the PXDDigits should be empty
39 assert PXDDigits.getEntries() > 0
40 else:
41 assert PXDClusters.getEntries() > 0
42 # while the PXDDigits should be empty
43 assert PXDDigits.getEntries() == 0
44
45 # ensure the eventmetadata has been kept, which is implicitly done by
46 # PruneDataStore
47 evtmetadata = Belle2.PyStoreObj('EventMetaData')
48 assert evtmetadata
49
50
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

Member Data Documentation

◆ _is_inverted

_is_inverted
protected

variable to remember if we test for existence or absence

Definition at line 23 of file prune_datastore.py.


The documentation for this class was generated from the following file: