Returns a set of tags used to configure various FPGATrackSim components, configured
with additional user options. This function will do consistency checks on
tag dependencies.
@param options - This should be a dictionary with keys that match those
in the packages' tags, and optionally entries to switch to a
different tag from the default (see below). Extra/missing keys are ok.
To swith to a different tag, use the following keys:
FPGATrackSimMaps - mapTag
FPGATrackSimBanks - bankTag
FPGATrackSimAlgorithms - algoTag
@param stage - Which stage this function is being called from: map/bank/algo.
This is limits the returned tags and the dependency checking to the
given stage.
@return [mapTag, bankTag, hitFilterTag, algoTag]
Definition at line 25 of file FPGATrackSimTagConfig.py.
25 def getTags(stage = 'algo', options = {}):
27 Returns a set of tags used to configure various FPGATrackSim components, configured
28 with additional user options. This function will do consistency checks on
31 @param options - This should be a dictionary with keys that match those
32 in the packages' tags, and optionally entries to switch to a
33 different tag from the default (see below). Extra/missing keys are ok.
35 To swith to a different tag, use the following keys:
36 FPGATrackSimMaps - mapTag
37 FPGATrackSimBanks - bankTag
38 FPGATrackSimAlgorithms - algoTag
39 @param stage - Which stage this function is being called from: map/bank/algo.
40 This is limits the returned tags and the dependency checking to the
43 @return [mapTag, bankTag, hitFilterTag, algoTag]
46 packages = [
'map',
'bank',
'algo']
49 for i
in range(packages.index(stage), -1, -1):
50 tags[packages[i]] =
_getTag(packages[i], options)
53 for dependentPackage
in _tagDependency[packages[i]]:
54 keyName = dependentPackage +
'Tag'
55 requestedTag = options.get(keyName)
56 if requestedTag
is None:
57 options[keyName] = tags[packages[i]][keyName]
58 elif requestedTag != tags[packages[i]][keyName]:
59 raise NameError(
"Inconsistent tags. Requested " + requestedTag +
" but expect " + tags[packages[i]][keyName])