ATLAS Offline Software
Loading...
Searching...
No Matches
python.GeneratorSettingsSemantics.GeneratorSettingsLayer Class Reference
Collaboration diagram for python.GeneratorSettingsSemantics.GeneratorSettingsLayer:

Public Member Functions

 __init__ (self, source, values, precedence, separators="=", keep=GeneratorSettingsKeep.LAST, report_context=None)

Public Attributes

 source = str(source)
 values = tuple(values or ())
 precedence = GeneratorSettingsPrecedence(precedence)
 separators = tuple(separators)
 keep = GeneratorSettingsKeep(keep)
 report_context = report_context

Detailed Description

A layer contains all generator settings from a single source,
e.g. a user fragment, tune, etc.

Normal assignments still use a plain sequence of strings. Layers are only
needed by configuration fragments that want to describe where commands came
from and how they should be ordered during CA merging.

Definition at line 58 of file GeneratorSettingsSemantics.py.

Constructor & Destructor Documentation

◆ __init__()

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.__init__ ( self,
source,
values,
precedence,
separators = "=",
keep = GeneratorSettingsKeep.LAST,
report_context = None )

Definition at line 68 of file GeneratorSettingsSemantics.py.

74 report_context=None):
75 if isinstance(values, str):
76 raise TypeError("GeneratorSettingsLayer values must be a sequence")
77
78 # Label used in conflict/duplicate reports
79 self.source = str(source)
80
81 # Generator command strings belonging to this layer
82 self.values = tuple(values or ())
83
84 # Precedence used for deduplication and conflict resolution during merging
85 self.precedence = GeneratorSettingsPrecedence(precedence)
86
87 # Separators used to parse a generator setting command into a key/value
88 # pair for duplicate detection
89 if isinstance(separators, str):
90 separators = [separators]
91 self.separators = tuple(separators)
92
93 # Which matching key wins after sorting by layer precedence
94 self.keep = GeneratorSettingsKeep(keep)
95
96 # Text that should be mentioned in the deduplication report,
97 # usually the property name from the fragment.
98 self.report_context = report_context
99
100

Member Data Documentation

◆ keep

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.keep = GeneratorSettingsKeep(keep)

Definition at line 94 of file GeneratorSettingsSemantics.py.

◆ precedence

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.precedence = GeneratorSettingsPrecedence(precedence)

Definition at line 85 of file GeneratorSettingsSemantics.py.

◆ report_context

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.report_context = report_context

Definition at line 98 of file GeneratorSettingsSemantics.py.

◆ separators

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.separators = tuple(separators)

Definition at line 91 of file GeneratorSettingsSemantics.py.

◆ source

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.source = str(source)

Definition at line 79 of file GeneratorSettingsSemantics.py.

◆ values

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.values = tuple(values or ())

Definition at line 82 of file GeneratorSettingsSemantics.py.


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