4 from ROOT
import Belle2
8 """An example of a basf2 module in python which accesses things in the datastore."""
11 """Create a member to access event info and the MCParticles
20 """Print the event number and the PDG code of the MCParticle"""
23 f
"We're in event {self.eventinfo.getEvent()} "
24 f
"and have a particle with PDG code {particle.getPDG()}"
32 main.add_module(
"EventInfoSetter", evtNumList=[10])
35 main.add_module(
"ParticleGun")
eventinfo
an example object from the datastore (the metadata collection for the event)
particles
an example array from the datastore (the list of MC particles)
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.