13 Modules required for calculating skim flags. Skim flags track whether an event passes a
14 skim, without the need to directly remove those events from processing.
22 *[Module for skim expert usage]* Create the EventExtraInfo DataStore object, and set
23 all required flag variables to zero.
27 Add this module to the path before adding any skims, so that the skim flags are
28 defined in the datastore for all events.
36 skims (skim.core.BaseSkim): Skim to initialise event flag for.
39 from ROOT
import Belle2
40 from variables
import variables
as vm
43 self.
skimsskims = skims
48 vm.addAlias(skim.flag, f
"eventExtraInfo({skim.flag})")
52 Register EventExtraInfo in datastore if it has not been registered already.
59 Initialise flags to zero.
62 for skim
in self.
skimsskims:
68 *[Module for skim expert usage]* Update the skim flag to be 1 if there is at least
69 one candidate in any of the skim lists.
73 Add this module to the post-skim path of each skim in the combined skim, as the
74 skim lists are only guaranteed to exist on the conditional path (if a
75 conditional path was used).
83 skim (skim.core.BaseSkim): Skim to update event flag for.
86 from ROOT
import Belle2
95 Check EventExtraInfo and all the necessary ParticleLists have been registered previously.
96 The registration of EventExtraInfo should be done by InitialiseSkimFlag.
98 from ROOT
import Belle2
103 ListObject.isRequired()
107 Check if at least one skim list is non-empty; if so, update the skim flag to 1.
111 if not ListObject.isValid():
113 f
"Error in UpdateSkimFlag for {self.skim}: particle lists not built. "
114 "Did you add this module to the pre-skim path rather than the post-skim path?"
116 elif ListObject.getListSize() > 0:
a (simplified) python wrapper for StoreObjPtr.
def __init__(self, *skims)