Belle II Software  release-08-01-10
EventCountLimiter Class Reference
Inheritance diagram for EventCountLimiter:
Collaboration diagram for EventCountLimiter:

Public Member Functions

def __init__ (self, maxCount)
 
def initialize (self)
 
def terminate (self)
 
def beginRun (self)
 
def endRun (self)
 
def event (self)
 

Public Attributes

 maxCount
 internal copy of the event-counter upper limit
 
 eventCounter
 internal event counter
 

Detailed Description

Report when the event counter has reached or exceeded its limit

Definition at line 23 of file EventCountLimiter.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  maxCount 
)
Constructor

Argument:
    maxCount (int): number of events to be processed

Definition at line 26 of file EventCountLimiter.py.

26  def __init__(self, maxCount):
27  """Constructor
28 
29  Argument:
30  maxCount (int): number of events to be processed
31  """
32  super().__init__()
33 
34  self.maxCount = maxCount if (maxCount >= 0) else (1 << 31)
35 
36  self.eventCounter = 0
37 

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Handle begin of run (nothing to do here)

Definition at line 44 of file EventCountLimiter.py.

◆ endRun()

def endRun (   self)
Handle end of run (nothing to do here)

Definition at line 47 of file EventCountLimiter.py.

◆ event()

def event (   self)
Process one event: has eventCounter reached or exceeded its limit?

Definition at line 50 of file EventCountLimiter.py.

◆ initialize()

def initialize (   self)
Handle job initialization (nothing to do here)

Definition at line 38 of file EventCountLimiter.py.

◆ terminate()

def terminate (   self)
Handle job termination (nothing to do here)

Definition at line 41 of file EventCountLimiter.py.


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