Belle II Software development
EventCountLimiter Class Reference
Inheritance 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.

44 def beginRun(self):
45 """Handle begin of run (nothing to do here)"""
46

◆ endRun()

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

Definition at line 47 of file EventCountLimiter.py.

47 def endRun(self):
48 """Handle end of run (nothing to do here)"""
49

◆ event()

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

Definition at line 50 of file EventCountLimiter.py.

50 def event(self):
51 """Process one event: has eventCounter reached or exceeded its limit?"""
52 self.eventCounter += 1
53 super().return_value(self.eventCounter < self.maxCount)

◆ initialize()

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

Definition at line 38 of file EventCountLimiter.py.

38 def initialize(self):
39 """Handle job initialization (nothing to do here)"""
40

◆ terminate()

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

Definition at line 41 of file EventCountLimiter.py.

41 def terminate(self):
42 """Handle job termination (nothing to do here)"""
43

Member Data Documentation

◆ eventCounter

eventCounter

internal event counter

Definition at line 36 of file EventCountLimiter.py.

◆ maxCount

maxCount

internal copy of the event-counter upper limit

Definition at line 34 of file EventCountLimiter.py.


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