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 | Static Public Attributes
genericValidation.GenericValidation Class Reference
Inheritance diagram for genericValidation.GenericValidation:
genericValidation.GenericValidationData geometryComparison.GeometryComparison monteCarloValidation.MonteCarloValidation offlineValidation.OfflineValidation trackSplittingValidation.TrackSplittingValidation zMuMuValidation.ZMuMuValidation offlineValidation.OfflineValidationDQM offlineValidation.OfflineValidationParallel

Public Member Functions

def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

Public Attributes

 alignmentToValidate
 
 config
 
 configFiles
 
 crabConfigFiles
 
 filesToCompare
 
 general
 
 jobmode
 
 name
 
 randomWorkdirPart
 
 scriptFiles
 

Static Public Attributes

string defaultReferenceName = "DEFAULT"
 

Detailed Description

Definition at line 9 of file genericValidation.py.

Constructor & Destructor Documentation

def genericValidation.GenericValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Member Function Documentation

def genericValidation.GenericValidation.createConfiguration (   self,
  fileContents,
  path,
  schedule = None 
)

Definition at line 73 of file genericValidation.py.

References genericValidation.GenericValidation.configFiles.

73 
74  def createConfiguration(self, fileContents, path, schedule= None):
75  self.configFiles = GenericValidation.createFiles(self, fileContents,
76  path)
77  if not schedule == None:
78  schedule = [os.path.join( path, cfgName) for cfgName in schedule]
79  for cfgName in schedule:
80  if not cfgName in self.configFiles:
81  msg = ("scheduled %s missing in generated configfiles: %s"
82  %(cfgName, self.configFiles))
83  raise AllInOneError(msg)
84  for cfgName in self.configFiles:
85  if not cfgName in schedule:
86  msg = ("generated configuration %s not scheduled: %s"
87  %(cfgName, schedule))
88  raise AllInOneError(msg)
89  self.configFiles = schedule
90  return self.configFiles
def genericValidation.GenericValidation.createCrabCfg (   self,
  fileContents,
  path 
)

Definition at line 98 of file genericValidation.py.

98 
99  def createCrabCfg(self, fileContents, path ):
100  self.crabConfigFiles = GenericValidation.createFiles(self, fileContents,
101  path)
102  return self.crabConfigFiles
103 
def genericValidation.GenericValidation.createFiles (   self,
  fileContents,
  path 
)

Definition at line 63 of file genericValidation.py.

63 
64  def createFiles( self, fileContents, path ):
65  result = []
66  for fileName in fileContents:
67  filePath = os.path.join( path, fileName)
68  theFile = open( filePath, "w" )
69  theFile.write( fileContents[ fileName ] )
70  theFile.close()
71  result.append( filePath )
72  return result
def genericValidation.GenericValidation.createScript (   self,
  fileContents,
  path,
  downloadFiles = [] 
)

Definition at line 91 of file genericValidation.py.

91 
92  def createScript(self, fileContents, path, downloadFiles=[] ):
93  self.scriptFiles = GenericValidation.createFiles(self, fileContents,
94  path)
95  for script in self.scriptFiles:
96  os.chmod(script,0755)
97  return self.scriptFiles
def genericValidation.GenericValidation.getCompareStrings (   self,
  requestId = None 
)

Definition at line 42 of file genericValidation.py.

References genericValidation.GenericValidation.filesToCompare.

42 
43  def getCompareStrings( self, requestId = None ):
44  result = {}
45  repMap = self.alignmentToValidate.getRepMap()
46  for validationId in self.filesToCompare:
47  repMap["file"] = self.filesToCompare[ validationId ]
48  if repMap["file"].startswith( "/castor/" ):
49  repMap["file"] = "rfio:%(file)s"%repMap
50  elif repMap["file"].startswith( "/store/" ):
51  repMap["file"] = "root://eoscms.cern.ch//eos/cms%(file)s"%repMap
52  result[validationId]= "%(file)s=%(name)s|%(color)s|%(style)s"%repMap
53  if requestId == None:
54  return result
55  else:
56  if not "." in requestId:
57  requestId += ".%s"%GenericValidation.defaultReferenceName
58  if not requestId.split(".")[-1] in result:
59  msg = ("could not find %s in reference Objects!"
60  %requestId.split(".")[-1])
61  raise AllInOneError(msg)
62  return result[ requestId.split(".")[-1] ]
def genericValidation.GenericValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 22 of file genericValidation.py.

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, and genericValidation.GenericValidation.randomWorkdirPart.

Referenced by offlineValidation.OfflineValidation.appendToExtendedValidation(), offlineValidation.OfflineValidation.appendToMerge(), offlineValidation.OfflineValidationParallel.appendToMergeParJobs(), trackSplittingValidation.TrackSplittingValidation.createConfiguration(), monteCarloValidation.MonteCarloValidation.createConfiguration(), zMuMuValidation.ZMuMuValidation.createConfiguration(), offlineValidation.OfflineValidation.createConfiguration(), geometryComparison.GeometryComparison.createConfiguration(), offlineValidation.OfflineValidationParallel.createConfiguration(), genericValidation.GenericValidationData.createCrabCfg(), trackSplittingValidation.TrackSplittingValidation.createScript(), monteCarloValidation.MonteCarloValidation.createScript(), zMuMuValidation.ZMuMuValidation.createScript(), offlineValidation.OfflineValidation.createScript(), geometryComparison.GeometryComparison.createScript(), and offlineValidation.OfflineValidationParallel.createScript().

