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.PreexistingPrimaryVertexValidation 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 13 of file preexistingValidation.py.

Constructor & Destructor Documentation

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

Definition at line 21 of file preexistingValidation.py.

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

Member Function Documentation

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

Definition at line 75 of file preexistingValidation.py.

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

Definition at line 79 of file preexistingValidation.py.

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

Definition at line 73 of file preexistingValidation.py.

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

Definition at line 77 of file preexistingValidation.py.

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

Definition at line 60 of file preexistingValidation.py.

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

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

Member Data Documentation

preexistingValidation.PreexistingValidation.config

Definition at line 24 of file preexistingValidation.py.

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

Definition at line 18 of file preexistingValidation.py.

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

preexistingValidation.PreexistingValidation.general

Definition at line 22 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobid

Definition at line 36 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobmode

Definition at line 49 of file preexistingValidation.py.

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

Definition at line 19 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.name

Definition at line 23 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 35 of file preexistingValidation.py.

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

Definition at line 20 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.title