CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
preexistingValidation.PreexistingValidation Class Reference
Inheritance diagram for preexistingValidation.PreexistingValidation:
genericValidation.GenericValidation preexistingValidation.PreexistingGeometryComparison preexistingValidation.PreexistingMonteCarloValidation preexistingValidation.PreexistingOfflineValidation preexistingValidation.PreexistingTrackSplittingValidation preexistingValidation.PreexistingZMuMuValidation

Public Member Functions

def __init__ (self, valName, config)
 
def createConfiguration (self, args, kwargs)
 
def createCrabCfg (self, args, kwargs)
 
def createFiles (self, args, kwargs)
 
def createScript (self, args, kwargs)
 
def filesToCompare (self)
 
def getRepMap (self)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config)
 
def createConfiguration (self, fileContents, path, schedule=None, repMap=None, repMaps=None)
 
def createCrabCfg (self, fileContents, path)
 
def createFiles (self, fileContents, path, repMap=None, repMaps=None)
 
def createScript (self, fileContents, path, downloadFiles=[], repMap=None, repMaps=None)
 
def filesToCompare (self)
 
def getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 

Public Attributes

 config
 
 general
 
 jobid
 
 jobmode
 
 name
 
 needsproxy
 
 title
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 AutoAlternates
 
 cmssw
 
 cmsswreleasebase
 
 config
 
 configFiles
 
 crabConfigFiles
 
 general
 
 jobid
 
 jobmode
 
 name
 
 needsproxy
 
 NJobs
 
 packages
 
 randomWorkdirPart
 
 scramarch
 
 scriptFiles
 

Static Public Attributes

dictionary defaults = {"title": ".oO[name]Oo."}
 
dictionary mandatories = {"file", "color", "style"}
 
dictionary removemandatories = {"dataset", "maxevents", "trackcollection"}
 
- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 
dictionary defaults
 
 mandatories = set()
 
dictionary needpackages = {"Alignment/OfflineValidation"}
 
dictionary optionals = {"jobmode"}
 

Detailed Description

Object representing a validation that has already been run,
but should be included in plots.

Definition at line 12 of file preexistingValidation.py.

Constructor & Destructor Documentation

def preexistingValidation.PreexistingValidation.__init__ (   self,
  valName,
  config 
)

Definition at line 20 of file preexistingValidation.py.

20  def __init__(self, valName, config):
21  self.general = config.getGeneral()
22  self.name = self.general["name"] = valName
23  self.config = config
24 
25  theUpdate = config.getResultingSection("preexisting"+self.valType+":"+self.name,
26  defaultDict = self.defaults,
27  demandPars = self.mandatories)
28  self.general.update(theUpdate)
29 
30  self.title = self.general["title"]
31  if "|" in self.title or "," in self.title or '"' in self.title:
32  msg = "The characters '|', '\"', and ',' cannot be used in the alignment title!"
33  raise AllInOneError(msg)
34  self.needsproxy = boolfromstring(self.general["needsproxy"], "needsproxy")
35  self.jobid = self.general["jobid"]
36  if self.jobid:
37  try: #make sure it's actually a valid jobid
38  output = getCommandOutput2("bjobs %(jobid)s 2>&1"%self.general)
39  if "is not found" in output: raise RuntimeError
40  except RuntimeError:
41  raise AllInOneError("%s is not a valid jobid.\nMaybe it finished already?"%self.jobid)
42 
43  knownOpts = set(self.defaults.keys())|self.mandatories|self.optionals
44  ignoreOpts = []
45  config.checkInput("preexisting"+self.valType+":"+self.name,
46  knownSimpleOptions = knownOpts,
47  ignoreOptions = ignoreOpts)
48  self.jobmode = None
49 
50  try: #initialize plotting options for this validation type
51  result = PlottingOptions(self.config, self.valType)
52  except KeyError:
53  pass
54 
def getCommandOutput2(command)
def PlottingOptions(config, valType)
def boolfromstring(string, name)

Member Function Documentation

def preexistingValidation.PreexistingValidation.createConfiguration (   self,
  args,
  kwargs 
)

Definition at line 74 of file preexistingValidation.py.

74  def createConfiguration(self, *args, **kwargs):
75  pass
def preexistingValidation.PreexistingValidation.createCrabCfg (   self,
  args,
  kwargs 
)

Definition at line 78 of file preexistingValidation.py.

78  def createCrabCfg(self, *args, **kwargs):
79  raise AllInOneError("Shouldn't be here...")
80 
def preexistingValidation.PreexistingValidation.createFiles (   self,
  args,
  kwargs 
)

Definition at line 72 of file preexistingValidation.py.

72  def createFiles(self, *args, **kwargs):
73  raise AllInOneError("Shouldn't be here...")
def preexistingValidation.PreexistingValidation.createScript (   self,
  args,
  kwargs 
)

