CMS 3D CMS Logo

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__ (self, valName, config, valType, addDefaults={}, addMandatories=[])
 
def createConfiguration (self, args, kwargs)
 
def createCrabCfg (self, args, kwargs)
 
def createFiles (self, args, kwargs)
 
def createScript (self, args, kwargs)
 
def getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config, valType, addDefaults={}, addMandatories=[], addneedpackages=[])
 
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 getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 

Public Attributes

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

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  addDefaults = {}, addMandatories=[]):
18  self.name = valName
19  self.general = config.getGeneral()
20  self.config = config
21  self.filesToCompare = {}
22 
23  defaults = {"title": self.name}
24  defaults.update(addDefaults)
25  mandatories = ["file", "color", "style"]
26  mandatories += addMandatories
27 
28  theUpdate = config.getResultingSection("preexisting"+valType+":"+self.name,
29  defaultDict = defaults,
30  demandPars = mandatories)
31  self.general.update(theUpdate)
32 
33  self.title = self.general["title"]
34  if "|" in self.title or "," in self.title or '"' in self.title:
35  msg = "The characters '|', '\"', and ',' cannot be used in the alignment title!"
36  raise AllInOneError(msg)
37 
38  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
39  self.general["file"]
40 
41  knownOpts = defaults.keys()+mandatories
42  ignoreOpts = []
43  config.checkInput("preexisting"+valType+":"+self.name,
44  knownSimpleOptions = knownOpts,
45  ignoreOptions = ignoreOpts)
46  self.jobmode = None
47 

Member Function Documentation

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

Definition at line 82 of file preexistingValidation.py.

82  def createConfiguration(self, *args, **kwargs):
83  pass
def preexistingValidation.PreexistingValidation.createCrabCfg (   self,
  args,
  kwargs 
)

Definition at line 86 of file preexistingValidation.py.

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

Definition at line 80 of file preexistingValidation.py.

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

Definition at line 84 of file preexistingValidation.py.

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

Definition at line 56 of file preexistingValidation.py.

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

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

Definition at line 48 of file preexistingValidation.py.

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

48  def getRepMap(self):
49  result = self.general
50  result.update({
51  "color": str(parsecolor(result["color"])),
52  "style": str(parsestyle(result["style"])),
53  })
54  return result
55 
def parsestyle(style)
def parsecolor(color)

Member Data Documentation

preexistingValidation.PreexistingValidation.config
preexistingValidation.PreexistingValidation.filesToCompare

Definition at line 21 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.general

Definition at line 19 of file preexistingValidation.py.

preexistingValidation.PreexistingValidation.jobmode

Definition at line 46 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(), 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(), 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(), 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