22 
23  def getRepMap(self, alignment = None):
24  if alignment == None:
25  alignment = self.alignmentToValidate
26  result = alignment.getRepMap()
27  result.update( self.general )
28  result.update({
29  "workdir": os.path.join(self.general["workdir"],
30  self.randomWorkdirPart),
31  "datadir": self.general["datadir"],
32  "logdir": self.general["logdir"],
33  "CommandLineTemplate": ("#run configfile and post-proccess it\n"
34  "cmsRun %(cfgFile)s\n"
35  "%(postProcess)s "),
36  "CMSSW_BASE": os.environ['CMSSW_BASE'],
37  "SCRAM_ARCH": os.environ['SCRAM_ARCH'],
38  "alignmentName": alignment.name,
39  "condLoad": alignment.getConditions()
40  })
41  return result

Member Data Documentation

genericValidation.GenericValidation.alignmentToValidate

Definition at line 14 of file genericValidation.py.

Referenced by genericValidation.GenericValidation.getRepMap(), and geometryComparison.GeometryComparison.getRepMap().

genericValidation.GenericValidation.config

Definition at line 20 of file genericValidation.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().

genericValidation.GenericValidation.configFiles

Definition at line 17 of file genericValidation.py.

Referenced by genericValidation.GenericValidation.createConfiguration(), trackSplittingValidation.TrackSplittingValidation.createScript(), monteCarloValidation.MonteCarloValidation.createScript(), zMuMuValidation.ZMuMuValidation.createScript(), offlineValidation.OfflineValidation.createScript(), geometryComparison.GeometryComparison.createScript(), and offlineValidation.OfflineValidationParallel.createScript().

genericValidation.GenericValidation.crabConfigFiles

Definition at line 99 of file genericValidation.py.

string genericValidation.GenericValidation.defaultReferenceName = "DEFAULT"
static

Definition at line 10 of file genericValidation.py.

genericValidation.GenericValidation.filesToCompare

Definition at line 18 of file genericValidation.py.

Referenced by trackSplittingValidation.TrackSplittingValidation.createConfiguration(), monteCarloValidation.MonteCarloValidation.createConfiguration(), offlineValidation.OfflineValidation.createConfiguration(), offlineValidation.OfflineValidationParallel.createConfiguration(), geometryComparison.GeometryComparison.createScript(), and genericValidation.GenericValidation.getCompareStrings().

genericValidation.GenericValidation.general

Definition at line 15 of file genericValidation.py.

Referenced by offlineValidation.OfflineValidationParallel.appendToMergeParJobs(), offlineValidation.OfflineValidationParallel.createConfiguration(), offlineValidation.OfflineValidationParallel.createScript(), genericValidation.GenericValidation.getRepMap(), trackSplittingValidation.TrackSplittingValidation.getRepMap(), monteCarloValidation.MonteCarloValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), and offlineValidation.OfflineValidationParallel.getRepMap().

genericValidation.GenericValidation.jobmode

Definition at line 19 of file genericValidation.py.

Referenced by offlineValidation.OfflineValidationParallel.__init__(), and genericValidation.GenericValidationData.__init__().

genericValidation.GenericValidation.name

Definition at line 13 of file genericValidation.py.

Referenced by dirstructure.Directory.__create_pie_image(), dqm_interfaces.DirID.__eq__(), BeautifulSoup.Tag.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getFileInfoList(), offlineValidation.OfflineValidationParallel.__init__(), genericValidation.GenericValidationData.__init__(), cuy.divideElement.__init__(), cuy.plotElement.__init__(), cuy.additionElement.__init__(), cuy.superimposeElement.__init__(), cuy.graphElement.__init__(), dirstructure.Comparison.__make_image(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), BeautifulSoup.Tag.__str__(), BeautifulSoup.SoupStrainer.__str__(), offlineValidation.OfflineValidationParallel.appendToMergeParJobs(), dirstructure.Directory.calcStats(), trackSplittingValidation.TrackSplittingValidation.createConfiguration(), monteCarloValidation.MonteCarloValidation.createConfiguration(), zMuMuValidation.ZMuMuValidation.createConfiguration(), offlineValidation.OfflineValidation.createConfiguration(), offlineValidation.OfflineValidationParallel.createConfiguration(), genericValidation.GenericValidationData.createCrabCfg(), trackSplittingValidation.TrackSplittingValidation.createScript(), monteCarloValidation.MonteCarloValidation.createScript(), zMuMuValidation.ZMuMuValidation.createScript(), offlineValidation.OfflineValidation.createScript(), geometryComparison.GeometryComparison.createScript(), offlineValidation.OfflineValidationParallel.createScript(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), TreeCrawler.Package.dump(), utils.StatisticalTest.get_status(), trackSplittingValidation.TrackSplittingValidation.getRepMap(), monteCarloValidation.MonteCarloValidation.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), offlineValidation.OfflineValidationParallel.getRepMap(), dirstructure.Directory.print_report(), BeautifulSoup.SoupStrainer.searchTag(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), and Vispa.Views.PropertyView.Property.valueChanged().

genericValidation.GenericValidation.randomWorkdirPart

Definition at line 16 of file genericValidation.py.

Referenced by geometryComparison.GeometryComparison.createConfiguration(), and genericValidation.GenericValidation.getRepMap().

genericValidation.GenericValidation.scriptFiles

Definition at line 92 of file genericValidation.py.