Definition at line 76 of file preexistingValidation.py.

76  def createScript(self, *args, **kwargs):
77  raise AllInOneError("Shouldn't be here...")
def preexistingValidation.PreexistingValidation.filesToCompare (   self)
def preexistingValidation.PreexistingValidation.getRepMap (   self)

Definition at line 59 of file preexistingValidation.py.

References geometry.Alignables.config, genericValidation.GenericValidation.config, genericValidation.GenericValidation.general, helperFunctions.parsecolor(), helperFunctions.parsestyle(), plottingOptions.PlottingOptions(), harvestTrackValidationPlots.str, trackSplittingValidation.TrackSplittingValidation.valType, monteCarloValidation.MonteCarloValidation.valType, primaryVertexValidation.PrimaryVertexValidation.valType, zMuMuValidation.ZMuMuValidation.valType, offlineValidation.OfflineValidation.valType, and geometryComparison.GeometryComparison.valType.

59  def getRepMap(self):
60  #do not call super
61  try:
62  result = PlottingOptions(self.config, self.valType)
63  except KeyError:
64  result = {}
65  result.update(self.general)
66  result.update({
67  "color": str(parsecolor(result["color"])),
68  "style": str(parsestyle(result["style"])),
69  })
70  return result
71 
def parsestyle(style)
def PlottingOptions(config, valType)
def parsecolor(color)

Member Data Documentation

preexistingValidation.PreexistingValidation.config

Definition at line 23 of file preexistingValidation.py.

dictionary preexistingValidation.PreexistingValidation.defaults = {"title": ".oO[name]Oo."}
static

Definition at line 17 of file preexistingValidation.py.

Referenced by tree.Tree.reset(), and tree.Tree.var().

preexistingValidation.PreexistingValidation.general

Definition at line 21 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobid

Definition at line 35 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobmode

Definition at line 48 of file preexistingValidation.py.

dictionary preexistingValidation.PreexistingValidation.mandatories = {"file", "color", "style"}
static

Definition at line 18 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.name

Definition at line 22 of file preexistingValidation.py.

Referenced by ElectronMVAID.ElectronMVAID.__call__(), dirstructure.Directory.__create_pie_image(), DisplayManager.DisplayManager.__del__(), dqm_interfaces.DirID.__eq__(), BeautifulSoup.Tag.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), dirstructure.Comparison.__make_image(), core.autovars.NTupleVariable.__repr__(), core.autovars.NTupleObjectType.__repr__(), core.autovars.NTupleObject.__repr__(), core.autovars.NTupleCollection.__repr__(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), config.Service.__setattr__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), BeautifulSoup.Tag.__str__(), BeautifulSoup.SoupStrainer.__str__(), core.autovars.NTupleObjectType.addSubObjects(), core.autovars.NTupleObjectType.addVariables(), core.autovars.NTupleObjectType.allVars(), dirstructure.Directory.calcStats(), crabFunctions.CrabTask.crabConfig(), crabFunctions.CrabTask.crabFolder(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), DisplayManager.DisplayManager.Draw(), TreeCrawler.Package.dump(), core.autovars.NTupleVariable.fillBranch(), core.autovars.NTupleObject.fillBranches(), core.autovars.NTupleCollection.fillBranchesScalar(), core.autovars.NTupleCollection.fillBranchesVector(), core.autovars.NTupleCollection.get_cpp_declaration(), core.autovars.NTupleCollection.get_cpp_wrapper_class(), core.autovars.NTupleCollection.get_py_wrapper_class(), utils.StatisticalTest.get_status(), production_tasks.Task.getname(), dataset.CMSDataset.getPrimaryDatasetEntries(), dataset.PrivateDataset.getPrimaryDatasetEntries(), crabFunctions.CrabTask.handleNoState(), VIDSelectorBase.VIDSelectorBase.initialize(), personalPlayback.Applet.log(), core.autovars.NTupleVariable.makeBranch(), core.autovars.NTupleObject.makeBranches(), core.autovars.NTupleCollection.makeBranchesScalar(), core.autovars.NTupleCollection.makeBranchesVector(), dirstructure.Directory.print_report(), dataset.BaseDataset.printInfo(), dataset.Dataset.printInfo(), crabFunctions.CrabTask.resubmit_failed(), production_tasks.MonitorJobs.run(), validateAlignments.ParallelMergeJob.runJob(), BeautifulSoup.SoupStrainer.searchTag(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), crabFunctions.CrabTask.update(), crabFunctions.CrabTask.updateJobStats(), Vispa.Views.PropertyView.Property.valueChanged(), counter.Counter.write(), and average.Average.write().

preexistingValidation.PreexistingValidation.needsproxy

Definition at line 34 of file preexistingValidation.py.

dictionary preexistingValidation.PreexistingValidation.removemandatories = {"dataset", "maxevents", "trackcollection"}
static

Definition at line 19 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.title