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 76 of file genericValidation.py.

References genericValidation.GenericValidation.configFiles.

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

Definition at line 101 of file genericValidation.py.

102  def createCrabCfg(self, fileContents, path ):
103  self.crabConfigFiles = GenericValidation.createFiles(self, fileContents,
104  path)
105  return self.crabConfigFiles
106 
def genericValidation.GenericValidation.createFiles (   self,
  fileContents,
  path 
)

Definition at line 66 of file genericValidation.py.

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

Definition at line 94 of file genericValidation.py.

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

Definition at line 42 of file genericValidation.py.

References genericValidation.GenericValidation.filesToCompare.

Referenced by trackSplittingValidation.TrackSplittingValidation.appendToExtendedValidation().

42 
43  def getCompareStrings( self, requestId = None, plain = False ):
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  if plain:
53  result[validationId]=repMap["file"]
54  else:
55  result[validationId]= "%(file)s=%(name)s|%(color)s|%(style)s"%repMap
56  if requestId == None:
57  return result
58  else:
59  if not "." in requestId:
60  requestId += ".%s"%GenericValidation.defaultReferenceName
61  if not requestId.split(".")[-1] in result:
62  msg = ("could not find %s in reference Objects!"
63  %requestId.split(".")[-1])
64  raise AllInOneError(msg)
65  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 trackSplittingValidation.TrackSplittingValidation.appendToExtendedValidation(), 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 102 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 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(), 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__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), BeautifulSoup.Tag.__str__(), BeautifulSoup.SoupStrainer.__str__(), core.autovars.NTupleObjectType.allVars(), 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(), core.autovars.NTupleVariable.fillBranch(), core.autovars.NTupleObject.fillBranches(), core.autovars.NTupleCollection.fillBranchesScalar(), core.autovars.NTupleCollection.fillBranchesVector(), utils.StatisticalTest.get_status(), trackSplittingValidation.TrackSplittingValidation.getRepMap(), monteCarloValidation.MonteCarloValidation.getRepMap(), offlineValidation.OfflineValidation.getRepMap(), offlineValidation.OfflineValidationParallel.getRepMap(), core.autovars.NTupleVariable.makeBranch(), core.autovars.NTupleObject.makeBranches(), core.autovars.NTupleCollection.makeBranchesScalar(), core.autovars.NTupleCollection.makeBranchesVector(), dirstructure.Directory.print_report(), 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().

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 95 of file genericValidation.py.