CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def appendToExtendedValidation
 
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 8 of file trackSplittingValidation.py.

Constructor & Destructor Documentation

def trackSplittingValidation.TrackSplittingValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Definition at line 9 of file trackSplittingValidation.py.

9 
10  def __init__(self, valName, alignment, config):
11  mandatories = ["trackcollection", "maxevents", "dataset"]
12  GenericValidationData.__init__(self, valName, alignment, config,
13  "split", addMandatories = mandatories)

Member Function Documentation

def trackSplittingValidation.TrackSplittingValidation.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 63 of file trackSplittingValidation.py.

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

63 
64  def appendToExtendedValidation( self, validationsSoFar = "" ):
65  """
66  if no argument or "" is passed a string with an instantiation is
67  returned, else the validation is appended to the list
68  """
69  repMap = self.getRepMap()
70  comparestring = self.getCompareStrings("TrackSplittingValidation")
71  if validationsSoFar != "":
72  validationsSoFar += ','
73  validationsSoFar += comparestring
74  return validationsSoFar
75 
def trackSplittingValidation.TrackSplittingValidation.createConfiguration (   self,
  path 
)

Definition at line 14 of file trackSplittingValidation.py.

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

14 
15  def createConfiguration(self, path ):
16  cfgName = "TkAlTrackSplitting.%s.%s_cfg.py"%(self.name,
17  self.alignmentToValidate.name)
18  repMap = self.getRepMap()
19  cfgs = {cfgName:replaceByMap(configTemplates.TrackSplittingTemplate,
20  repMap)}
21  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
22  repMap["resultFile"]
23  GenericValidationData.createConfiguration(self, cfgs, path)
def replaceByMap
— Helpers —############################
def trackSplittingValidation.TrackSplittingValidation.createCrabCfg (   self,
  path,
  crabCfgBaseName = "TkAlTrackSplitting" 
)

Definition at line 37 of file trackSplittingValidation.py.

37 
38  def createCrabCfg(self, path, crabCfgBaseName = "TkAlTrackSplitting"):
39  return GenericValidationData.createCrabCfg(self, path, crabCfgBaseName)
def trackSplittingValidation.TrackSplittingValidation.createScript (   self,
  path 
)

Definition at line 24 of file trackSplittingValidation.py.

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

24 
25  def createScript(self, path):
26  scriptName = "TkAlTrackSplitting.%s.%s.sh"%(self.name,
27  self.alignmentToValidate.name)
28  repMap = self.getRepMap()
29  repMap["CommandLine"]=""
30  for cfg in self.configFiles:
31  repMap["CommandLine"]+= (repMap["CommandLineTemplate"]
32  %{"cfgFile":cfg, "postProcess":""})
33 
34  scripts = {scriptName: replaceByMap(configTemplates.scriptTemplate,
35  repMap)}
36  return GenericValidationData.createScript(self, scripts, path)
def replaceByMap
— Helpers —############################
def trackSplittingValidation.TrackSplittingValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 40 of file trackSplittingValidation.py.

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

40 
41  def getRepMap( self, alignment = None ):
42  repMap = GenericValidationData.getRepMap(self)
43  repMap.update({
44  "resultFile": replaceByMap( ("/store/caf/user/$USER/.oO[eosdir]Oo."
45  "/TrackSplitting_"
46  + self.name +
47  "_.oO[name]Oo..root"),
48  repMap ),
49  "outputFile": replaceByMap( ("TrackSplitting_"
50  + self.name +
51  "_.oO[name]Oo..root"),
52  repMap ),
53  "nEvents": self.general["maxevents"],
54  "TrackCollection": self.general["trackcollection"]
55  })
56  repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
57  repMap["resultFile"] = os.path.expandvars( repMap["resultFile"] )
58  # repMap["outputFile"] = os.path.abspath( repMap["outputFile"] )
59  # if self.jobmode.split( ',' )[0] == "crab":
60  # repMap["outputFile"] = os.path.basename( repMap["outputFile"] )
61  return repMap
62 
def replaceByMap
— Helpers —############################