ATLAS Offline Software
|
Classes | |
class | CaloClusterCorrSetup |
class | CaloCorrectionConfigError |
Functions | |
def | split_version_spec (cspec) |
Code to handle creating the list of correction tools. More... | |
def | _find_version_from_cool_tag (flags, coolTag, corrclass) |
def | makecorr (flags, versions, name, basename, suffix, version, key, sampling, source, confclass, corrclass, generation='', order=0, **kw) |
def | _is_jo_source (s) |
def | _is_pool_source (s) |
def | _is_cool_source (s) |
def | _config_from_jo (corr, jo, key, sampling, valid_keys, order) |
def | _config_from_pool (flags, corr, poolfile, sgkey) |
def | _config_from_cool (flags, corr, folder, tag) |
def | _matchlen (a, b) |
def | _longest_match (key, valid_keys) |
def | _mung_prefix (corr, key, valid_keys) |
def | folder (tool) |
def | tag (tool) |
def | sgkey (tool) |
Variables | |
dictionary | _poolfiles_seen = {} |
dictionary | _folders_used = {} |
dictionary | _alltools = {} |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
def common.folder | ( | tool | ) |
def common.makecorr | ( | flags, | |
versions, | |||
name, | |||
basename, | |||
suffix, | |||
version, | |||
key, | |||
sampling, | |||
source, | |||
confclass, | |||
corrclass, | |||
generation = '' , |
|||
order = 0 , |
|||
** | kw | ||
) |
def common.sgkey | ( | tool | ) |
def common.split_version_spec | ( | cspec | ) |
Code to handle creating the list of correction tools.
The common code is in the class CaloClusterCorrSetup. You are expected to derive from it for your cluster type, and then create an instance. The following class variables must be defined in the derived class: name: A short descriptive name of the type of cluster (to be written to the log file)
version_override_flag_name: Name of flag. If set, it overrides the selected correction version.
correction_generation_flag_name: Name of flag. If set, this gives the correction generation string that's embedded in tags written to the database. This string should be changed for each write to the database.
correction_generation_default: Default value for the generation string, if the job property isn't set.
versions: The table of all known correction versions. Should be a dictionary; the keys are correction version names, and the values are correction lists. A correction list is a list of individual corrections:
[[CORR], [CORR], ...]
where each individual correction here is also a list:
[CORRFUNC, [VERSION,] [ORDER,] ARGS...]
CORRFUNC is a function to call to create the correction; it should have the signature:
def CORRFUNC (cells_name, suffix, version, key, source, **kw):
VERSION is a string giving the correction version. It may be omitted, and defaults to an empty string. It may also be ‘’, in which case the global version string is used instead.
ORDER is an integer, giving the order in which the tools are intended to run. Not currently used (they were used by the metatool), but retained in case we want to use this for checking.
The remainder of the list should be a set of (NAME,VALUE) tuples giving correction parameters to override. This may be (and usually should be) empty.
A key of ‘’ is used if the global correction version is tag-based (starts with ‘’).
geom_versions: The mapping between geometry versions and corrections versions. A list of lists, each of which has the form
[ GEOM-PATTERN, CORRECTION-VERSION ]
Here, GEOM-PATTERN is a string that's matched against the geometry version string. It may contain glob-style wildcards (as implemented by fnmatch). CORRECTION-VERSION is a string giving the correction version to use. The patterns are tried in order; first to match wins.
newest_version: The name of the newest version. This will be used if there's no match for the geometry string.
Definition at line 125 of file common.py.
def common.tag | ( | tool | ) |