CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
preexistingValidation.PreexistingValidation Class Reference
Inheritance diagram for preexistingValidation.PreexistingValidation:
preexistingValidation.PreexistingGeometryComparison preexistingValidation.PreexistingMonteCarloValidation preexistingValidation.PreexistingOfflineValidation preexistingValidation.PreexistingPrimaryVertexValidation preexistingValidation.PreexistingTrackSplittingValidation preexistingValidation.PreexistingZMuMuValidation

Public Member Functions

def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def filesToCompare
 
def getRepMap
 

Public Attributes

 config
 
 general
 
 jobid
 
 jobmode
 
 name
 
 needsproxy
 
 originalValName
 
 title
 

Static Public Attributes

dictionary defaults = {"title": ".oO[name]Oo."}
 
dictionary mandatories = {"file", "color", "style", "originalValName", "eosdirName", "multiIOV"}
 
dictionary removemandatories = {"dataset", "maxevents", "trackcollection"}
 

Detailed Description

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

Definition at line 14 of file preexistingValidation.py.

Constructor & Destructor Documentation

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

Definition at line 22 of file preexistingValidation.py.

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

Member Function Documentation

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

Definition at line 77 of file preexistingValidation.py.

77 
78  def createConfiguration(self, *args, **kwargs):
pass
def preexistingValidation.PreexistingValidation.createCrabCfg (   self,
  args,
  kwargs 
)

Definition at line 81 of file preexistingValidation.py.

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

Definition at line 75 of file preexistingValidation.py.

Referenced by geometryComparison.GeometryComparison.createScript().

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

Definition at line 79 of file preexistingValidation.py.

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

Definition at line 59 of file preexistingValidation.py.

References genericValidation.GenericValidation.defaultReferenceName, preexistingValidation.PreexistingValidation.general, plottingOptions.BasePlottingOptions.general, and genericValidation.GenericValidation.general.

59 
60  def filesToCompare(self):
61  return {self.defaultReferenceName: self.general["file"]}
def preexistingValidation.PreexistingValidation.getRepMap (   self)

Definition at line 62 of file preexistingValidation.py.

References geometry.Alignables.config, preexistingValidation.PreexistingValidation.config, plottingOptions.BasePlottingOptions.config, genericValidation.GenericValidation.config, preexistingValidation.PreexistingValidation.general, plottingOptions.BasePlottingOptions.general, genericValidation.GenericValidation.general, helperFunctions.parsecolor(), helperFunctions.parsestyle(), plottingOptions.PlottingOptions(), str, trackSplittingValidation.TrackSplittingValidation.valType, monteCarloValidation.MonteCarloValidation.valType, overlapValidation.OverlapValidation.valType, primaryVertexValidation.PrimaryVertexValidation.valType, primaryVertexResolution.PrimaryVertexResolution.valType, offlineValidation.OfflineValidation.valType, zMuMuValidation.ZMuMuValidation.valType, geometryComparison.GeometryComparison.valType, validateAlignments.ValidationBase.valType, and validateAlignments.ValidationJobMultiIOV.valType.

Referenced by trackSplittingValidation.TrackSplittingValidation.appendToMerge(), primaryVertexResolution.PrimaryVertexResolution.appendToMerge(), primaryVertexValidation.PrimaryVertexValidation.appendToMerge(), trackSplittingValidation.TrackSplittingValidation.appendToPlots(), primaryVertexResolution.PrimaryVertexResolution.appendToPlots(), primaryVertexValidation.PrimaryVertexValidation.appendToPlots(), zMuMuValidation.ZMuMuValidation.appendToPlots(), and zMuMuValidation.ZMuMuValidation.filesToCompare().

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

Member Data Documentation

preexistingValidation.PreexistingValidation.config

Definition at line 25 of file preexistingValidation.py.

Referenced by preexistingValidation.PreexistingValidation.getRepMap(), and zMuMuValidation.ZMuMuValidation.trackcollection().

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

Definition at line 19 of file preexistingValidation.py.

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

preexistingValidation.PreexistingValidation.general

Definition at line 23 of file preexistingValidation.py.

Referenced by primaryVertexValidation.PrimaryVertexValidation.__init__(), primaryVertexResolution.PrimaryVertexResolution.__init__(), offlineValidation.OfflineValidation.__init__(), zMuMuValidation.ZMuMuValidation.__init__(), preexistingValidation.PreexistingOfflineValidation.__init__(), preexistingValidation.PreexistingValidation.filesToCompare(), overlapValidation.OverlapValidation.getRepMap(), monteCarloValidation.MonteCarloValidation.getRepMap(), trackSplittingValidation.TrackSplittingValidation.getRepMap(), primaryVertexResolution.PrimaryVertexResolution.getRepMap(), preexistingValidation.PreexistingValidation.getRepMap(), primaryVertexValidation.PrimaryVertexValidation.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), preexistingValidation.PreexistingOfflineValidation.getRepMap(), and preexistingValidation.PreexistingPrimaryVertexValidation.getRepMap().

preexistingValidation.PreexistingValidation.jobid

Definition at line 38 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobmode

Definition at line 51 of file preexistingValidation.py.

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

Definition at line 20 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.name

Definition at line 24 of file preexistingValidation.py.

Referenced by ElectronMVAID.ElectronMVAID.__call__(), FWLite.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__(), FWLite.WorkingPoints._reformat_cut_definitions(), core.autovars.NTupleObjectType.addSubObjects(), core.autovars.NTupleObjectType.addVariables(), core.autovars.NTupleObjectType.allVars(), dirstructure.Directory.calcStats(), crabFunctions.CrabTask.crabConfig(), crabFunctions.CrabTask.crabFolder(), geometryComparison.GeometryComparison.createScript(), 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(), primaryVertexResolution.PrimaryVertexResolution.getRepMap(), primaryVertexValidation.PrimaryVertexValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), 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(), BeautifulSoup.SoupStrainer.searchTag(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), crabFunctions.CrabTask.update(), crabFunctions.CrabTask.updateJobStats(), counter.Counter.write(), and average.Average.write().

preexistingValidation.PreexistingValidation.needsproxy

Definition at line 37 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.originalValName

Definition at line 32 of file preexistingValidation.py.

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

Definition at line 21 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.title

Definition at line 33 of file preexistingValidation.py.

Referenced by python.rootplot.root2matplotlib.HistStack.bar(), python.rootplot.root2matplotlib.HistStack.bar3d(), python.rootplot.root2matplotlib.HistStack.barcluster(), python.rootplot.root2matplotlib.HistStack.barh(), python.rootplot.root2matplotlib.HistStack.barstack(), TkAlMap.TkAlMap.draw_title(), python.rootplot.root2matplotlib.HistStack.errorbar(), python.rootplot.root2matplotlib.HistStack.errorbarh(), Formatter.SimpleHTMLFormatter.headers(), python.rootplot.root2matplotlib.HistStack.histstack(), presentation.SubsectionOnePage.pages(), presentation.SubsectionFromList.pages(), presentation.SummarySection.pages(), python.rootplot.root2matplotlib.Hist.show_titles(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), python.rootplot.utilities.Hist2D.TH2F(), python.rootplot.root2matplotlib.Hist2D.TH2F(), and presentation.SubsectionBase.write().