Belle II Software development
IntervalSelector Class Reference

Public Member Functions

def __init__ (self, intervals)
 
bool in_interval (self, Script script_object)
 

Public Attributes

 intervals
 stores the intervals which have been selected
 

Detailed Description

This can be used to parse the execution intervals of validation scripts
and can check whether a script object is in the list of intervals
configured in this class.

Definition at line 426 of file validation.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  intervals 
)
Initializes the IntervalSelector class with a list of intervals which
should be selected

Definition at line 433 of file validation.py.

433 def __init__(self, intervals):
434 """
435 Initializes the IntervalSelector class with a list of intervals which
436 should be selected
437 """
438
439
440 self.intervals = [x.strip() for x in intervals]
441

Member Function Documentation

◆ in_interval()

bool in_interval (   self,
Script  script_object 
)
checks whether the interval listed in a script object's header is
within the selected

Definition at line 442 of file validation.py.

442 def in_interval(self, script_object: Script) -> bool:
443 """
444 checks whether the interval listed in a script object's header is
445 within the selected
446 """
447
448 return script_object.interval in self.intervals
449
450

Member Data Documentation

◆ intervals

intervals

stores the intervals which have been selected

Definition at line 440 of file validation.py.


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