1 from __future__
import absolute_import
3 from .genericValidation
import GenericValidation, GenericValidationData
4 from .geometryComparison
import GeometryComparison
5 from .helperFunctions
import boolfromstring, getCommandOutput2, parsecolor, parsestyle
6 from .monteCarloValidation
import MonteCarloValidation
7 from .offlineValidation
import OfflineValidation
8 from .primaryVertexValidation
import PrimaryVertexValidation
9 from .plottingOptions
import PlottingOptions
10 from .TkAlExceptions
import AllInOneError
11 from .trackSplittingValidation
import TrackSplittingValidation
12 from .zMuMuValidation
import ZMuMuValidation
16 Object representing a validation that has already been run,
17 but should be included in plots.
19 defaults = {
"title":
".oO[name]Oo."}
20 mandatories = {
"file",
"color",
"style",
"originalValName",
"eosdirName",
"multiIOV"}
21 removemandatories = {
"dataset",
"maxevents",
"trackcollection"}
27 theUpdate = config.getResultingSection(
"preexisting"+self.valType+
":"+self.
name,
30 self.general.update(theUpdate)
35 msg =
"The characters '|', '\"', and ',' cannot be used in the alignment title!"
36 raise AllInOneError(msg)
42 if "is not found" in output:
raise RuntimeError
44 raise AllInOneError(
"%s is not a valid jobid.\nMaybe it finished already?"%self.
jobid)
46 knownOpts = set(self.defaults.keys())|self.
mandatories|self.optionals
48 config.checkInput(
"preexisting"+self.valType+
":"+self.
name,
49 knownSimpleOptions = knownOpts,
50 ignoreOptions = ignoreOpts)
60 return {self.defaultReferenceName: self.
general[
"file"]}
76 raise AllInOneError(
"Shouldn't be here...")
80 raise AllInOneError(
"Shouldn't be here...")
82 raise AllInOneError(
"Shouldn't be here...")
85 deprecateddefaults = {
89 "OfflineTreeBaseDir":
"",
92 defaults = deprecateddefaults.copy()
94 super(PreexistingOfflineValidation, self).
__init__(valName, config)
97 raise AllInOneError(
"The '%s' option has been moved to the [plots:offline] section. Please specify it there."%option)
100 result = super(PreexistingOfflineValidation, self).
getRepMap()
102 "filetoplot": self.
general[
"file"],
107 raise AllInOneError(
"Shouldn't be here...")
110 removemandatories = {
"isda",
"ismc",
"runboundary",
"vertexcollection",
"lumilist",
"ptCut",
"etaCut",
"runControl",
"numberOfBins"}
112 result = super(PreexistingPrimaryVertexValidation, self).
getRepMap()
114 "filetoplot": self.
general[
"file"],
119 raise AllInOneError(
"Shouldn't be here...")
123 raise AllInOneError(
"Shouldn't be here...")
128 class PreexistingZMuMuValidation(PreexistingValidation):
130 raise AllInOneError(
"Preexisting Z->mumu validation not implemented")
135 raise AllInOneError(
"Preexisting geometry comparison not implemented")
dictionary deprecateddefaults