CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
offlineValidation.OfflineValidation Class Reference
Inheritance diagram for offlineValidation.OfflineValidation:
genericValidation.GenericValidationData_CTSR genericValidation.ParallelValidation genericValidation.ValidationWithComparison genericValidation.ValidationWithPlotsSummary genericValidation.ValidationForPresentation genericValidation.GenericValidationData genericValidation.GenericValidation genericValidation.GenericValidation genericValidation.ValidationWithPlotsSummaryBase genericValidation.ValidationWithPlots genericValidation.GenericValidation genericValidation.ValidationWithPlots genericValidation.GenericValidation genericValidation.GenericValidation offlineValidation.OfflineValidationDQM preexistingValidation.PreexistingOfflineValidation

Public Member Functions

def __init__ (self, valName, alignment, config)
 
def appendToMerge (self)
 
def appendToPlots (self)
 
def comparealignmentsname (cls)
 
def createCrabCfg (self, path)
 
def createScript (self, path)
 
def FileOutputTemplate (self)
 
def getRepMap (self, alignment=None)
 
def initMerge (cls)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def presentationsubsections (cls)
 
def ProcessName (self)
 
def ValidationSequence (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidationData_CTSR
def cosmics0T (self)
 
def DefinePath (self)
 
def getRepMap (self, alignment=None)
 
def isPVValidation (self)
 
def TrackSelectionRefitting (self)
 
def use_d0cut (self)
 
def ValidationSequence (self)
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__ (self, valName, alignment, config)
 
def Bookkeeping (self)
 
def cfgName (self)
 
def cfgTemplate (self)
 
def createConfiguration (self, path)
 
def createCrabCfg (self, path, crabCfgBaseName)
 
def createScript (self, path, template=configTemplates.scriptTemplate, downloadFiles=[], repMap=None, repMaps=None)
 
def DefinePath (self)
 
def FileOutputTemplate (self)
 
def filesToCompare (self)
 
def getRepMap (self, alignment=None)
 
def LoadBasicModules (self)
 
def ProcessName (self)
 
def TrackSelectionRefitting (self)
 
def ValidationTemplate (self)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config)
 
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 filesToCompare (self)
 
def getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.ParallelValidation
def appendToMerge (self)
 
def doInitMerge (cls)
 
def doMerge (self)
 
def initMerge (cls)
 
- Public Member Functions inherited from genericValidation.ValidationWithComparison
def comparealignmentsname (cls)
 
def comparealignmentspath (cls)
 
def comparisontemplate (cls)
 
def doComparison (cls, validations)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlotsSummary
def getsummaryitems (cls, folder)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlotsSummaryBase
def getsummaryitems (cls, folder)
 
def printsummaryitems (cls, args, kwargs)
 
def summaryitemsstring (cls, folder=None, latex=False, transpose=True)
 
def writesummaryitems (cls, filename, args, kwargs)
 
- Public Member Functions inherited from genericValidation.ValidationWithPlots
def appendToPlots (self)
 
def createPlottingScript (cls, validations)
 
def doRunPlots (cls, validations)
 
def plotsdirname (cls)
 
def plottingscriptname (cls)
 
def plottingscripttemplate (cls)
 
def runPlots (cls, validations)
 
- Public Member Functions inherited from genericValidation.ValidationForPresentation
def presentationsubsections (cls)
 

Public Attributes

 NTracks
 
- Public Attributes inherited from genericValidation.GenericValidationData
 crabWorkingDir
 
 dataset
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 AutoAlternates
 
 cmssw
 
 cmsswreleasebase
 
 config
 
 configFiles
 
 crabConfigFiles
 
 general
 
 jobid
 
 jobmode
 
 name
 
 needsproxy
 
 NJobs
 
 packages
 
 randomWorkdirPart
 
 scramarch
 
 scriptFiles
 

Static Public Attributes

string configBaseName = "TkAlOfflineValidation"
 
string crabCfgBaseName = "TkAlOfflineValidation"
 
dictionary defaults
 
dictionary deprecateddefaults
 
dictionary mandatories = {"trackcollection"}
 
string outputBaseName = "AlignmentValidation"
 
string resultBaseName = "AlignmentValidation"
 
string scriptBaseName = "TkAlOfflineValidation"
 
string valType = "offline"
 
- Static Public Attributes inherited from genericValidation.GenericValidationData_CTSR
dictionary defaults
 
- Static Public Attributes inherited from genericValidation.GenericValidationData
dictionary defaults
 
dictionary mandatories = {"dataset", "maxevents"}
 
bool needParentFiles = False
 
dictionary optionals = {"magneticfield"}
 
- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 
dictionary defaults
 
 mandatories = set()
 
dictionary needpackages = {"Alignment/OfflineValidation"}
 
dictionary optionals = {"jobmode"}
 

Detailed Description

Definition at line 10 of file offlineValidation.py.

Constructor & Destructor Documentation

def offlineValidation.OfflineValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Definition at line 34 of file offlineValidation.py.

References offlineValidation.OfflineValidation.deprecateddefaults, genericValidation.GenericValidation.general, genericValidation.GenericValidation.NJobs, and helperFunctions.pythonboolstring().

34  def __init__(self, valName, alignment, config):
35  super(OfflineValidation, self).__init__(valName, alignment, config)
36 
37  for name in "offlineModuleLevelHistsTransient", "offlineModuleLevelProfiles", "stripYResiduals":
38  self.general[name] = pythonboolstring(self.general[name], name)
39 
40  for option in self.deprecateddefaults:
41  if self.general[option]:
42  raise AllInOneError("The '%s' option has been moved to the [plots:offline] section. Please specify it there."%option)
43  del self.general[option]
44 
45  if self.NJobs > 1 and self.general["offlineModuleLevelHistsTransient"] == "True":
46  msg = ("To be able to merge results when running parallel jobs,"
47  " set offlineModuleLevelHistsTransient to false.")
48  raise AllInOneError(msg)
49 
50  try:
51  self.NTracks = int(self.general["maxtracks"])
52  if self.NTracks < 0: raise ValueError
53  except ValueError:
54  raise AllInOneError("maxtracks has to be a positive integer, or 0 for no limit")
55 
56  if self.NTracks / self.NJobs != float(self.NTracks) / self.NJobs:
57  raise AllInOneError("maxtracks has to be divisible by parallelJobs")
58 
def pythonboolstring(string, name)
def __init__(self, valName, alignment, config)

Member Function Documentation

def offlineValidation.OfflineValidation.appendToMerge (   self)

Definition at line 106 of file offlineValidation.py.

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

106  def appendToMerge(self):
107  repMap = self.getRepMap()
108 
109  parameters = "root://eoscms//eos/cms" + ",root://eoscms//eos/cms".join(repMap["resultFiles"])
110 
111  mergedoutputfile = "root://eoscms//eos/cms%(finalResultFile)s"%repMap
112  return ('root -x -b -q -l "TkAlOfflineJobsMerge.C(\\\"'
113  +parameters+'\\\",\\\"'+mergedoutputfile+'\\\")"')
114 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRepMap(self, alignment=None)
def offlineValidation.OfflineValidation.appendToPlots (   self)

Definition at line 92 of file offlineValidation.py.

92  def appendToPlots(self):
93  return ' p.loadFileList(".oO[filetoplot]Oo.", ".oO[title]Oo.", .oO[color]Oo., .oO[style]Oo.);\n'
94 
def offlineValidation.OfflineValidation.comparealignmentsname (   cls)

Definition at line 128 of file offlineValidation.py.

129  return "compareAlignments.cc"
130 
def offlineValidation.OfflineValidation.createCrabCfg (   self,
  path 
)
def offlineValidation.OfflineValidation.createScript (   self,
  path 
)

Definition at line 75 of file offlineValidation.py.

75  def createScript(self, path):
76  return super(OfflineValidation, self).createScript(path)
77 
def offlineValidation.OfflineValidation.FileOutputTemplate (   self)

Definition at line 72 of file offlineValidation.py.

72  def FileOutputTemplate(self):
73  return configTemplates.offlineFileOutputTemplate
74 
def offlineValidation.OfflineValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 81 of file offlineValidation.py.

References genericValidation.GenericValidation.general.

Referenced by plottingOptions.PlottingOptionsTrackSplitting.validsubdets().

81  def getRepMap(self, alignment = None):
82  repMap = super(OfflineValidation, self).getRepMap(alignment)
83  repMap.update({
84  "nEvents": self.general["maxevents"],
85  "offlineValidationMode": "Standalone",
86  "TrackCollection": self.general["trackcollection"],
87  "filetoplot": "root://eoscms//eos/cms.oO[finalResultFile]Oo.",
88  })
89 
90  return repMap
91 
def getRepMap(self, alignment=None)
def offlineValidation.OfflineValidation.initMerge (   cls)

Definition at line 96 of file offlineValidation.py.

References plottingOptions.PlottingOptions(), helperFunctions.replaceByMap(), monteCarloValidation.MonteCarloValidation.valType, offlineValidation.OfflineValidation.valType, and geometryComparison.GeometryComparison.valType.

