CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | 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__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

Public Attributes

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

Additional Inherited Members

- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 

Detailed Description

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

Definition at line 11 of file preexistingValidation.py.

Constructor & Destructor Documentation

def preexistingValidation.PreexistingValidation.__init__ (   self,
  valName,
  config,
  valType,
  addDefaults = {},
  addMandatories = [] 
)

Definition at line 17 of file preexistingValidation.py.

17 
18  addDefaults = {}, addMandatories=[]):
19  self.name = valName
20  self.general = config.getGeneral()
21  self.config = config
22  self.filesToCompare = {}
23 
24  defaults = {"title": self.name, "jobid": "", "subdetector": "BPIX"}
25  defaults.update(addDefaults)
26  mandatories = ["file", "color", "style"]
27  mandatories += addMandatories
28 
29  theUpdate = config.getResultingSection("preexisting"+valType+":"+self.name,
30  defaultDict = defaults,
31  demandPars = mandatories)
32  self.general.update(theUpdate)
33 
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 
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  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
48  self.general["file"]
49 
50  knownOpts = defaults.keys()+mandatories
51  ignoreOpts = []
52  config.checkInput("preexisting"+valType+":"+self.name,
53  knownSimpleOptions = knownOpts,
54  ignoreOptions = ignoreOpts)
55  self.jobmode = None

Member Function Documentation

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

Definition at line 90 of file preexistingValidation.py.

90 
91  def createConfiguration(self, *args, **kwargs):
pass
def preexistingValidation.PreexistingValidation.createCrabCfg (   self,
  args,
  kwargs 
)

Definition at line 94 of file preexistingValidation.py.

94 
95  def createCrabCfg(self, *args, **kwargs):
96  raise AllInOneError("Shouldn't be here...")
def preexistingValidation.PreexistingValidation.createFiles (   self,
  args,
  kwargs 
)

Definition at line 88 of file preexistingValidation.py.

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

Definition at line 92 of file preexistingValidation.py.

92 
93  def createScript(self, *args, **kwargs):
raise AllInOneError("Shouldn't be here...")
def preexistingValidation.PreexistingValidation.getCompareStrings (   self,
  requestId = None,
  plain = False 
)

Definition at line 64 of file preexistingValidation.py.

References genericValidation.GenericValidation.filesToCompare, genericValidation.GenericValidation.getRepMap(), and alignment.Alignment.getRepMap().

64 
65  def getCompareStrings( self, requestId = None, plain = False ):
66  result = {}
67  repMap = self.getRepMap()
68  for validationId in self.filesToCompare:
69  repMap["file"] = self.filesToCompare[ validationId ]
70  if repMap["file"].startswith( "/castor/" ):
71  repMap["file"] = "rfio:%(file)s"%repMap
72  elif repMap["file"].startswith( "/store/" ):
73  repMap["file"] = "root://eoscms.cern.ch//eos/cms%(file)s"%repMap
74  if plain:
75  result[validationId]=repMap["file"]
76  else:
77  result[validationId]= "%(file)s=%(title)s|%(color)s|%(style)s"%repMap
78  if requestId == None:
79  return result
80  else:
81  if not "." in requestId:
82  requestId += ".%s"%GenericValidation.defaultReferenceName
83  if not requestId.split(".")[-1] in result:
84  msg = ("could not find %s in reference Objects!"
85  %requestId.split(".")[-1])
86  raise AllInOneError(msg)
87  return result[ requestId.split(".")[-1] ]
def preexistingValidation.PreexistingValidation.getRepMap (   self)

Definition at line 56 of file preexistingValidation.py.

References genericValidation.GenericValidation.general, helperFunctions.parsecolor(), and helperFunctions.parsestyle().

56 
57  def getRepMap(self):
58  result = self.general
59  result.update({
60  "color": str(parsecolor(result["color"])),
61  "style": str(parsestyle(result["style"])),
62  })
63  return result

Member Data Documentation

preexistingValidation.PreexistingValidation.config

Definition at line 20 of file preexistingValidation.py.

Referenced by DTNoiseCalibration.DTNoiseCalibration.initCrab(), DTTTrigProd.DTTTrigProd.initCrab(), DTDQMValidation.DTDQMValidation.initCrab(), DTTTrigValid.DTTTrigValid.initCrab(), DTAnalysisResiduals.DTAnalysisResiduals.initCrab(), DTResidualCalibration.DTResidualCalibration.initCrab(), DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.initCrab(), DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.initCrab(), DTT0DBValidation.DTT0DBValidation.initProcess(), DTDqm.DTDqm.initProcess(), DTDQMMerge.DTDQMMerge.initProcess(), DTTTrigProd.DTTTrigProd.initProcess(), DTAnalysisResiduals.DTAnalysisResiduals.initProcess(), DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.initProcess(), DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.initProcess(), DTDQMHarvesting.DTDQMHarvesting.initProcess(), DTResidualCalibration.DTResidualCalibration.initProcess(), DTNoiseCalibration.DTNoiseCalibration.initProcess(), DTDQMValidation.DTDQMValidation.initProcess(), DTTTrigValid.DTTTrigValid.initProcess(), and DTCalibrationWorker.DTCalibrationWorker.run().

preexistingValidation.PreexistingValidation.filesToCompare

Definition at line 21 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.general

Definition at line 19 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobid

Definition at line 38 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobmode

Definition at line 54 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.name

Definition at line 18 of file preexistingValidation.py.

Referenced by ElectronMVAID.ElectronMVAID.__call__(), dirstructure.Directory.__create_pie_image(), dqm_interfaces.DirID.__eq__(), BeautifulSoup.Tag.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), cuy.divideElement.__init__(), cuy.plotElement.__init__(), cuy.additionElement.__init__(), cuy.superimposeElement.__init__(), cuy.graphElement.__init__(), 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(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), 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(), 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(), production_tasks.MonitorJobs.run(), BeautifulSoup.SoupStrainer.searchTag(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), Vispa.Views.PropertyView.Property.valueChanged(), counter.Counter.write(), and average.Average.write().

preexistingValidation.PreexistingValidation.title

Definition at line 33 of file preexistingValidation.py.

Referenced by cuy.plotElement.__init__(), cuy.additionElement.__init__(), cuy.superimposeElement.__init__(), cuy.graphElement.__init__(), Vispa.Views.LineDecayView.LineDecayContainer.autolayout(), Vispa.Views.LineDecayView.LineDecayContainer.autolayoutThreadFinished(), 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(), Vispa.Views.LineDecayView.LineDecayContainer.childFinishedAutolayouting(), python.rootplot.root2matplotlib.HistStack.errorbar(), python.rootplot.root2matplotlib.HistStack.errorbarh(), Formatter.SimpleHTMLFormatter.headers(), python.rootplot.root2matplotlib.HistStack.histstack(), Vispa.Gui.PortWidget.PortWidget.name(), python.rootplot.root2matplotlib.Hist.show_titles(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), python.rootplot.utilities.Hist2D.TH2F(), and python.rootplot.root2matplotlib.Hist2D.TH2F().