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 60 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 70 of file GeneratorSettingsSemantics.py.

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

Member Data Documentation

◆ keep

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

Definition at line 96 of file GeneratorSettingsSemantics.py.

◆ precedence

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

Definition at line 87 of file GeneratorSettingsSemantics.py.

◆ report_context

python.GeneratorSettingsSemantics.GeneratorSettingsLayer.report_context = report_context

Definition at line 100 of file GeneratorSettingsSemantics.py.

◆ separators

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

Definition at line 93 of file GeneratorSettingsSemantics.py.

◆ source

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

Definition at line 81 of file GeneratorSettingsSemantics.py.

◆ values

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

Definition at line 84 of file GeneratorSettingsSemantics.py.


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