96  def initMerge(cls):
97  from .plottingOptions import PlottingOptions
98  outFilePath = replaceByMap(".oO[scriptsdir]Oo./TkAlOfflineJobsMerge.C", PlottingOptions(None, cls.valType))
99  with open(outFilePath, "w") as theFile:
100  theFile.write(replaceByMap(configTemplates.mergeOfflineParJobsTemplate, {}))
101  result = super(OfflineValidation, cls).initMerge()
102  result += ("cp .oO[Alignment/OfflineValidation]Oo./scripts/merge_TrackerOfflineValidation.C .\n"
103  "rfcp .oO[mergeOfflineParJobsScriptPath]Oo. .\n")
104  return result
105 
def PlottingOptions(config, valType)
def replaceByMap(target, the_map)
— Helpers —############################
def offlineValidation.OfflineValidation.plotsdirname (   cls)

Definition at line 124 of file offlineValidation.py.

Referenced by presentation.ValidationPlots.validationclass().

124  def plotsdirname(cls):
125  return "ExtendedOfflineValidation_Images"
126 
def offlineValidation.OfflineValidation.plottingscriptname (   cls)

Definition at line 116 of file offlineValidation.py.

117  return "TkAlExtendedOfflineValidation.C"
118 
def offlineValidation.OfflineValidation.plottingscripttemplate (   cls)

Definition at line 120 of file offlineValidation.py.

121  return configTemplates.extendedValidationTemplate
122 
def offlineValidation.OfflineValidation.presentationsubsections (   cls)

Definition at line 132 of file offlineValidation.py.

133  return [
134  SubsectionOnePage('chi2', r'$\chi^2$ plots'),
135  SubsectionSubdetectors('DmedianY*R_[^_]*.eps$', 'DMR'),
136  SubsectionSubdetectors('DmedianY*R.*plain.eps$', 'DMR'),
137  SubsectionSubdetectors('DmedianY*R.*split.eps$','Split DMR'),
138  SubsectionSubdetectors('DrmsNY*R_[^_]*.eps$', 'DRnR'),
139  SubsectionSubdetectors('DrmsNY*R.*plain.eps$', 'DRnR'),
140  SubsectionSubdetectors('SurfaceShape', 'Surface Shape'),
141  ]
142 
def offlineValidation.OfflineValidation.ProcessName (   self)

Definition at line 60 of file offlineValidation.py.

60  def ProcessName(self):
61  return "OfflineValidator"
62 
def offlineValidation.OfflineValidation.ValidationSequence (   self)

Definition at line 68 of file offlineValidation.py.

68  def ValidationSequence(self):
69  return configTemplates.OfflineValidationSequence
70 
def offlineValidation.OfflineValidation.ValidationTemplate (   self)

Definition at line 64 of file offlineValidation.py.

64  def ValidationTemplate(self):
65  return configTemplates.offlineTemplate
66 

Member Data Documentation

string offlineValidation.OfflineValidation.configBaseName = "TkAlOfflineValidation"
static
string offlineValidation.OfflineValidation.crabCfgBaseName = "TkAlOfflineValidation"
static
dictionary offlineValidation.OfflineValidation.defaults
static
Initial value:
1 = {
2  "offlineModuleLevelHistsTransient": "False",
3  "offlineModuleLevelProfiles": "True",
4  "stripYResiduals": "False",
5  "maxtracks": "0",
6  "chargeCut": "0",
7  }

Definition at line 16 of file offlineValidation.py.

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

dictionary offlineValidation.OfflineValidation.deprecateddefaults
static
Initial value:
1 = {
2  "DMRMethod":"",
3  "DMRMinimum":"",
4  "DMROptions":"",
5  "OfflineTreeBaseDir":"",
6  "SurfaceShapes":"",
7  }

Definition at line 23 of file offlineValidation.py.

Referenced by offlineValidation.OfflineValidation.__init__(), zMuMuValidation.ZMuMuValidation.__init__(), and preexistingValidation.PreexistingOfflineValidation.__init__().

dictionary offlineValidation.OfflineValidation.mandatories = {"trackcollection"}
static

Definition at line 31 of file offlineValidation.py.

offlineValidation.OfflineValidation.NTracks

Definition at line 51 of file offlineValidation.py.

string offlineValidation.OfflineValidation.outputBaseName = "AlignmentValidation"
static
string offlineValidation.OfflineValidation.resultBaseName = "AlignmentValidation"
static
string offlineValidation.OfflineValidation.scriptBaseName = "TkAlOfflineValidation"
static
string offlineValidation.OfflineValidation.valType = "offline"
static