ATLAS Offline Software
Loading...
Searching...
No Matches
ChainDefInMenu.ChainProp Class Reference
Collaboration diagram for ChainDefInMenu.ChainProp:

Public Member Functions

 __post_init__ (self)

Static Public Attributes

List groups [str]
List monGroups = field(default_factory = list)
List l1SeedThresholds = field(default_factory = list)
List stream = field(default_factory = lambda : ['Main'])
str mergingStrategy = 'auto'
List mergingOrder = field(default_factory = list)
int mergingOffset = -1

Protected Member Functions

 _check_types (self)

Detailed Description

Class to hold chain properties with (limited) type-checking

Definition at line 9 of file ChainDefInMenu.py.

Member Function Documentation

◆ __post_init__()

ChainDefInMenu.ChainProp.__post_init__ ( self)

Definition at line 36 of file ChainDefInMenu.py.

36 def __post_init__(self):
37 f = self._check_types()
38 if f is not None:
39 raise TypeError(f"Expected type of '{f.name}' to be {f.type}, "
40 f"got {repr(getattr(self, f.name))}")
41

◆ _check_types()

ChainDefInMenu.ChainProp._check_types ( self)
protected
Check field types

Definition at line 22 of file ChainDefInMenu.py.

22 def _check_types(self):
23 """Check field types"""
24 for f in dataclasses.fields(self):
25 actual_type = typing.get_origin(f.type) or f.type
26 value = getattr(self, f.name)
27 if actual_type == list:
28 if value:
29 for el in value:
30 if not isinstance(el, typing.get_args(f.type)):
31 return f
32 elif not isinstance(value, actual_type):
33 return f
34 return None
35

Member Data Documentation

◆ groups

List ChainDefInMenu.ChainProp.groups [str]
static

Definition at line 12 of file ChainDefInMenu.py.

◆ l1SeedThresholds

List ChainDefInMenu.ChainProp.l1SeedThresholds = field(default_factory = list)
static

Definition at line 14 of file ChainDefInMenu.py.

◆ mergingOffset

int ChainDefInMenu.ChainProp.mergingOffset = -1
static

Definition at line 18 of file ChainDefInMenu.py.

◆ mergingOrder

List ChainDefInMenu.ChainProp.mergingOrder = field(default_factory = list)
static

Definition at line 17 of file ChainDefInMenu.py.

◆ mergingStrategy

str ChainDefInMenu.ChainProp.mergingStrategy = 'auto'
static

Definition at line 16 of file ChainDefInMenu.py.

◆ monGroups

List ChainDefInMenu.ChainProp.monGroups = field(default_factory = list)
static

Definition at line 13 of file ChainDefInMenu.py.

◆ stream

List ChainDefInMenu.ChainProp.stream = field(default_factory = lambda : ['Main'])
static

Definition at line 15 of file ChainDefInMenu.py.


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