test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
offlineValidation.OfflineValidation Class Reference
Inheritance diagram for offlineValidation.OfflineValidation:
genericValidation.GenericValidationData genericValidation.GenericValidation offlineValidation.OfflineValidationDQM offlineValidation.OfflineValidationParallel

Public Member Functions

def __init__
 
def appendToExtendedValidation
 
def appendToMerge
 
def createConfiguration
 
def createCrabCfg
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__
 
def createCrabCfg
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

Additional Inherited Members

- Public Attributes inherited from genericValidation.GenericValidationData
 crabWorkingDir
 
 dataset
 
 jobmode
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 config
 
 configFiles
 
 crabConfigFiles
 
 filesToCompare
 
 general
 
 jobmode
 
 name
 
 randomWorkdirPart
 
 scriptFiles
 
- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 

Detailed Description

Definition at line 9 of file offlineValidation.py.

Constructor & Destructor Documentation

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

Definition at line 10 of file offlineValidation.py.

References offlineValidation.OfflineValidation.createConfiguration().

10 
11  def __init__(self, valName, alignment,config):
12  defaults = {
13  "DMRMethod":"median,rmsNorm",
14  "DMRMinimum":"30",
15  "DMROptions":"",
16  "offlineModuleLevelHistsTransient":"False",
17  "offlineModuleLevelProfiles":"False",
18  "OfflineTreeBaseDir":"TrackHitFilter",
19  "SurfaceShapes":"none"
20  }
21  mandatories = [ "dataset", "maxevents", "trackcollection" ]
22  GenericValidationData.__init__(self, valName, alignment, config,
23  "offline", addDefaults=defaults,
24  addMandatories=mandatories)

Member Function Documentation

def offlineValidation.OfflineValidation.appendToExtendedValidation (   self,
  validationsSoFar = "" 
)
if no argument or "" is passed a string with an instantiation is
returned, else the validation is appended to the list

Definition at line 74 of file offlineValidation.py.

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

74 
75  def appendToExtendedValidation( self, validationsSoFar = "" ):
76  """
77  if no argument or "" is passed a string with an instantiation is
78  returned, else the validation is appended to the list
79  """
80  repMap = self.getRepMap()
81  if validationsSoFar == "":
82  validationsSoFar = ('PlotAlignmentValidation p("%(outputFile)s",'
83  '"%(name)s", %(color)s, %(style)s);\n')%repMap
84  else:
85  validationsSoFar += ('p.loadFileList("%(outputFile)s", "%(name)s",'
86  '%(color)s, %(style)s);\n')%repMap
87  return validationsSoFar
def offlineValidation.OfflineValidation.appendToMerge (   self,
  mergesSoFar = "" 
)
append all merges here

Definition at line 88 of file offlineValidation.py.

References genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), and helperFunctions.replaceByMap().

88 
89  def appendToMerge( self, mergesSoFar = "" ):
90  """
91  append all merges here
92  """
93  repMap = self.getRepMap()
94  mergesSoFar += replaceByMap(configTemplates.mergeOfflineParallelResults,
95  repMap)
96  return mergesSoFar
97 
def replaceByMap
— Helpers —############################
def offlineValidation.OfflineValidation.createConfiguration (   self,
  path,
  configBaseName = "TkAlOfflineValidation" 
)

Definition at line 26 of file offlineValidation.py.

References genericValidation.GenericValidation.filesToCompare, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

Referenced by offlineValidation.OfflineValidation.__init__().

26 
27  configBaseName = "TkAlOfflineValidation" ):
28  cfgName = "%s.%s.%s_cfg.py"%( configBaseName, self.name,
29  self.alignmentToValidate.name )
30  repMap = self.getRepMap()
31 
32  cfgs = {cfgName:replaceByMap( configTemplates.offlineTemplate, repMap)}
33  self.filesToCompare[
34  GenericValidationData.defaultReferenceName ] = repMap["resultFile"]
35  GenericValidationData.createConfiguration(self, cfgs, path)
def replaceByMap
— Helpers —############################
def offlineValidation.OfflineValidation.createCrabCfg (   self,
  path,
  crabCfgBaseName = "TkAlOfflineValidation" 
)

Definition at line 49 of file offlineValidation.py.

49 
50  def createCrabCfg(self, path, crabCfgBaseName = "TkAlOfflineValidation"):
51  return GenericValidationData.createCrabCfg(self, path, crabCfgBaseName)
def offlineValidation.OfflineValidation.createScript (   self,
  path,
  scriptBaseName = "TkAlOfflineValidation" 
)

Definition at line 36 of file offlineValidation.py.

References genericValidation.GenericValidation.configFiles, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

36 
37  def createScript(self, path, scriptBaseName = "TkAlOfflineValidation"):
38  scriptName = "%s.%s.%s.sh"%( scriptBaseName, self.name,
39  self.alignmentToValidate.name )
40  repMap = self.getRepMap()
41  repMap["CommandLine"]=""
42  for cfg in self.configFiles:
43  repMap["CommandLine"]+= repMap["CommandLineTemplate"]%{"cfgFile":cfg,
44  "postProcess":""
45  }
46  scripts = {scriptName: replaceByMap( configTemplates.scriptTemplate,
47  repMap ) }
48  return GenericValidationData.createScript(self, scripts, path)
def replaceByMap
— Helpers —############################
def offlineValidation.OfflineValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 52 of file offlineValidation.py.

References genericValidation.GenericValidation.general, entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

52 
53  def getRepMap(self, alignment = None):
54  repMap = GenericValidationData.getRepMap(self, alignment)
55  repMap.update({
56  "nEvents": self.general["maxevents"],
57  "outputFile": replaceByMap( ("AlignmentValidation_"
58  + self.name +
59  "_.oO[name]Oo..root"), repMap ),
60  "resultFile": replaceByMap( ("/store/caf/user/$USER/.oO[eosdir]Oo."
61  "/AlignmentValidation_"
62  + self.name +
63  "_.oO[name]Oo..root"), repMap ),
64  "TrackSelectionTemplate": configTemplates.TrackSelectionTemplate,
65  "LorentzAngleTemplate": configTemplates.LorentzAngleTemplate,
66  "offlineValidationMode": "Standalone",
67  "offlineValidationFileOutput":
68  configTemplates.offlineStandaloneFileOutputTemplate,
69  "TrackCollection": self.general["trackcollection"]
70  })
71  repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
72  repMap["resultFile"] = os.path.expandvars( repMap["resultFile"] )
73  return repMap
def replaceByMap
— Helpers —############################