Belle II Software light-2406-ragdoll
CountEvents Class Reference
Inheritance diagram for CountEvents:
Collaboration diagram for CountEvents:

Public Member Functions

def initialize (self)
 
def beginRun (self)
 
def event (self)
 

Detailed Description

Count the number of events passing this module and create a dictionary
of {(exp,run): events}

Definition at line 18 of file eventlimiter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Creates an entry in the global num_events dictionary

Definition at line 28 of file eventlimiter.py.

28 def beginRun(self):
29 """Creates an entry in the global num_events dictionary"""
30 global num_events
31 evtmetadata = Belle2.PyStoreObj('EventMetaData')
32 run = evtmetadata.obj().getRun()
33 exp = evtmetadata.obj().getExperiment()
34 if (exp, run) not in num_events:
35 num_events[(exp, run)] = 0
36
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

◆ event()

def event (   self)
Increments the right (Exp,Run) entry in the num_events dictionary

Definition at line 37 of file eventlimiter.py.

37 def event(self):
38 """Increments the right (Exp,Run) entry in the num_events dictionary"""
39 global num_events
40 evtmetadata = Belle2.PyStoreObj('EventMetaData')
41 run = evtmetadata.obj().getRun()
42 exp = evtmetadata.obj().getExperiment()
43 num_events[(exp, run)] += 1
44
45

◆ initialize()

def initialize (   self)
Not implemented

Definition at line 25 of file eventlimiter.py.

25 def initialize(self):
26 """Not implemented"""
27

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